-
-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add again files to fix casing
- Loading branch information
Showing
3 changed files
with
181 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
/** @jsx jsx */ | ||
import { jsx, ThemeProvider } from "theme-ui" | ||
import PropTypes from "prop-types" | ||
import { Global } from "@emotion/core" | ||
|
||
import theme from "../theme" | ||
|
||
import "modern-normalize/modern-normalize.css" | ||
import "typeface-nunito" | ||
console.log(theme) | ||
const Layout = ({ children }) => { | ||
return ( | ||
<ThemeProvider theme={theme}> | ||
<Global | ||
styles={theme => ({ | ||
html: { | ||
WebkitFontSmoothing: "antialiased", | ||
MozOsxFontSmoothing: "grayscale", | ||
fontSize: "62.5%", | ||
}, | ||
body: { | ||
fontSize: theme.fontSizes.body, | ||
fontFamily: theme.fonts.body, | ||
fontWeight: theme.fontWeights.body, | ||
lineHeight: theme.lineHeights.body, | ||
color: theme.colors.body, | ||
}, | ||
"b, strong": { | ||
fontWeight: 700, | ||
}, | ||
a: { | ||
textDecoration: "none", | ||
textTransform: "uppercase", | ||
color: theme.colors.primary, | ||
"&:hover": { | ||
textDecoration: "underline", | ||
}, | ||
}, | ||
"button, a": { | ||
transition: "all 150ms", | ||
}, | ||
img: { | ||
maxWidth: "100%", | ||
}, | ||
"h1, h2, h3": { | ||
fontWeight: theme.fontWeights.heading, | ||
}, | ||
h3: { | ||
fontSize: theme.fontSizes[5], | ||
}, | ||
".simplebar-track .simplebar-scrollbar:before": { | ||
opacity: 1, | ||
backgroundImage: | ||
"linear-gradient(-131deg, #E7B02B 0%, #C13E51 100%)", | ||
}, | ||
})} | ||
/> | ||
<div | ||
sx={{ | ||
display: "flex", | ||
flexDirection: "column", | ||
margin: `0 auto`, | ||
maxWidth: 960, | ||
padding: 4, | ||
height: "100vh", | ||
}} | ||
> | ||
<main | ||
sx={{ | ||
display: "flex", | ||
flexDirection: "column", | ||
flexGrow: 1, | ||
alignItems: "center", | ||
height: "100%", | ||
}} | ||
> | ||
{children} | ||
</main> | ||
<footer sx={{ mt: "auto" }}> | ||
Released under the MIT License Copyright © {new Date().getFullYear()}{" "} | ||
Adrien Denat Sponsored by <a href="https://www.gatsbyjs.org"></a> | ||
</footer> | ||
</div> | ||
</ThemeProvider> | ||
) | ||
} | ||
|
||
Layout.propTypes = { | ||
children: PropTypes.node.isRequired, | ||
} | ||
|
||
export default Layout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/** | ||
* SEO component that queries for data with | ||
* Gatsby's useStaticQuery React hook | ||
* | ||
* See: https://www.gatsbyjs.org/docs/use-static-query/ | ||
*/ | ||
|
||
import React from "react" | ||
import PropTypes from "prop-types" | ||
import Helmet from "react-helmet" | ||
import { useStaticQuery, graphql } from "gatsby" | ||
|
||
function SEO({ description, lang, meta, title }) { | ||
const { site } = useStaticQuery( | ||
graphql` | ||
query { | ||
site { | ||
siteMetadata { | ||
title | ||
description | ||
author | ||
} | ||
} | ||
} | ||
` | ||
) | ||
|
||
const metaDescription = description || site.siteMetadata.description | ||
|
||
return ( | ||
<Helmet | ||
htmlAttributes={{ | ||
lang, | ||
}} | ||
title={title} | ||
titleTemplate={`%s | ${site.siteMetadata.title}`} | ||
meta={[ | ||
{ | ||
name: `description`, | ||
content: metaDescription, | ||
}, | ||
{ | ||
property: `og:title`, | ||
content: title, | ||
}, | ||
{ | ||
property: `og:description`, | ||
content: metaDescription, | ||
}, | ||
{ | ||
property: `og:type`, | ||
content: `website`, | ||
}, | ||
{ | ||
name: `twitter:card`, | ||
content: `summary`, | ||
}, | ||
{ | ||
name: `twitter:creator`, | ||
content: site.siteMetadata.author, | ||
}, | ||
{ | ||
name: `twitter:title`, | ||
content: title, | ||
}, | ||
{ | ||
name: `twitter:description`, | ||
content: metaDescription, | ||
}, | ||
].concat(meta)} | ||
/> | ||
) | ||
} | ||
|
||
SEO.defaultProps = { | ||
lang: `en`, | ||
meta: [], | ||
description: ``, | ||
} | ||
|
||
SEO.propTypes = { | ||
description: PropTypes.string, | ||
lang: PropTypes.string, | ||
meta: PropTypes.arrayOf(PropTypes.object), | ||
title: PropTypes.string.isRequired, | ||
} | ||
|
||
export default SEO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters