Files: 1c565fd835e560d9649f1839715e501895e84f77 / components / page.js
1085 bytesRaw
1 | import Head from 'next/head'; |
2 | import { |
3 | node, |
4 | string |
5 | } from 'prop-types'; |
6 | |
7 | const Page = ({ children, pageTitle }) => ( |
8 | <div> |
9 | <Head> |
10 | <meta charSet="utf-8" /> |
11 | <meta httpEquiv="X-UA-Compatible" content="IE=edge" /> |
12 | <meta name="description" content="@romuloalves - Software Developer" /> |
13 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
14 | <link rel="icon" type="image/png" href="/static/favicon.png" /> |
15 | <title> |
16 | { `@romuloalves${pageTitle ? ` – ${pageTitle}` : ''}` } |
17 | </title> |
18 | </Head> |
19 | { children } |
20 | |
21 | <style jsx>{` |
22 | h2 { |
23 | font-size: 22pt; |
24 | } |
25 | `}</style> |
26 | |
27 | <style jsx global>{` |
28 | * { |
29 | border: none; |
30 | margin: 0; |
31 | padding: 0; |
32 | } |
33 | |
34 | body { |
35 | font-family: Menlo, Monaco, Consolas; |
36 | } |
37 | |
38 | a { |
39 | color: #000; |
40 | } |
41 | a:hover { |
42 | color: #81D4FA; |
43 | } |
44 | `}</style> |
45 | </div> |
46 | ); |
47 | |
48 | Page.propTypes = { |
49 | children: node.isRequired, |
50 | pageTitle: string |
51 | }; |
52 | |
53 | Page.defaultProps = { |
54 | pageTitle: '' |
55 | }; |
56 | |
57 | export default Page; |
Built with git-ssb-web