Skip to content

Commit

Permalink
#2 Main page issues fixed 'new components for search bar and sports b…
Browse files Browse the repository at this point in the history
…uttons with css files'
  • Loading branch information
DeakCsaba0124 committed Feb 14, 2024
1 parent 348577e commit 8217006
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 35 deletions.
Binary file added frontend/sportsmatch-app/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion frontend/sportsmatch-app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Login from './pages/Login'
import Signup from './pages/Signup'
import NewUser from './pages/NewUser'
import MainPage from './pages/MainPage'

import UserPage from './pages/UserPage'

function App() {
return (
Expand Down
28 changes: 15 additions & 13 deletions frontend/sportsmatch-app/src/pages/MainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ import SearchBarComponent from '../components/SearchBarComponent'
import MainPageSliderComponent from '../components/MainPageSliderComponent'
import SportsButtonComponent from '../components/SportsButtonComponent'
import SportEvent from '../components/SportEvent'
import Navbar from '../components/Navbar'
import '../styles/MainPage.css'
import '../styles/Slider.css'
import '../styles/Navbar.css'
import '../styles/SearchBar.css'

export default function MainPage() {
const events = [
Expand Down Expand Up @@ -57,19 +60,18 @@ export default function MainPage() {
},
]
return (
<div className="frame">
<div className="components-container">
<MainPageSliderComponent />
<SearchBarComponent />
<SportsButtonComponent />
<p className="mainPage-p">Nearby</p>
<div className="nearby-events-container">
{events.map((event, index) => (
<div className="nearby-events" key={index}>
<SportEvent event={event} />
</div>
))}
</div>
<div className="components-container">
<Navbar />
<MainPageSliderComponent />
<SearchBarComponent />
<SportsButtonComponent />
<p className="mainPage-p">Nearby</p>
<div className="nearby-events-container">
{events.map((event, index) => (
<div className="nearby-events" key={index}>
<SportEvent event={event} />
</div>
))}
</div>
</div>
)
Expand Down
14 changes: 5 additions & 9 deletions frontend/sportsmatch-app/src/styles/MainPage.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
/* General Styles */


/* Form Styles */


.mainPage-form {
display: flex;
}
Expand Down Expand Up @@ -53,8 +47,8 @@
}

.mainPage-p {
margin-top: 2vh;
margin-left: 8vw;
margin-top: 4vh;
}

/* Nearby Events Container Styles */
Expand All @@ -73,8 +67,6 @@

/* Media Queries */
@media (max-width: 768px) {


.nearby-events-container {
position: absolute;
display: flex;
Expand Down Expand Up @@ -109,4 +101,8 @@
width: 90%;
justify-content: space-around;
}

.mainPage-p {
margin-top: 14vh;
}
}
5 changes: 3 additions & 2 deletions frontend/sportsmatch-app/src/styles/Navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
}

nav{
position: absolute;
top: 0;
width: 100%;
height: 60px;
background: rgba(255, 255, 255, 0.5);;
border-radius: 10px;
background: rgba(255, 255, 255, 0.5);
}
12 changes: 3 additions & 9 deletions frontend/sportsmatch-app/src/styles/SearchBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@
}

@media (max-width: 768px) {
.search-container {
margin-top: 20px;
}

.search-container-btn {
width: 55%;
height: 45px;
Expand All @@ -58,15 +54,13 @@

.search-container {
position: relative;
margin-top: 2vh;
margin-top: 30vh;
}
}



@media (max-width: 480px) {
@media (max-width: 400px) {
.search-container {
position: relative;
margin-top: 24vh;
top: 12vh;
}
}
2 changes: 1 addition & 1 deletion frontend/sportsmatch-app/src/styles/Slider.css
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
@media (max-width: 768px) {
.slider {
position: absolute;
top: 0px;
top: 60px;
left: 0;
height: 30vh;
}
Expand Down
7 changes: 7 additions & 0 deletions frontend/sportsmatch-app/src/styles/SportsBtn.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,11 @@

.sportBtn-p {
margin-left: 8vw;
}

@media (max-width: 400px) {
.wrapper {
position: relative;
top: 12vh;
}
}

0 comments on commit 8217006

Please sign in to comment.