2022-01-26 14:49:48 +01:00
|
|
|
<!-- Manual default section menu -->
|
2022-01-25 16:27:13 +01:00
|
|
|
{{ $currentPage := . -}}
|
2022-01-28 13:52:51 +01:00
|
|
|
{{ $section := $currentPage.Section -}}
|
|
|
|
{{ range (index .Site.Menus $section) -}}
|
2022-01-25 16:27:13 +01:00
|
|
|
<h3 class="h6 text-uppercase mb-2">{{ .Name }}</h3>
|
|
|
|
{{ if .HasChildren -}}
|
|
|
|
<ul class="list-unstyled">
|
|
|
|
{{ range .Children -}}
|
|
|
|
{{ if .HasChildren -}}
|
|
|
|
<h4 class="h6 text-uppercase ms-3 mt-3 mb-2">{{ .Name }}</h4>
|
|
|
|
{{ if .HasChildren -}}
|
|
|
|
<ul class="list-unstyled ms-3">
|
|
|
|
{{ range .Children -}}
|
|
|
|
{{ if .HasChildren -}}
|
|
|
|
<h5 class="h6 text-uppercase mt-2 mb-2">{{ .Name }}</h5>
|
|
|
|
{{ if .HasChildren -}}
|
|
|
|
<ul class="list-unstyled ms-3">
|
|
|
|
{{ range .Children -}}
|
2022-01-28 13:52:51 +01:00
|
|
|
{{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
|
2022-01-25 16:27:13 +01:00
|
|
|
{{- $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 -}}
|
|
|
|
{{ else -}}
|
2022-01-28 13:52:51 +01:00
|
|
|
{{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
|
2022-01-25 16:27:13 +01:00
|
|
|
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
|
|
|
|
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
|
|
|
{{ end -}}
|
|
|
|
{{ end -}}
|
|
|
|
</ul>
|
|
|
|
{{ end -}}
|
|
|
|
{{ else -}}
|
2022-01-28 13:52:51 +01:00
|
|
|
{{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
|
2022-01-25 16:27:13 +01:00
|
|
|
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
|
|
|
|
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
|
|
|
{{ end -}}
|
|
|
|
{{ end -}}
|
|
|
|
</ul>
|
|
|
|
{{ end -}}
|
|
|
|
{{ end -}}
|