Skip to content

Commit

Permalink
update style
Browse files Browse the repository at this point in the history
  • Loading branch information
NoeLecointe committed Dec 17, 2024
1 parent 33b1ed0 commit 95ffffd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
9 changes: 8 additions & 1 deletion frontend/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@
#root {
margin: 0 auto;
text-align: center;
max-width: 1200px;
max-width: 98vw;
height: 100vh;
padding: 1rem;
background-color: var(--background-color);
border-radius: 10px;
box-shadow: 0 4px 6px var(--shadow-color);
}

#mainDiv {
height: 80%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
12 changes: 7 additions & 5 deletions frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,19 @@ function App() {
}

return (
<div className="app-container">
<div className="app-container" id='mainDiv'>
<Header
cities={cities}
ville={selectedCity}
cityChange={handleCity}
selectedDate={selectedDate}
/>
<TimeSelector date={selectedDate} dateChange={handleDate} momentChange={handleMoment}/>
<main className="main-content">
<WeatherCard data={data} date={selectedDate} />
</main>
<div id='content'>
<TimeSelector date={selectedDate} dateChange={handleDate} momentChange={handleMoment}/>
<main className="main-content">
<WeatherCard data={data} date={selectedDate} />
</main>
</div>
</div>
);
}
Expand Down
7 changes: 5 additions & 2 deletions frontend/src/Header.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.header-container {
display: flex;
align-items: center;
justify-content: space-between;
justify-content: space-around;
padding: 1rem 2rem;
background-color: #f4f4f4;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
Expand All @@ -10,16 +10,17 @@

.select-container {
flex: 1;
max-width: 300px;
}

.select {
font-size: 1rem;
width: 60%;
}

.logo-container {
flex: 1;
text-align: center;
width: 53%;
}

.logo-container h2 {
Expand All @@ -32,6 +33,7 @@
.info-container {
flex: 1;
text-align: right;
width: 33%;
}

.city-name {
Expand All @@ -46,3 +48,4 @@
margin: 0;
color: #7f8c8d;
}

2 changes: 1 addition & 1 deletion frontend/src/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function Header({ cities, ville, cityChange, selectedDate }) {
<div className="logo-container">
<h2>Éco Météo</h2>
</div>
<div className="info-container">
<div className="info-container info">
<p className="city-name">{ville || 'Ville non sélectionnée'}</p>
<p className="date">{formattedDate}</p>
</div>
Expand Down

0 comments on commit 95ffffd

Please sign in to comment.