2018-02-23 03:05:00 +01:00
|
|
|
module.exports = (helmet, html, preloadedState) => {
|
2018-02-21 17:05:41 +01:00
|
|
|
// take the html and preloadedState and return the full page
|
|
|
|
return `
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
|
|
|
|
<head>
|
2018-02-21 22:58:25 +01:00
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
2018-02-23 03:05:00 +01:00
|
|
|
<!--helmet-->
|
|
|
|
${helmet.title.toString()}
|
2018-02-23 08:36:37 +01:00
|
|
|
${helmet.meta.toString()}
|
2018-02-23 03:05:00 +01:00
|
|
|
${helmet.link.toString()}
|
|
|
|
<!--style sheets-->
|
2018-05-31 03:07:24 +02:00
|
|
|
<link rel="stylesheet" href="/bundle/style.css" type="text/css">
|
2018-02-21 17:05:41 +01:00
|
|
|
<!--google font-->
|
|
|
|
<link href="https://fonts.googleapis.com/css?family=Roboto:300" rel="stylesheet">
|
2018-10-08 21:51:09 +02:00
|
|
|
<link href="https://fonts.googleapis.com/css?family=Lora" rel="stylesheet">
|
2018-02-21 17:05:41 +01:00
|
|
|
</head>
|
2018-06-03 05:58:54 +02:00
|
|
|
<body>
|
|
|
|
<div id="react-app">${html}</div>
|
2018-02-21 17:05:41 +01:00
|
|
|
<script>
|
|
|
|
window.__PRELOADED_STATE__ = ${JSON.stringify(preloadedState).replace(/</g, '\\\u003c')}
|
|
|
|
</script>
|
2018-04-01 02:49:19 +02:00
|
|
|
<script src="/bundle/bundle.js"></script>
|
2018-02-21 17:05:41 +01:00
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
`;
|
|
|
|
};
|