mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-08-30 19:50:01 +02:00
dual rendering possible using --singles
This commit is contained in:
31
components/Page.jsx
Normal file
31
components/Page.jsx
Normal file
@@ -0,0 +1,31 @@
|
||||
var React = require("react");
|
||||
|
||||
var Ribbon = require("./Ribbon.jsx");
|
||||
var Header = require("./Header.jsx");
|
||||
var Relatives = require("./Relatives.jsx");
|
||||
var Navigation = require("./Navigation.jsx");
|
||||
var Footer = require("./Footer.jsx");
|
||||
|
||||
var Page = React.createClass({
|
||||
render: function() {
|
||||
var nav = <Navigation compact={this.props.compact}/>;
|
||||
var orderedContent = [nav].concat();
|
||||
if (this.props.compact) {
|
||||
orderedContent.splice(0,1);
|
||||
orderedContent.push(nav);
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<Ribbon/>
|
||||
<Header/>
|
||||
{nav}
|
||||
<Relatives prev={this.props.prev} next={this.props.next} position="before" />
|
||||
{this.props.content}
|
||||
<Relatives prev={this.props.prev} next={this.props.next} position="after" />
|
||||
<Footer/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = Page;
|
Reference in New Issue
Block a user