2019-12-23 22:11:22 +00:00
|
|
|
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');
|
2019-12-24 05:36:39 +00:00
|
|
|
const classname = require('./util/classname');
|
2019-12-23 22:11:22 +00:00
|
|
|
|
|
|
|
module.exports = class extends Component {
|
|
|
|
render() {
|
2019-12-24 05:36:39 +00:00
|
|
|
const { env, site, config, page, helper, body } = this.props;
|
2019-12-23 22:11:22 +00:00
|
|
|
|
|
|
|
const language = page.lang || page.language || config.language;
|
|
|
|
const columnCount = Widgets.getColumnCount(config.widgets);
|
|
|
|
|
|
|
|
return <html lang={language ? language.substr(0, 2) : ''}>
|
2019-12-24 16:12:08 +00:00
|
|
|
<Head env={env} site={site} config={config} helper={helper} page={page} />
|
2019-12-24 05:36:39 +00:00
|
|
|
<body class={`is-${columnCount}-column`}>
|
2019-12-23 22:11:22 +00:00
|
|
|
<Navbar config={config} helper={helper} page={page} />
|
2019-12-24 05:36:39 +00:00
|
|
|
<section class="section">
|
|
|
|
<div class="container">
|
|
|
|
<div class="columns">
|
|
|
|
<div class={classname({
|
2019-12-23 22:11:22 +00:00
|
|
|
column: true,
|
2019-12-29 06:07:07 +00:00
|
|
|
'order-2': true,
|
2019-12-23 22:11:22 +00:00
|
|
|
'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
|
2019-12-24 05:36:39 +00:00
|
|
|
})} dangerouslySetInnerHTML={{ __html: body }}></div>
|
2019-12-23 22:11:22 +00:00
|
|
|
<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>;
|
|
|
|
}
|
2019-12-24 05:36:39 +00:00
|
|
|
};
|