2022-01-26 14:49:48 +01:00
|
|
|
<!-- Auto 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 (where .Site.Sections "Section" "in" $section) }}
|
2022-03-30 09:08:30 +02:00
|
|
|
{{ range .Sections.ByWeight.Reverse }}
|
2022-01-25 16:27:13 +01:00
|
|
|
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
|
|
|
<li class="mb-1">
|
|
|
|
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ md5 .Title }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}">
|
|
|
|
{{ .Title }}
|
|
|
|
</button>
|
|
|
|
<div class="collapse{{ if $active }} show{{ end }}" id="section-{{ md5 .Title }}">
|
|
|
|
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
|
|
|
|
{{ range .Pages }}
|
|
|
|
{{ if .IsNode }}
|
|
|
|
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
|
|
|
<li class="my-1 ms-3">
|
|
|
|
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ md5 .Title }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}">
|
|
|
|
{{ .Title }}
|
|
|
|
</button>
|
|
|
|
<div class="collapse{{ if $active }} show{{ end }}" id="section-{{ md5 .Title }}">
|
|
|
|
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
|
|
|
|
{{ range .Pages }}
|
|
|
|
{{ if .IsNode }}
|
|
|
|
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
|
|
|
<li class="my-1 ms-3">
|
|
|
|
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ md5 .Title }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}">
|
|
|
|
{{ .Title }}
|
|
|
|
</button>
|
|
|
|
<div class="collapse{{ if $active }} show{{ end }}" id="section-{{ md5 .Title }}">
|
|
|
|
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
|
|
|
|
{{ range .Pages }}
|
|
|
|
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
|
|
|
<li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .Permalink }}">{{ .Title }}</a></li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{{ else }}
|
|
|
|
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
|
|
|
<li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .Permalink }}">{{ .Title }}</a></li>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{{ else }}
|
|
|
|
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
|
|
|
<li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .Permalink }}">{{ .Title }}</a></li>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|