Complete refactor of sidenav

- Reduced DOM complexity
- Less styles overall
- Added an icon in the navbar to show version number
- Still needs an eslint ignore
pull/10616/head
Alex P 2017-06-22 16:30:28 -07:00
parent 5724aed904
commit 0f0805a2f0
3 changed files with 11 additions and 7 deletions

View File

@ -35,10 +35,6 @@ const NavHeader = React.createClass({
render() {
const {link, title, useAnchor} = this.props
if (!link) {
return <div className="sidebar-menu--heading">{title}</div>
}
// Some nav items, such as Logout, need to hit an external link rather
// than simply route to an internal page. Anchor tags serve that purpose.
return useAnchor

View File

@ -83,9 +83,16 @@ const SideNav = React.createClass({
/>
</NavBlock>
<div className="sidebar--bottom">
<NavBlock icon="heart">
<NavHeader title="Woogles" />
</NavBlock>
<div className="sidebar--item">
<div className="sidebar--square">
<span className="sidebar--icon icon zap" />
</div>
<div className="sidebar-menu">
<div className="sidebar-menu--heading">
Version: {VERSION}{/* eslint no-undef */}
</div>
</div>
</div>
{showLogout
? <NavBlock icon="user" className="sidebar--item-last">
<NavHeader

View File

@ -151,6 +151,7 @@ $sidebar-menu--gutter: 18px;
@include gradient-h($sidebar-menu--item-bg-hover,$sidebar-menu--item-bg-hover-accent);
color: $sidebar-menu--item-text-hover;
}
.sidebar-menu--heading,
.sidebar-menu--heading:link,
.sidebar-menu--heading:visited,
.sidebar-menu--heading:active,