Navbar active class added depending on which URL you visit
This commit is contained in:
@ -1,5 +1,8 @@
|
||||
exports.index = function(req, res){
|
||||
res.render('index', { user: req.user });
|
||||
res.render('index', {
|
||||
user: req.user,
|
||||
title: 'Home'
|
||||
});
|
||||
};
|
||||
|
||||
exports.partials = function (req, res) {
|
||||
|
@ -9,11 +9,16 @@ exports.account = function(req, res) {
|
||||
};
|
||||
|
||||
exports.getLogin = function(req, res) {
|
||||
res.render('login', { user: req.user, message: req.session.messages });
|
||||
res.render('login', {
|
||||
title: 'Login',
|
||||
user: req.user,
|
||||
message: req.session.messages
|
||||
});
|
||||
};
|
||||
|
||||
exports.getSignup = function(req, res) {
|
||||
res.render('signup', {
|
||||
title: 'Create Account',
|
||||
user: req.user,
|
||||
message: req.session.messages
|
||||
});
|
||||
|
7705
public/css/flat-ui.css
Normal file
7705
public/css/flat-ui.css
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
!!! 5
|
||||
html(lang='en')
|
||||
doctype 5
|
||||
html
|
||||
head
|
||||
meta(charset='utf-8')
|
||||
meta(http-equiv='X-UA-Compatible', content='IE=edge')
|
||||
@ -21,19 +21,17 @@ html(lang='en')
|
||||
a.navbar-brand(href='/') Project name
|
||||
.collapse.navbar-collapse
|
||||
ul.nav.navbar-nav
|
||||
li.active
|
||||
li(class=title=='Home'?'active':undefined)
|
||||
a(href='/') Home
|
||||
li
|
||||
li(class=title=='About'?'active':undefined)
|
||||
a(href='#about') About
|
||||
li
|
||||
li(class=title=='Contact'?'active':undefined)
|
||||
a(href='#contact') Contact
|
||||
ul.nav.navbar-nav.navbar-right
|
||||
li
|
||||
li(class=title=='Login'?'active':undefined)
|
||||
a(href='/login') Login
|
||||
li
|
||||
li(class=title=='Create Account'?'active':undefined)
|
||||
a(href='/signup') Create Account
|
||||
|
||||
.container
|
||||
block content
|
||||
|
||||
script(src='/js/lib/jquery.js')
|
||||
script(src='/js/lib/jquery.js')
|
@ -12,7 +12,7 @@ block content
|
||||
.col-xs-6.col-sm-6.col-md-6
|
||||
a.btn.btn-lg.btn-primary.btn-block(href='#') Facebook
|
||||
.col-xs-6.col-sm-6.col-md-6
|
||||
a.btn.btn-lg.btn-info.btn-block(href='#') Google
|
||||
a.btn.btn-lg.btn-danger.btn-block(href='#') Google
|
||||
.login-or
|
||||
hr.hr-or
|
||||
span.span-or or
|
||||
@ -28,5 +28,5 @@ block content
|
||||
label
|
||||
input(type='checkbox')
|
||||
| Remember me
|
||||
button.btn.btn.btn-primary(type='submit')
|
||||
button.btn.btn.btn-success(type='submit')
|
||||
| Log In
|
Reference in New Issue
Block a user