fix: update arrow logic collapsible sidebar
This commit is contained in:
parent
be952ca35c
commit
52e33eba69
|
@ -1,14 +1,14 @@
|
||||||
{{ if .Site.Params.options.collapsibleSidebar -}}
|
{{ if .Site.Params.options.collapsibleSidebar -}}
|
||||||
<ul class="list-unstyled collapsible-sidebar">
|
<ul class="list-unstyled collapsible-sidebar">
|
||||||
{{ $currentPage := . -}}
|
{{ $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">
|
<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 }}
|
{{ .Name }}
|
||||||
</button>
|
</button>
|
||||||
{{ if .HasChildren -}}
|
{{ 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 }}">
|
<div class="collapse{{ if $active }} show{{ end }}" id="{{ .Identifier }}">
|
||||||
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
|
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
|
||||||
{{ range .Children -}}
|
{{ range .Children -}}
|
||||||
|
|
Loading…
Reference in New Issue