diff --git a/layouts/partials/nav-docs.html b/layouts/partials/nav-docs.html index c3b0656..764a27f 100644 --- a/layouts/partials/nav-docs.html +++ b/layouts/partials/nav-docs.html @@ -9,53 +9,44 @@ Skip menu {{ $currentPage := . }} {{ range .Site.Menus.docs }} - {{ if .HasChildren}} -
  • - + {{ $active := or ($currentPage.IsMenuCurrent "docs" .) (eq $currentPage.Section .Identifier)}} + {{ if .HasChildren }} +
    + {{ .Pre }} {{ .Name }} {{ .Post }} - +
    {{ else }}
  • - - {{ .Pre }} - {{ .Name }} - {{ .Post }} - -
  • - {{ end }} - {{ end }} - - - {{ else }} -
  • + class='{{- if $active }} active{{ end -}}'> {{ .Pre }} {{ .Name }} @@ -65,5 +56,18 @@ {{ end }} {{ end }} +
  • + {{ else }} +
  • + + {{ .Pre }} + {{ .Name }} + {{ .Post }} + +
  • + {{ end }} + {{ end }} + \ No newline at end of file