gatsby-starter-blog-forestry/html.js
2016-09-21 10:22:04 -07:00

39 lines
1.1 KiB
JavaScript

import React from 'react'
import DocumentTitle from 'react-document-title'
import { prefixLink } from 'gatsby-helpers'
import { GoogleFont, TypographyStyle } from 'react-typography'
import typography from './utils/typography'
import HTMLScripts from 'html-scripts'
import HTMLStyles from 'html-styles'
module.exports = React.createClass({
displayName: 'HTML',
propTypes: {
body: React.PropTypes.string,
},
render () {
const { body } = this.props
const title = DocumentTitle.rewind()
return (
<html lang="en">
<head>
<meta charSet="utf-8" />
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0"
/>
<title>{title}</title>
<TypographyStyle typography={typography} />
<GoogleFont typography={typography} />
<HTMLStyles />
</head>
<body className="landing-page">
<div id="react-mount" dangerouslySetInnerHTML={{ __html: body }} />
<HTMLScripts scripts={this.props.scripts} />
</body>
</html>
)
},
})