import React from 'react';
import Router from 'react-router';

const Root = React.createClass({
  statics: {

    /**
     * Get the list of pages that are renderable
     *
     * @returns {Array}
     */
    getPages() {
      return [
        'index.html',
        'introduction.html',
        'getting-started.html',
        'components.html'
      ];
    }
  },

  getDefaultProps() {
    return {
      assetBaseUrl: ''
    };
  },

  render() {
    // Dump out our current props to a global object via a script tag so
    // when initialising the browser environment we can bootstrap from the
    // same props as what each page was rendered with.
    let browserInitScriptObj = {
      __html:
        `window.INITIAL_PROPS = ${JSON.stringify(this.props)};
        // console noop shim for IE8/9
        (function (w) {
          var noop = function () {};
          if (!w.console) {
            w.console = {};
            ['log', 'info', 'warn', 'error'].forEach(function (method) {
              w.console[method] = noop;
            });
         }
        }(window));`
    };

    let head = {
      __html: `<title>React Bootstrap</title>
        <meta http-equiv='X-UA-Compatible' content='IE=edge' />
        <meta name='viewport' content='width=device-width, initial-scale=1.0' />
        <link href='${this.props.assetBaseUrl}/assets/bundle.css' rel='stylesheet' />
        <link href='${this.props.assetBaseUrl}/assets/favicon.ico' type='image/x-icon' rel='icon' />
        <!--[if lt IE 9]>
        <script src='https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js'></script>
        <script src='https://oss.maxcdn.com/respond/1.4.2/respond.min.js'></script>
        <script src='http://code.jquery.com/jquery-1.11.1.min.js'></script>
        <script src='http://cdnjs.cloudflare.com/ajax/libs/es5-shim/3.4.0/es5-shim.js'></script>
        <script src='http://cdnjs.cloudflare.com/ajax/libs/es5-shim/3.4.0/es5-sham.js'></script>
        <![endif]-->`
    };

    return (
      <html>
        <head dangerouslySetInnerHTML={head} />

        <body>
          <Router.RouteHandler />

          <script dangerouslySetInnerHTML={browserInitScriptObj} />
          <script src={`${this.props.assetBaseUrl}/assets/bundle.js`} />
        </body>
      </html>
    );
  }
});


export default Root;

@@ -1171,17 +1171,17 @@
 p-equiv=
-'
+%22
 X-UA-Com
@@ -1187,17 +1187,17 @@
 mpatible
-'
+%22
  content
@@ -1201,19 +1201,17 @@
 ent=
-'
+%22
 IE=edge
-' /
+%22
 %3E%0A  
@@ -1231,17 +1231,17 @@
 ame=
-'
+%22
 viewport
 ' co
@@ -1236,17 +1236,17 @@
 viewport
-'
+%22
  content
@@ -1246,17 +1246,17 @@
 content=
-'
+%22
 width=de
@@ -1284,19 +1284,17 @@
 cale=1.0
-' /
+%22
 %3E%0A      
@@ -1298,33 +1298,33 @@
      %3Clink href=
-'
+%22
 $%7Bthis.props.ass
@@ -1351,23 +1351,23 @@
 ndle.css
-'
+%22
  rel=
-'
+%22
 styleshe
@@ -1368,19 +1368,17 @@
 ylesheet
-' /
+%22
 %3E%0A      
@@ -1390,17 +1390,17 @@
 nk href=
-'
+%22
 $%7Bthis.p
@@ -1440,16 +1440,16 @@
 .ico
-'
+%22
  type=
-'
+%22
 imag
@@ -1460,22 +1460,20 @@
 icon
-'
+%22
  rel=
-'
+%22
 icon
-' /
+%22
 %3E%0A  
@@ -1508,33 +1508,33 @@
     %3Cscript src=
-'
+%22
 https://oss.maxc
@@ -1568,25 +1568,25 @@
 5shiv.min.js
-'
+%22
 %3E%3C/script%3E%0A 
@@ -1600,25 +1600,25 @@
 %3Cscript src=
-'
+%22
 https://oss.
@@ -1652,25 +1652,25 @@
 spond.min.js
-'
+%22
 %3E%3C/script%3E%0A 
@@ -1680,33 +1680,33 @@
     %3Cscript src=
-'
+%22
 http://code.jque
@@ -1732,17 +1732,17 @@
 1.min.js
-'
+%22
 %3E%3C/scrip
@@ -1756,33 +1756,33 @@
     %3Cscript src=
-'
+%22
 http://cdnjs.clo
@@ -1825,25 +1825,25 @@
 /es5-shim.js
-'
+%22
 %3E%3C/script%3E%0A 
@@ -1861,17 +1861,17 @@
 ipt src=
-'
+%22
 http://c
@@ -1926,17 +1926,17 @@
 -sham.js
-'
+%22
 %3E%3C/scrip

Fix single quote bugs for docs in production