|
|
@ -9,43 +9,39 @@ import LocaleSwitch from './LocaleSwitch'; |
|
|
|
|
|
|
|
const { Header, Content, Footer } = Layout; |
|
|
|
|
|
|
|
const StyledLayout = styled(Layout)` |
|
|
|
min-height: 100vh; |
|
|
|
`;
|
|
|
|
|
|
|
|
const StyledHeader = styled(Header)` |
|
|
|
padding: 0 16px; |
|
|
|
`;
|
|
|
|
|
|
|
|
const StyledLogo = styled.div` |
|
|
|
height: 64px; |
|
|
|
width: 120px; |
|
|
|
float: left; |
|
|
|
|
|
|
|
img { |
|
|
|
const Styled = { |
|
|
|
Layout: styled(Layout)` |
|
|
|
min-height: 100vh; |
|
|
|
`,
|
|
|
|
Header: styled(Header)` |
|
|
|
padding: 0 16px; |
|
|
|
`,
|
|
|
|
Logo: styled.div` |
|
|
|
height: 64px; |
|
|
|
width: 120px; |
|
|
|
float: left; |
|
|
|
`,
|
|
|
|
Image: styled.img` |
|
|
|
height: 16px; |
|
|
|
display: inline-block; |
|
|
|
vertical-align: middle; |
|
|
|
margin-right: 5px; |
|
|
|
} |
|
|
|
|
|
|
|
span { |
|
|
|
`,
|
|
|
|
Brand: styled.span` |
|
|
|
display: inline-block; |
|
|
|
color: #fff; |
|
|
|
font-weight: 600; |
|
|
|
font-size: 18px; |
|
|
|
vertical-align: middle; |
|
|
|
} |
|
|
|
`;
|
|
|
|
|
|
|
|
const StyledContent = styled(Content)` |
|
|
|
display: flex; |
|
|
|
`;
|
|
|
|
|
|
|
|
const StyledFooter = styled(Footer)` |
|
|
|
text-align: center; |
|
|
|
padding: 0 50px; |
|
|
|
`;
|
|
|
|
`,
|
|
|
|
Content: styled(Content)` |
|
|
|
display: flex; |
|
|
|
`,
|
|
|
|
Footer: styled(Footer)` |
|
|
|
text-align: center; |
|
|
|
padding: 0 50px; |
|
|
|
`,
|
|
|
|
}; |
|
|
|
|
|
|
|
interface Props { |
|
|
|
children: React.ReactNode; |
|
|
@ -53,21 +49,21 @@ interface Props { |
|
|
|
|
|
|
|
const AppLayout: React.FC<Props> = (props: Props) => { |
|
|
|
return ( |
|
|
|
<StyledLayout> |
|
|
|
<StyledHeader> |
|
|
|
<StyledLogo> |
|
|
|
<Styled.Layout> |
|
|
|
<Styled.Header> |
|
|
|
<Styled.Logo> |
|
|
|
<Link to={HOME}> |
|
|
|
<img src={logo} alt="logo" /> |
|
|
|
<span>Polar</span> |
|
|
|
<Styled.Image src={logo} alt="logo" /> |
|
|
|
<Styled.Brand>Polar</Styled.Brand> |
|
|
|
</Link> |
|
|
|
</StyledLogo> |
|
|
|
</Styled.Logo> |
|
|
|
<NavMenu /> |
|
|
|
</StyledHeader> |
|
|
|
<StyledContent>{props.children}</StyledContent> |
|
|
|
<StyledFooter> |
|
|
|
</Styled.Header> |
|
|
|
<Styled.Content>{props.children}</Styled.Content> |
|
|
|
<Styled.Footer> |
|
|
|
Polar © 2019 Fomo Bros <LocaleSwitch /> |
|
|
|
</StyledFooter> |
|
|
|
</StyledLayout> |
|
|
|
</Styled.Footer> |
|
|
|
</Styled.Layout> |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|