1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
import React from 'react'
import { ThemeProvider } from 'emotion-theming'
import Helmet from 'react-helmet'
import { Global, css } from '@emotion/core'
import { Container } from './container'
const globalStyles = ({
colours,
transitions,
fontStack,
baseFontSize,
fontSizes,
lineHeight
}) => css`
h1 {
font-size: ${fontSizes.h1};
}
h2 {
font-size: ${fontSizes.h2};
}
h3 {
font-size: ${fontSizes.h3};
}
h4 {
font-size: ${fontSizes.h4};
}
*,
html,
body {
margin: 0;
padding: 0;
}
p,
a,
h1,
h2,
h3,
h4,
h5,
div,
button {
font-family: ${fontStack};
color: ${colours.main};
}
p,
li {
line-height: ${lineHeight};
}
li {
list-style-position: outside;
margin-left: 20px;
}
a {
border-bottom: 1px dotted;
text-decoration: none;
&: hover {
transition: ${transitions.hover};
}
}
body {
background: ${colours.background};
}
`
export const BaseLayout = ({ helmetData, children, height, theme }) => (
<ThemeProvider theme={theme}>
<Global styles={globalStyles} />
<Helmet {...helmetData}>
<html lang="en" />
</Helmet>
<Container height={height}>{children}</Container>
</ThemeProvider>
)
|