2022-01-26 14:49:48 +01:00
|
|
|
<!-- Manual collapsible section menu -->
|
2022-01-25 16:27:13 +01:00
|
|
|
<ul class="list-unstyled collapsible-sidebar">
|
|
|
|
{{ $currentPage := . -}}
|
2022-01-28 13:52:51 +01:00
|
|
|
{{ $section := $currentPage.Section -}}
|
|
|
|
{{ range (index .Site.Menus $section) -}}
|
|
|
|
{{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
|
2022-01-25 16:27:13 +01:00
|
|
|
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
|
|
|
|
<li class="mb-1">
|
|
|
|
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ .Identifier }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}">
|
|
|
|
{{ .Name }}
|
|
|
|
</button>
|
|
|
|
{{ if .HasChildren -}}
|
|
|
|
<div class="collapse{{ if $active }} show{{ end }}" id="section-{{ .Identifier }}">
|
|
|
|
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
|
|
|
|
{{ range .Children -}}
|
|
|
|
{{ if .HasChildren -}}
|
|
|
|
<li class="my-1 ms-3">
|
|
|
|
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ .Identifier }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}">
|
|
|
|
{{ .Name }}
|
|
|
|
</button>
|
|
|
|
{{ if .HasChildren -}}
|
|
|
|
<div class="collapse{{ if $active }} show{{ end }}" id="section-{{ .Identifier }}">
|
|
|
|
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
|
|
|
|
{{ range .Children -}}
|
|
|
|
{{ if .HasChildren -}}
|
|
|
|
<li class="my-1 ms-3">
|
|
|
|
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ .Identifier }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}">
|
|
|
|
{{ .Name }}
|
|
|
|
</button>
|
|
|
|
{{ if .HasChildren -}}
|
|
|
|
<div class="collapse{{ if $active }} show{{ end }}" id="section-{{ .Identifier }}">
|
|
|
|
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
|
|
|
|
{{ 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 rounded{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
|
|
|
{{ end -}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{{ end -}}
|
|
|
|
</li>
|
|
|
|
{{ 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 rounded{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
|
|
|
{{ end -}}
|
|
|
|
{{ end -}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{{ end -}}
|
|
|
|
</li>
|
|
|
|
{{ 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 rounded{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
|
|
|
{{ end -}}
|
|
|
|
{{ end -}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{{ end -}}
|
|
|
|
</li>
|
|
|
|
{{ end -}}
|
|
|
|
</ul>
|