Archived
0

Web interface: еще немного стилистики для Navbar

This commit is contained in:
2017-03-12 01:01:43 +03:00
parent e97fef5c13
commit f3d1bfe8e6

View File

@@ -4,9 +4,19 @@ const nbsp = '\u00a0';
// -- Bootstrap -- //
var MainMenuItem = React.createClass({
render: function(){return(
ce('li', null, ce('a', {href: this.props.href}, this.props.title))
)}
render: function(){
var liActive = {}
var aText = this.props.title
if (this.props.active) {
liActive = {className: 'active'};
aText = [ce('span', {className: 'glyphicon glyphicon-menu-right'}), ' ', this.props.title];
}
return(
ce('li', liActive, ce('a', {href: this.props.href}, aText))
)
}
});
var Navbar = React.createClass({