From a865b54d5ea182c037cef3ccae88618ee4ce0ca8 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Tue, 28 Jun 2016 20:02:19 -0700 Subject: [PATCH] Use typography-theme-wordpress-2016 as default theme --- components/ReadNext.js | 1 + css/styles.css | 20 -------------------- html.js | 3 ++- package.json | 1 + pages/_template.js | 12 +++++++++--- pages/index.js | 2 +- utils/typography.js | 8 ++------ wrappers/md.js | 2 +- 8 files changed, 17 insertions(+), 32 deletions(-) delete mode 100644 css/styles.css diff --git a/components/ReadNext.js b/components/ReadNext.js index 8ae095e..6e60ba3 100644 --- a/components/ReadNext.js +++ b/components/ReadNext.js @@ -39,6 +39,7 @@ class ReadNext extends React.Component {

diff --git a/css/styles.css b/css/styles.css deleted file mode 100644 index e0a1163..0000000 --- a/css/styles.css +++ /dev/null @@ -1,20 +0,0 @@ -body { - color: rgb(66,66,66); -} -h1,h2,h3,h4,h5,h6 { - color: rgb(44,44,44); -} -a { - color: rgb(42,93,173); - text-decoration: none; -} -a:hover { - text-decoration: underline; -} -blockquote { - padding-left: 16.875px; - border-left: 6px solid lightgray; - margin-left: 10.875px; - margin-right: 0; - padding-right: 0; -} diff --git a/html.js b/html.js index b91163f..99668ca 100644 --- a/html.js +++ b/html.js @@ -1,7 +1,7 @@ import React from 'react' import DocumentTitle from 'react-document-title' import { prefixLink } from 'gatsby-helpers' -import { TypographyStyle } from 'typography-react' +import { GoogleFont, TypographyStyle } from 'typography-react' import typography from './utils/typography' const BUILD_TIME = new Date().getTime() @@ -31,6 +31,7 @@ module.exports = React.createClass({ /> {title} + {css} diff --git a/package.json b/package.json index a550694..65e7b71 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "safe-access": "^0.1.0", "typography": "^0.10.2", "typography-react": "^0.10.3", + "typography-theme-wordpress-2016": "^0.10.0", "underscore.string": "^3.2.3" }, "devDependencies": { diff --git a/pages/_template.js b/pages/_template.js index a2d62c7..c60f836 100644 --- a/pages/_template.js +++ b/pages/_template.js @@ -5,8 +5,6 @@ import { prefixLink } from 'gatsby-helpers' import { rhythm, fontSizeToMS } from 'utils/typography' import { config } from 'config' -import '../css/styles.css' - class Template extends React.Component { render () { const { location, children } = this.props @@ -18,10 +16,12 @@ class Template extends React.Component { fontSize: fontSizeToMS(1.5).fontSize, lineHeight: fontSizeToMS(1.5).lineHeight, marginBottom: rhythm(1.5), + marginTop: 0, }} > +

- {title} + {title} ) } diff --git a/utils/typography.js b/utils/typography.js index bd28682..5af3ba6 100644 --- a/utils/typography.js +++ b/utils/typography.js @@ -1,11 +1,7 @@ import Typography from 'typography' +import Wordpress2016 from 'typography-theme-wordpress-2016' -const options = { - baseFontSize: '18px', - baseLineHeight: '27px', -} - -const typography = new Typography(options) +const typography = new Typography(Wordpress2016) // Hot reload typography in development. if (process.env.NODE_ENV !== 'production') { diff --git a/wrappers/md.js b/wrappers/md.js index aef6dac..c63c778 100644 --- a/wrappers/md.js +++ b/wrappers/md.js @@ -16,7 +16,7 @@ class MarkdownWrapper extends React.Component { return (
-

{post.title}

+

{post.title}