Permalink
Browse files

Added visual cue for highlighting current page in the navigation menu

  • Loading branch information...
1 parent 1201863 commit bd70645974538fc96a420ecf9eb99fddda9b358a @safwank committed Aug 26, 2012
Showing with 30 additions and 11 deletions.
  1. +7 −0 public/stylesheets/style.css
  2. +8 −1 public/stylesheets/style.styl
  3. +3 −1 routes/batchimport.js
  4. +3 −1 routes/reports.js
  5. +5 −4 routes/site.js
  6. +1 −1 views/layout.jade
  7. +3 −3 views/navigation.jade
@@ -352,3 +352,10 @@ tr.a-right td {
span.clickable {
cursor: pointer;
}
+body#home a#home span,
+body#import a#import span,
+body#reports a#reports span {
+ text-decoration: underline;
+ font-style: oblique;
+ font-weight: bold;
+}
@@ -308,4 +308,11 @@ hr
display: block
span.clickable
- cursor: pointer
+ cursor: pointer
+
+body#home a#home span,
+body#import a#import span,
+body#reports a#reports span
+ text-decoration: underline
+ font-style: oblique
+ font-weight: bold
View
@@ -6,5 +6,7 @@ exports.importCSVData = function(request, response, next) {
if (error) return next(error);
});
- response.render('batchimportstatus');
+ response.render('batchimportstatus', {
+ page: 'import'
+ });
};
View
@@ -3,7 +3,9 @@ var reports = require('../reports/reports'),
// GET /reports
exports.show = function(request, response, next) {
- response.render('reports');
+ response.render('reports', {
+ page: 'reports'
+ });
};
// GET /reports/:id
View
@@ -1,8 +1,9 @@
-
/*
* GET home page.
*/
-exports.index = function(req, res){
- res.render('index');
-};
+exports.index = function(req, res) {
+ res.render('index', {
+ page: 'home'
+ });
+};
View
@@ -3,7 +3,7 @@ html
head
title= title
link(rel='stylesheet', href='/stylesheets/style.css')
- body
+ body(id=page)
#layout
header
h1#logo
View
@@ -1,16 +1,16 @@
ul
li
- a(href='/')
+ a#home(href='/')
| Home
br
span Main page
li
- a(href='/batchimport')
+ a#import(href='/batchimport')
| Import
br
span Import data
li
- a(href='/reports')
+ a#reports(href='/reports')
| Reports
br
span Graphs and charts

0 comments on commit bd70645

Please sign in to comment.