forked from cassidoo/next-netlify-blog-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Layout.js
72 lines (64 loc) · 1.7 KB
/
Layout.js
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
import Head from 'next/head'
import Header from './Header'
export default function Layout({ children, pageTitle, description, ...props }) {
return (
<>
<Head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charSet="utf-8" />
<meta name="Description" content={description}></meta>
<title>{pageTitle}</title>
</Head>
<style jsx global>{`
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;700;800;900&display=swap');
html,
body {
margin: 0;
padding: 0;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue',
sans-serif;
color: #445566;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: bold;
}
a {
color: #00a395;
}
.content {
padding: 2rem 20px;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
footer {
width: 100%;
height: 100px;
border-top: 1px solid #eaeaea;
display: flex;
justify-content: center;
align-items: center;
}
footer img {
padding: 0 5px;
height: 1rem;
}
`}</style>
<section className="layout">
<Header />
<div className="content">{children}</div>
</section>
<footer>
Built with <img src="/netliheart.svg" alt="Netlify Heart" /> for you
</footer>
</>
)
}