Skip to content

Commit

Permalink
Merge pull request thuliteio#378 from h-enk/collapsible-sidebar
Browse files Browse the repository at this point in the history
Make id unique collapsible sidebar
  • Loading branch information
h-enk authored Jul 6, 2021
2 parents 45d41b0 + df86721 commit f316f0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/sidebar/docs-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
{{- $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 $active }}true{{ else }}false{{ end }}">
<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="{{ .Identifier }}">
<div class="collapse{{ if $active }} show{{ end }}" id="section-{{ .Identifier }}">
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
{{ range .Children -}}
{{- $active := or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .) -}}
Expand Down

0 comments on commit f316f0a

Please sign in to comment.