mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-06 07:56:11 +02:00
refactor(containers): clean up container styling
This commit is contained in:
@@ -1,16 +1,4 @@
|
|||||||
import styled from "styled-components"
|
import styled from "styled-components"
|
||||||
|
|
||||||
export const ContainerWrapper = styled.div`
|
export const ContainerWrapper = styled.div`
|
||||||
display: flex;
|
`
|
||||||
flex-direction: column;
|
|
||||||
margin: 20px;
|
|
||||||
max-width: 800px;
|
|
||||||
|
|
||||||
& > :first-child {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > :last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
`
|
|
||||||
|
|||||||
@@ -2,9 +2,6 @@ import { Link } from "gatsby"
|
|||||||
import styled from "styled-components"
|
import styled from "styled-components"
|
||||||
|
|
||||||
export const FooterWrapper = styled.footer`
|
export const FooterWrapper = styled.footer`
|
||||||
max-width: 840px;
|
|
||||||
margin: auto auto;
|
|
||||||
|
|
||||||
& a {
|
& a {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ export function Header() {
|
|||||||
<Container>
|
<Container>
|
||||||
<SC.InnerWrapper>
|
<SC.InnerWrapper>
|
||||||
<SC.Logo src={logo} />
|
<SC.Logo src={logo} />
|
||||||
|
|
||||||
<SC.Menu>
|
<SC.Menu>
|
||||||
<MenuItem to="/about">about</MenuItem>
|
<MenuItem to="/about">about</MenuItem>
|
||||||
<MenuItem to="/rules">rules</MenuItem>
|
<MenuItem to="/rules">rules</MenuItem>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { Link } from "gatsby"
|
|||||||
import styled from "styled-components"
|
import styled from "styled-components"
|
||||||
|
|
||||||
export const HeaderWrapper = styled.header`
|
export const HeaderWrapper = styled.header`
|
||||||
margin: 0 auto 20px;
|
margin-bottom: 20px;
|
||||||
`
|
`
|
||||||
|
|
||||||
export const InnerWrapper = styled.div`
|
export const InnerWrapper = styled.div`
|
||||||
@@ -21,9 +21,8 @@ export const Logo = styled.img`
|
|||||||
export const Menu = styled.nav`
|
export const Menu = styled.nav`
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
justify-content: space-between;
|
justify-content: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
width: 100%;
|
|
||||||
`
|
`
|
||||||
|
|
||||||
export const MenuItem = styled(Link)`
|
export const MenuItem = styled(Link)`
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ export function Layout({ children }: PropsWithChildren<{}>) {
|
|||||||
{children}
|
{children}
|
||||||
</Container>
|
</Container>
|
||||||
</SC.MainContent>
|
</SC.MainContent>
|
||||||
|
<Footer />
|
||||||
</SC.Main>
|
</SC.Main>
|
||||||
<Footer />
|
|
||||||
</Scrollbar>
|
</Scrollbar>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,19 +3,12 @@ import styled from "styled-components"
|
|||||||
export const Main = styled.div`
|
export const Main = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin: 20px auto;
|
align-items: center;
|
||||||
width: 100%;
|
margin: 20px;
|
||||||
`
|
`
|
||||||
|
|
||||||
export const MainContent = styled.main`
|
export const MainContent = styled.main`
|
||||||
flex: 1 0 auto;
|
display: flex;
|
||||||
margin: 0 auto;
|
justify-content: center;
|
||||||
|
max-width: 800px;
|
||||||
& > :first-child {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > :last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
`
|
`
|
||||||
|
|||||||
Reference in New Issue
Block a user