mirror of
https://github.com/twbs/bootstrap.git
synced 2024-11-29 11:24:18 +01:00
docs(sidenav): use collapse components
This commit is contained in:
parent
74afe149c4
commit
5f58b3df2c
@ -16,12 +16,13 @@
|
||||
{{- $active_group := eq $.Page.Params.group $group_slug }}
|
||||
|
||||
<li class="bd-sidenav-group my-1{{ if $active_group }} active{{ end }} js-sidenav-group{{ if $group.pages }} has-children{{ end }}">
|
||||
<a class="d-inline-flex align-items-center bd-sidenav-group-link" href="/docs/{{ $.Site.Params.docs_version }}/{{ $group_slug }}/{{ if $group.pages }}{{ $link_slug }}/{{ end }}"{{ if $active_group }} aria-current="true"{{ end }}>
|
||||
<a class="d-inline-flex align-items-center bd-sidenav-group-link" data-toggle="collapse" href="#{{ $group_slug }}-collapse"
|
||||
role="button" aria-expanded="{{ $active_group }}"{{ if $active_group }} aria-current="true"{{ end }}>
|
||||
{{ $group.title }}
|
||||
</a>
|
||||
|
||||
{{- if $group.pages }}
|
||||
<ul class="nav bd-sidenav flex-column mb-2">
|
||||
<ul class="nav bd-sidenav flex-column mb-2 collapse{{ if $active_group }} show{{ end }}" id="{{ $group_slug }}-collapse">
|
||||
{{- range $doc := $group.pages -}}
|
||||
{{- $doc_slug := $doc.title | urlize }}
|
||||
<li{{ if and $active_group (eq $page_slug $doc_slug) }} class="active bd-sidenav-active"{{ end }}>
|
||||
|
Loading…
Reference in New Issue
Block a user