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:
@@ -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>;
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user