import React from 'react'
import Helmet from "react-helmet"

import { prefixLink } from 'gatsby-helpers'
import { TypographyStyle, GoogleFont } from 'react-typography'
import typography from './utils/typography'

const BUILD_TIME = new Date().getTime()

module.exports = React.createClass({
  propTypes () {
    return {
      body: React.PropTypes.string,
    }
  },
  render () {
    const head = Helmet.rewind()

    let css
    if (process.env.NODE_ENV === 'production') {
      css = <style dangerouslySetInnerHTML={{ __html: require('!raw!./public/styles.css') }} />
    }

    return (
      <html lang="en">
        <head>
          <meta charSet="utf-8" />
          <meta httpEquiv="X-UA-Compatible" content="IE=edge" />
          <meta name="viewport" content="initial-scale=1.0, width=device-width" />

          <link rel="icon" type="image/png" sizes="32x32" href={require("images/favicons/favicon-16x16.png?v=2")} />
          <link rel="icon" type="image/png" sizes="32x32" href={require("images/favicons/favicon-32x32.png?v=2")} />
          <link rel="icon" type="image/png" sizes="96x96" href={require("images/favicons/favicon-96x96.png?v=2")} />
          <link rel="icon" type="image/png" sizes="16x16" href={require("images/favicons/favicon.ico?v=2")} />
          <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css" />
          <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
          {head.title.toComponent()}
          {head.meta.toComponent()}
          <TypographyStyle typography={typography} />
          <GoogleFont typography={typography} />
          {css}
        </head>
        <body>
          <div id="react-mount" dangerouslySetInnerHTML={{ __html: this.props.body }} />
          <script src={prefixLink(`/bundle.js?t=${BUILD_TIME}`)} />
        </body>
      </html>
    )
  },
})

@@ -1277,32 +1277,33 @@
 %0A          %3C
+ 
 link rel
 =%22stylesheet
@@ -1282,33 +1282,35 @@
       %3C link rel
-=
+ = 
 %22stylesheet%22 hre
@@ -1297,38 +1297,50 @@
 l = %22stylesheet%22
+%0A         
  href
-=
+ = 
 %22https://maxcdn.
@@ -1370,14 +1370,13 @@
 rap/
-latest
+3.3.7
 /css
@@ -1388,32 +1388,33 @@
 strap.min.css%22 /
+ 
 %3E%0A          %3Clin

update bootstrap