-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #215 from pertrai1/header-navigation-icons
Header icons stay in place in desktop mode
- Loading branch information
Showing
4 changed files
with
124 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
import React, { Component, PropTypes } from "react"; | ||
import { Link } from "react-router"; | ||
|
||
// import "stylesheets/main.scss"; | ||
|
||
const links = { | ||
ballot: function (active) { | ||
var icon = "glyphicon glyphicon-list-alt glyphicon-line-adjustment font-footer_icon"; | ||
|
||
var jsx = | ||
<Link to="/ballot" className={ "navicon" + (active ? " active-icon" : "")}> | ||
<div className="col-xs-3 center-block text-center"> | ||
<span className={icon} title="Ballot"></span> | ||
<br/> | ||
<span className="text-center small device-small--hide"> | ||
Ballot | ||
</span> | ||
</div> | ||
</Link>; | ||
|
||
return jsx; | ||
}, | ||
|
||
/* className="badgeTotal badge">0</span> TODO badge should only show if positive number */ | ||
requests: function (active) { | ||
var icon = "glyphicon glyphicon-inbox glyphicon-line-adjustment font-footer_icon"; | ||
|
||
var jsx = | ||
<Link to="/requests" className={ "navicon" + (active ? " active-icon" : "")}> | ||
<div className="col-xs-3 center-block text-center"> | ||
<span className={icon} title="Requests"> | ||
</span> | ||
<br/> | ||
<span className="text-center small device-small--hide"> | ||
Requests | ||
</span> | ||
</div> | ||
</Link>; | ||
|
||
return jsx; | ||
}, | ||
|
||
connect: function (active) { | ||
var icon = "glyphicon icon-icon-connect-1-3 font-footer_icon"; | ||
|
||
var jsx = | ||
<Link to="/connect" className={ "navicon" + (active ? " active-icon" : "")}> | ||
<div className="col-xs-3 center-block text-center"> | ||
<span className={icon} title="Connect"></span> | ||
<br/> | ||
<span className="text-center small device-small--hide"> | ||
Connect | ||
</span> | ||
</div> | ||
</Link>; | ||
|
||
return jsx; | ||
}, | ||
|
||
activity: function (active) { | ||
var icon = "glyphicon icon-icon-activity-1-4 font-footer_icon"; | ||
|
||
var jsx = | ||
<Link to="/activity" className={ "navicon" + (active ? " active-icon" : "")}> | ||
<div className="col-xs-3 center-block text-center"> | ||
<span className={icon} title="Activity"></span> | ||
<br/> | ||
<span className="text-center small device-small--hide"> | ||
Activity | ||
</span> | ||
</div> | ||
</Link>; | ||
|
||
return jsx; | ||
} | ||
}; | ||
|
||
export default class Navigator extends Component { | ||
static propTypes = { | ||
pathname: PropTypes.string | ||
}; | ||
|
||
render () { | ||
var { props: { pathname } } = this; | ||
var { ballot, requests, connect, activity } = links; | ||
|
||
const navigator = | ||
<div className="navigator row"> | ||
<div className="container-fluid"> | ||
<div className="device-headericons--large"> | ||
<div className="container-fluid fluff-loose--top separate-top"> | ||
<div className="row"> | ||
{ballot(pathname === "/ballot")} | ||
{requests(pathname === "/requests")} | ||
{connect(pathname === "/connect")} | ||
{activity(pathname === "/activity")} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div>; | ||
|
||
return navigator; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters