status-desktop/devuser_guide/layouts/partials/sidebar/api-menu.html

14 lines
492 B
HTML
Raw Normal View History

2021-05-21 15:38:31 +00:00
{{ $currentPage := . -}}
{{ range .Site.Menus.api -}}
<h3>{{ .Name }}</h3>
{{ if .HasChildren -}}
<ul class="list-unstyled">
{{ range .Children -}}
{{- $active := or ($currentPage.IsMenuCurrent "api" .) ($currentPage.HasMenuCurrent "api" .) -}}
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
{{ end -}}
</ul>
{{ end -}}
{{ end -}}