Welcome to mirror list, hosted at ThFree Co, Russian Federation.

docs-menu.html « sidebar « partials « layouts - github.com/h-enk/doks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9180ab40c47b1b149c7815b16749c439563ba330 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
{{ $currentPage := . -}}
{{ range .Site.Menus.docs -}}
  <h3>{{ .Name }}</h3>
  {{ if .HasChildren -}}
  <ul class="list-unstyled">
    {{ range .Children -}}
      {{- $active := or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .) -}}
      {{- $active = or $active (eq .Name $currentPage.Title) -}}
      <li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL }}">{{ .Name }}</a></li>
    {{ end -}}
  </ul>
  {{ end -}}
{{ end -}}