fix: update arrow logic collapsible sidebar

This commit is contained in:
Henk Verlinde 2021-06-17 14:05:36 +02:00
parent be952ca35c
commit 52e33eba69
1 changed files with 4 additions and 4 deletions

View File

@ -1,14 +1,14 @@
{{ if .Site.Params.options.collapsibleSidebar -}}
<ul class="list-unstyled collapsible-sidebar">
{{ $currentPage := . -}}
{{ range $index, $value := .Site.Menus.docs -}}
{{ range $index, $element := .Site.Menus.docs -}}
{{- $active := or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .) -}}
{{- $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="#{{ .Identifier }}" aria-expanded="{{ if not $index }}true{{ else }}false{{ end }}">
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#{{ .Identifier }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}">
{{ .Name }}
</button>
{{ if .HasChildren -}}
{{- $active := or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .) -}}
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
<div class="collapse{{ if $active }} show{{ end }}" id="{{ .Identifier }}">
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
{{ range .Children -}}