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 := . }} {{ $currentNode := . }}
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
{{ if .HasChildren }} {{ 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> <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{.Name}} <b class="caret"></b></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{{ range .Children }} {{ range .Children }}

View file

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