Html.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /**
  2. * React Static Boilerplate
  3. * https://github.com/koistya/react-static-boilerplate
  4. * Copyright (c) Konstantin Tarkus (@koistya) | MIT license
  5. */
  6. import React, { Component, PropTypes } from 'react';
  7. import GoogleAnalytics from '../GoogleAnalytics';
  8. import { title, description } from '../../config';
  9. class Html extends Component {
  10. static propTypes = {
  11. title: PropTypes.string,
  12. description: PropTypes.string,
  13. body: PropTypes.string.isRequired,
  14. debug: PropTypes.bool.isRequired,
  15. };
  16. render() {
  17. return (
  18. <html className="no-js" lang="">
  19. <head>
  20. <meta charSet="utf-8" />
  21. <meta httpEquiv="X-UA-Compatible" content="IE=edge" />
  22. <title>{this.props.title || title}</title>
  23. <meta name="description" content={this.props.description || description} />
  24. <meta name="viewport" content="width=device-width, initial-scale=1" />
  25. <link rel="apple-touch-icon" href="apple-touch-icon.png" />
  26. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto" />
  27. <script src={'/app.js?' + new Date().getTime()}></script>
  28. </head>
  29. <body>
  30. <div id="app" dangerouslySetInnerHTML={{__html: this.props.body}} />
  31. <GoogleAnalytics />
  32. </body>
  33. </html>
  34. );
  35. }
  36. }
  37. export default Html;