diff options
| author | Patrick H. Lauke <[email protected]> | 2021-05-04 12:46:06 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-04 12:46:06 +0100 |
| commit | 8865a8ab1c7157ab81bf49afa62b75f36daee46d (patch) | |
| tree | 97ef78f2ea8e07aab50014176d061fe3c1d49134 /site/layouts/partials/docs-sidebar.html | |
| parent | 018ee6a3b50b958ddb49657086cd9168abf5a485 (diff) | |
| parent | 7ea6578773cb1b7f5cfb8fb41321b3fa10349daf (diff) | |
| download | bootstrap-jo-docs-thanks-page.tar.xz bootstrap-jo-docs-thanks-page.zip | |
Merge branch 'main' into jo-docs-thanks-pagejo-docs-thanks-page
Diffstat (limited to 'site/layouts/partials/docs-sidebar.html')
| -rw-r--r-- | site/layouts/partials/docs-sidebar.html | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/site/layouts/partials/docs-sidebar.html b/site/layouts/partials/docs-sidebar.html index 94acb4786..eec268ceb 100644 --- a/site/layouts/partials/docs-sidebar.html +++ b/site/layouts/partials/docs-sidebar.html @@ -13,33 +13,33 @@ {{- end -}} {{- $group_slug := $group.title | urlize -}} - {{- $is_active_group := eq $.Page.Params.group $group_slug }} + {{- $is_active_group := eq $.Page.Params.group $group_slug -}} - <li class="mb-1{{ if $is_active_group }} active{{ end }}"> - <button class="btn d-inline-flex align-items-center rounded{{ if not $is_active_group }} collapsed{{ end }}" data-bs-toggle="collapse" data-bs-target="#{{ $group_slug }}-collapse" aria-expanded="{{ $is_active_group }}"{{ if $is_active_group }} aria-current="true"{{ end }}> - {{ $group.title }} - </button> + {{- if $group.pages }} + <li class="mb-1"> + <button class="btn d-inline-flex align-items-center rounded{{ if not $is_active_group }} collapsed{{ end }}" data-bs-toggle="collapse" data-bs-target="#{{ $group_slug }}-collapse" aria-expanded="{{ $is_active_group }}"{{ if $is_active_group }} aria-current="true"{{ end }}> + {{ $group.title }} + </button> - {{- if $group.pages }} - <div class="collapse{{ if $is_active_group }} show{{ end }}" id="{{ $group_slug }}-collapse"> - <ul class="list-unstyled fw-normal pb-1 small"> - {{- range $doc := $group.pages -}} - {{- $doc_slug := $doc.title | urlize -}} - {{- $is_active := and $is_active_group (eq $page_slug $doc_slug) -}} - {{- $href := printf "/docs/%s/%s/%s/" $.Site.Params.docs_version $group_slug $doc_slug }} - <li><a href="{{ $href }}" class="d-inline-flex align-items-center rounded{{ if $is_active }} active{{ end }}"{{ if $is_active }} aria-current="page"{{ end }}>{{ $doc.title }}</a></li> - {{- end }} - </ul> - </div> - {{- end }} - </li> + <div class="collapse{{ if $is_active_group }} show{{ end }}" id="{{ $group_slug }}-collapse"> + <ul class="list-unstyled fw-normal pb-1 small"> + {{- range $doc := $group.pages -}} + {{- $doc_slug := $doc.title | urlize -}} + {{- $is_active := and $is_active_group (eq $page_slug $doc_slug) -}} + {{- $href := printf "/docs/%s/%s/%s/" $.Site.Params.docs_version $group_slug $doc_slug }} + <li><a href="{{ $href }}" class="d-inline-flex align-items-center rounded{{ if $is_active }} active{{ end }}"{{ if $is_active }} aria-current="page"{{ end }}>{{ $doc.title }}</a></li> + {{- end }} + </ul> + </div> + </li> + {{- else }} + <li class="my-3 mx-4 border-top"></li> + <li> + <a href="/docs/{{ $.Site.Params.docs_version }}/{{ $group_slug }}/" class="d-inline-flex align-items-center rounded{{ if $is_active_group }} active{{ end }}"{{ if $is_active_group }} aria-current="page"{{ end }}> + {{ $group.title }} + </a> + </li> + {{- end }} {{- end }} - - <li class="my-3 mx-4 border-top"></li> - <li{{ if eq $page_slug "migration" }} class="active"{{ end }}> - <a href="/docs/{{ $.Site.Params.docs_version }}/migration/" class="d-inline-flex align-items-center rounded"> - Migration - </a> - </li> </ul> </nav> |
