1
0
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:
Pomax
2016-01-16 17:57:16 -08:00
parent a346272dee
commit 819b628456
21 changed files with 4748 additions and 119 deletions

31
components/Page.jsx Normal file
View 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;