stream/src/layouts/InfoLayout/index.js

41 lines
902 B
JavaScript
Raw Normal View History

2021-10-12 12:45:52 +00:00
import { h } from 'preact'
import { bool } from 'prop-types'
2021-10-15 13:37:54 +00:00
import { Link } from 'react-router-dom'
2021-10-12 12:45:52 +00:00
2021-10-15 13:37:54 +00:00
import { H1 } from '../../components/Text'
2021-10-12 12:45:52 +00:00
import {
Wrapper,
Content,
Hero,
2021-10-15 13:37:54 +00:00
FadeTop,
PositionedLink,
2021-10-12 12:45:52 +00:00
} from './styles'
2021-10-15 13:37:54 +00:00
import Header from '../../components/Header'
import { ImageLogo } from '../../components/Logo'
2021-10-12 12:45:52 +00:00
2021-10-15 13:37:54 +00:00
const InfoLayout = ({ title, subtitle, image, children, theme }) => (
<Wrapper theme={theme}>
<PositionedLink to="/" theme={theme}>
<ImageLogo />
</PositionedLink>
<Content>
{children}
</Content>
<Hero image={image}>
<Header theme={{ foreground: theme.background, background: 'transparent', }} miniHeader />
<H1>{title}</H1>
<H1
css={`
2021-10-12 12:45:52 +00:00
max-width: 50%;
`}
2021-10-15 13:37:54 +00:00
>
{subtitle}
</H1>
<FadeTop colour={theme.foreground} />
</Hero>
</Wrapper>
)
2021-10-12 12:45:52 +00:00
export default InfoLayout