Making active parent in nav reflect when child is active page in docs

This commit is contained in:
spf13 2014-04-24 10:34:50 -06:00
parent ef87dffb2f
commit ac82fe32af
2 changed files with 5 additions and 1 deletions

View File

@ -16,7 +16,7 @@
{{ $currentNode := . }}
{{ range .Site.Menus.main }}
{{ if .HasChildren }}
<li class="dropdown{{if $currentNode.HasMenuCurrent "main" . }} active-child{{end}}">
<li class="dropdown{{if $currentNode.HasMenuCurrent "main" . }} active{{end}}">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{.Name}} <b class="caret"></b></a>
<ul class="dropdown-menu">
{{ range .Children }}

View File

@ -90,6 +90,10 @@ nav.navbar {
background-color: rgb(15, 166, 188);
}
.navbar-inverse .navbar-nav>.active>a, .navbar-inverse .navbar-nav>.active>a:hover, .navbar-inverse .navbar-nav>.active>a:focus {
background-color: rgb(15, 166, 188);
}
.dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus {
color: rgb(255, 255, 255);
text-decoration: none;