Skip to content

Commit

Permalink
Possible fix for #1116 - by default current page on nav bar will be h…
Browse files Browse the repository at this point in the history
…ave underlined text but this can be overridden by theme css to have bg colour instead
  • Loading branch information
FayCross committed Mar 9, 2023
1 parent 011358b commit 1a97a6b
Show file tree
Hide file tree
Showing 5 changed files with 251 additions and 146 deletions.
4 changes: 4 additions & 0 deletions modules/site/parent_templates/site/common/css/custom.css
Expand Up @@ -74,6 +74,10 @@ color: #6FD9D9;
color: #6FD9D9;
}

.navbar .nav > li.activePage > a {
text-decoration: underline;
}

.navbar-fixed-top {
position: static;
}
Expand Down
6 changes: 3 additions & 3 deletions modules/site/parent_templates/site/common/js/application.js
Expand Up @@ -1538,13 +1538,13 @@ function parseContent(pageRef, sectionNum, contentNum, addHistory) {
}
//assign active class for current navbar
$("#nav li").not(':first-child').each(function(i, el){
if ($(el).hasClass("active") && i !== activeIndex){
if ($(el).hasClass("activePage") && i !== activeIndex){
$(el)
.removeClass("active")
.removeClass("activePage")
.removeAttr("aria-current");
} else if (i == activeIndex){
$(el)
.addClass("active")
.addClass("activePage")
.attr("aria-current", "page");
}
})
Expand Down

0 comments on commit 1a97a6b

Please sign in to comment.