Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
2020-01-04 17:35:30 +01:00
parent e5fb01eea8
commit a0f1799114
51 changed files with 879 additions and 261 deletions

55
components/Layout.tsx Normal file
View File

@ -0,0 +1,55 @@
import React from 'react'
import Navbar from './Navbar'
import Menu from './Menu'
import Header from './Header'
import Footer from './Footer'
interface Props {
hasHeader?: boolean
headerChild?: JSX.Element
}
export default class Layout extends React.Component<Props, {}> {
constructor(props: Props) {
super(props)
}
render() {
return (
<div>
<Navbar>
<Menu />
</Navbar>
{this.props.hasHeader && this.props.headerChild ? (
<Header>{this.props.headerChild}</Header>
) : (
<Header />
)}
{this.props.children}
<Footer />
<style jsx>{`
div {
height: inherit;
width: inherit;
}
`}</style>
<style jsx global>{`
html {
height: 100%;
}
::selection {
background: #4285F4;
color: #FFF;
}
body {
height: calc(100% - 80px)
}
#root, #__next {
height: 100%;
width : 100%;
}
`}</style>
</div>
)
}
}