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) -}}
|
2022-03-25 14:15:18 +01:00
|
|
|
<li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
2022-01-25 16:27:13 +01:00
|
|
|
{{ 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) -}}
|
2022-03-25 14:15:18 +01:00
|
|
|
<li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
2022-01-25 16:27:13 +01:00
|
|
|
{{ 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) -}}
|
2022-03-25 14:15:18 +01:00
|
|
|
<li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
2022-01-25 16:27:13 +01:00
|
|
|
{{ end -}}
|
|
|
|
{{ end -}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{{ end -}}
|
|
|
|
</li>
|
|
|
|
{{ end -}}
|
2022-03-21 00:50:32 +01:00
|
|
|
</ul>
|