mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
e164074f8e
* Added glamor css * Using pseudoclasses instead of calling functions * Updated readme using style instead of default import for css
17 lines
648 B
JavaScript
17 lines
648 B
JavaScript
import React from 'react'
|
|
import htmlescape from 'htmlescape'
|
|
|
|
export default ({ head, css, html, data, dev, staticMarkup }) => {
|
|
return <html>
|
|
<head>
|
|
{(head || []).map((h, i) => React.cloneElement(h, { key: i }))}
|
|
<style dangerouslySetInnerHTML={{ __html: css }} />
|
|
</head>
|
|
<body>
|
|
<div id='__next' dangerouslySetInnerHTML={{ __html: html }} />
|
|
{staticMarkup ? null : <script dangerouslySetInnerHTML={{ __html: '__NEXT_DATA__ = ' + htmlescape(data) }} />}
|
|
{staticMarkup ? null : <script type='text/javascript' src={dev ? '/_next/next-dev.bundle.js' : '/_next/next.bundle.js'} />}
|
|
</body>
|
|
</html>
|
|
}
|