1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-30 11:40:27 +02:00

new section

This commit is contained in:
Pomax
2016-01-22 17:43:40 -08:00
parent 819b628456
commit fc6fed2e0f
219 changed files with 29156 additions and 179 deletions

View File

@@ -5,15 +5,14 @@ var Link = ReactRouter.Link;
var sections = require("./sections");
var sectionPages = Object.keys(sections);
// LESS is automatically turned into CSS and bundled in:
require("../stylesheets/style.less");
var Navigation = React.createClass({
generateNavItem: function(name, entry) {
var Type = sections[name];
var title = Type.getDefaultProps().title;
var link = <a href={'#' + name}>{ title }</a>;
if (this.props.fullNav) { link = <Link to={(name!=="preface") ? name : "/"}>{title}</Link>; }
if (this.props.fullNav) {
link = <Link to={name}>{title}</Link>;
}
return <li key={name} data-number={entry}>{link}</li>;
},