Skip to content

Commit

Permalink
Merge pull request #87 from Raistlfiren/hotfix-active
Browse files Browse the repository at this point in the history
Updated links to active state when selected...
  • Loading branch information
Raistlfiren authored Apr 11, 2017
2 parents 9a96a17 + 0835daa commit 877fa73
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 13 deletions.
3 changes: 3 additions & 0 deletions public/styles/partials/_layout.sass
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ h3
.btn
white-space: normal

.main-navigation .active > a
background-color: #333333

@media (max-width: 1330px)
.navbar-header
float: none
Expand Down
2 changes: 1 addition & 1 deletion routes/views/accounts/get/changEmail.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports = module.exports = function(req, res) {

// locals.section is used to set the currently selected
// item in the header navigation.
locals.section = 'changEmail';
locals.section = 'account';

locals.formData = req.body || {};

Expand Down
2 changes: 1 addition & 1 deletion routes/views/accounts/get/changePassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports = module.exports = function(req, res) {

// locals.section is used to set the currently selected
// item in the header navigation.
locals.section = 'changePassword';
locals.section = 'account';

locals.formData = req.body || {};

Expand Down
2 changes: 1 addition & 1 deletion routes/views/accounts/get/changeUsername.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports = module.exports = function(req, res) {

// locals.section is used to set the currently selected
// item in the header navigation.
locals.section = 'changeUsername';
locals.section = 'account';

locals.formData = req.body || {};

Expand Down
1 change: 1 addition & 0 deletions routes/views/accounts/get/connectSteam.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var flash = {};

exports = module.exports = function(req, res) {

locals.section = 'account';
var overallRes = res;

request.post({
Expand Down
2 changes: 1 addition & 1 deletion routes/views/accounts/get/linkSteam.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports = module.exports = function(req, res) {

// locals.section is used to set the currently selected
// item in the header navigation.
locals.section = 'linkSteam';
locals.section = 'account';

locals.formData = req.body || {};

Expand Down
2 changes: 1 addition & 1 deletion routes/views/accounts/get/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports = module.exports = function(req, res) {

// locals.section is used to set the currently selected
// item in the header navigation.
locals.section = 'register';
locals.section = 'account';

locals.formData = req.body || {};

Expand Down
2 changes: 1 addition & 1 deletion routes/views/accounts/get/resetPassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports = module.exports = function(req, res) {

// locals.section is used to set the currently selected
// item in the header navigation.
locals.section = 'resetPassword';
locals.section = 'account';

locals.formData = req.body || {};

Expand Down
2 changes: 1 addition & 1 deletion routes/views/blog.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports = module.exports = function(req, res) {
var locals = res.locals;

// Init locals
locals.section = 'blog';
locals.section = 'news';
locals.title = 'FAForever News';
locals.data = {
posts: []
Expand Down
2 changes: 1 addition & 1 deletion routes/views/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports = module.exports = function(req, res) {
var locals = res.locals;

// Set locals
locals.section = 'blog';
locals.section = 'news';
locals.filters = {
post: req.params.slug
};
Expand Down
10 changes: 5 additions & 5 deletions templates/layouts/default.pug
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ html
ul.main-navigation
li.mobile-nav-logo-wrapper: a(href="/", class="mobile-nav-logo")
img(src="/images/faf-logo.png")
li: a(href='/news')
li(class=(section == 'news' ? 'active' : null)): a(href='/news')
i.fa.fa-rss
span News
li: a(href='/competitive/tournaments')
li(class=(section == 'competitive' ? 'active' : null)): a(href='/competitive/tournaments')
i.fa.fa-trophy
span Competitive
li: a(href='/calendar')
li(class=(section == 'calendar' ? 'active' : null)): a(href='/calendar')
i.fa.fa-calendar
span Calendar
li: a(href='/contribution')
li(class=(section == 'contribution' ? 'active' : null)): a(href='/contribution')
i.fa.fa-heart
span Contribute
li.close-mobile-nav: button.toggle-nav
Expand All @@ -86,7 +86,7 @@ html
a(href='/client' class='nav-download-client')
i.fa.fa-download
span Download
li.dropdown
li(class=(section == 'account' ? 'active' : null)).dropdown
a.dropdown-toggle.nav-account-dropdown(href='#' data-toggle='dropdown' role='button')
i.fa.fa-user
// Update fontawesome, uncomment below.
Expand Down

0 comments on commit 877fa73

Please sign in to comment.