2021-04-20 14:57:42 +02:00
{{ if .Site.Params.options.collapsibleSidebar -}}
< ul class = "list-unstyled collapsible-sidebar" >
{{ $currentPage := . -}}
{{ range $index, $value := .Site.Menus.docs -}}
< li class = "mb-1" >
< button class = "btn btn-toggle align-items-center rounded collapsed" data-bs-toggle = "collapse" data-bs-target = "#{{ .Identifier }}" aria-expanded = "{{ if not $index }}true{{ else }}false{{ end }}" >
{{ .Name }}
< / button >
{{ if .HasChildren -}}
2020-04-15 15:48:16 +02:00
{{- $active := or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .) -}}
2021-02-12 09:19:50 +01:00
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
2021-04-20 14:57:42 +02:00
< div class = "collapse{{ if $active }} show{{ end }}" id = "{{ .Identifier }}" >
< ul class = "btn-toggle-nav list-unstyled fw-normal pb-1 small" >
{{ range .Children -}}
{{- $active := or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .) -}}
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
< li > < a class = "link-dark rounded{{ if $active }} active{{ end }}" href = "{{ .URL | relURL }}" > {{ .Name }}< / a > < / li >
{{ end -}}
< / ul >
< / div >
{{ end -}}
< / li >
{{ end -}}
2020-04-15 15:48:16 +02:00
< / ul >
2021-04-20 14:57:42 +02:00
{{ else -}}
{{ $currentPage := . -}}
{{ range .Site.Menus.docs -}}
< h3 > {{ .Name }}< / h3 >
{{ if .HasChildren -}}
< ul class = "list-unstyled" >
{{ range .Children -}}
{{- $active := or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .) -}}
{{- $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 -}}
2020-04-15 15:48:16 +02:00
{{ end -}}
{{ end -}}