1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-30 16:50:00 +02:00

docs(sidenav): use class selector for active item

This commit is contained in:
Gaël Poupard
2020-03-12 17:20:26 +01:00
committed by XhmikosR
parent c0aa3a1e1e
commit 9efaeba35e
2 changed files with 4 additions and 4 deletions

View File

@@ -25,8 +25,8 @@
<ul class="nav bd-sidenav 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 }}>
<a href="/docs/{{ $.Site.Params.docs_version }}/{{ $group_slug }}/{{ $doc_slug }}/"{{ if and $active_group (eq $page_slug $doc_slug) }} aria-current="page"{{ end }}>
<li{{ if and $active_group (eq $page_slug $doc_slug) }} class="bd-sidenav-active"{{ end }}>
<a href="/docs/{{ $.Site.Params.docs_version }}/{{ $group_slug }}/{{ $doc_slug }}/"{{ if and $active_group (eq $page_slug $doc_slug) }} class="active" aria-current="page"{{ end }}>
{{- $doc.title -}}
</a>
</li>