Skip to content

Commit

Permalink
chore: add again files to fix casing
Browse files Browse the repository at this point in the history
  • Loading branch information
Grsmto committed Oct 1, 2019
1 parent 8b2e573 commit be2537e
Show file tree
Hide file tree
Showing 3 changed files with 181 additions and 1 deletion.
92 changes: 92 additions & 0 deletions packages/website/src/components/Layout.js
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
88 changes: 88 additions & 0 deletions packages/website/src/components/SEO.js
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
2 changes: 1 addition & 1 deletion packages/website/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import SimpleBar from "simplebar-react"
import "simplebar/dist/simplebar.min.css"

import Layout from "../components/Layout"
import SEO from "../components/seo"
import SEO from "../components/SEO"
import List from "../components/List"

import LogoUrl from "../images/logo.svg"
Expand Down

0 comments on commit be2537e

Please sign in to comment.