2019-12-23 22:11:22 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const { Component } = require('inferno');
|
|
|
|
const Head = require('./common/head');
|
|
|
|
const Navbar = require('./common/navbar');
|
|
|
|
const Widgets = require('./common/widgets');
|
|
|
|
const Footer = require('./common/footer');
|
|
|
|
const Scripts = require('./common/scripts');
|
|
|
|
const Search = require('./common/search');
|
|
|
|
|
|
|
|
module.exports = class extends Component {
|
|
|
|
render() {
|
|
|
|
const { env, site, page, body } = this.props;
|
|
|
|
// TODO
|
|
|
|
const helper = {};
|
|
|
|
const config = {};
|
|
|
|
|
|
|
|
const language = page.lang || page.language || config.language;
|
|
|
|
const columnCount = Widgets.getColumnCount(config.widgets);
|
|
|
|
|
|
|
|
return <html lang={language ? language.substr(0, 2) : ''}>
|
|
|
|
<head>
|
|
|
|
<Head env={env} site={site} config={config} helper={helper} page={page} />
|
|
|
|
</head>
|
2019-12-23 22:35:21 +00:00
|
|
|
<body className={`is-${columnCount}-column`}>
|
2019-12-23 22:11:22 +00:00
|
|
|
<Navbar config={config} helper={helper} page={page} />
|
2019-12-23 22:35:21 +00:00
|
|
|
<section className="section">
|
|
|
|
<div className="container">
|
|
|
|
<div className="columns">
|
|
|
|
<div className={{
|
2019-12-23 22:11:22 +00:00
|
|
|
column: true,
|
|
|
|
'has-order-2': true,
|
|
|
|
'column-main': true,
|
|
|
|
'is-12': columnCount === 1,
|
|
|
|
'is-8-tablet is-8-desktop is-8-widescreen': columnCount === 2,
|
|
|
|
'is-8-tablet is-8-desktop is-6-widescreen': columnCount === 3
|
|
|
|
}} dangerouslySetInnerHTML={{ __html: body }}></div>
|
|
|
|
<Widgets site={site} config={config} helper={helper} page={page} position={'left'} />
|
|
|
|
<Widgets site={site} config={config} helper={helper} page={page} position={'right'} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<Footer config={config} helper={helper} />
|
|
|
|
<Scripts site={site} config={config} helper={helper} page={page} />
|
|
|
|
<Search config={config} helper={helper} />
|
|
|
|
</body>
|
|
|
|
</html>;
|
|
|
|
}
|
|
|
|
}
|