mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Making active parent in nav reflect when child is active page in docs
This commit is contained in:
parent
ef87dffb2f
commit
ac82fe32af
2 changed files with 5 additions and 1 deletions
|
@ -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 }}
|
||||
|
|
4
docs/static/static/css/styles.css
vendored
4
docs/static/static/css/styles.css
vendored
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue