Skip to content

Commit

Permalink
styles changed Footer and Layout
Browse files Browse the repository at this point in the history
  • Loading branch information
NataliaNazarenko committed Oct 17, 2023
1 parent 3b6e2df commit 8a9542b
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/components/FooterBar/FooterBar.styled.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const Container = styled.div`
margin: 0 auto;
width: 100%;
max-width: 375px;
padding: 20px 50px;
display: flex;
Expand Down
13 changes: 4 additions & 9 deletions src/components/MainSection/MainSection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,10 @@ export const MainSection = () => {

return (
<>
<main>

<Hero>
<Text>Travel worry-free and in comfort</Text>

<Button onClick={handleNav}>Your Comfort Now</Button>
</Hero>

</main>
<Hero>
<Text>Travel worry-free and in comfort</Text>
<Button onClick={handleNav}>Your Comfort Now</Button>
</Hero>
</>
);
};
Expand Down
3 changes: 2 additions & 1 deletion src/components/MainSection/MainSection.styled.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const Container = styled.div`
}
`;


export const Hero = styled.div`
margin: 0 auto;
max-width: 1600px;
Expand All @@ -27,7 +28,7 @@ export const Hero = styled.div`
background-size: cover;
@media (min-width: 1440px) {
padding: 200px 0px;
height: 800px;
}
`;

Expand Down
18 changes: 11 additions & 7 deletions src/layout/Layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@ import { Outlet } from 'react-router-dom';
import { Suspense } from 'react';
import { FooterBar } from 'components/FooterBar';
import { HeaderBar } from 'components/HeaderBar';
// import { Main } from './Layout.styled';
import { Container, MainContent, Footer } from './Layout.styled';

export default function Layout() {
return (
<>
<Container>
<HeaderBar />
<main>
<Suspense fallback={<div>Loading...</div>}>
<Outlet />
</Suspense>
<MainContent>
<Suspense fallback={<div>Loading...</div>}>
<Outlet />
</Suspense>
</MainContent>
</main>
<FooterBar />
</>
<Footer>
<FooterBar />
</Footer>
</Container>
);
}
20 changes: 16 additions & 4 deletions src/layout/Layout.styled.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
import styled from '@emotion/styled';

export const Main = styled.main`
max-width: 960px;
margin: 0 auto;
padding: 0 16px;
export const Container = styled.div`
display: flex;
flex-direction: column;
min-height: 100vh;
`;

export const MainContent = styled.div`
flex-grow: 1;
`;

export const Footer = styled.footer`
margin-top: auto;
`;



0 comments on commit 8a9542b

Please sign in to comment.