in src/components/Layout/Layout.js [23:65]
render() {
const {children, location} = this.props;
// TODO - is there a better way to check if we need we have a sidebar?
let layoutHasSidebar = false;
if (
location.pathname.match(
/^\/(docs|tutorial|community|blog|contributing|warnings)/,
)
) {
layoutHasSidebar = true;
}
return (
<div
css={{
display: 'flex',
flexDirection: 'column',
minHeight: 'calc(100vh - 40px)',
}}
dir="rtl">
<Header location={location} />
<Flex
direction="column"
shrink="0"
grow="1"
valign="stretch"
css={{
flex: '1 0 auto',
marginTop: 60,
[media.between('medium', 'large')]: {
marginTop: 50,
},
[media.lessThan('medium')]: {
marginTop: 40,
},
}}>
{children}
</Flex>
<Footer layoutHasSidebar={layoutHasSidebar} />
</div>
);
}