mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-05-25 11:33:44 +00:00
docs(sidenav): use class selector for active item
This commit is contained in:
parent
c0aa3a1e1e
commit
9efaeba35e
2 changed files with 4 additions and 4 deletions
|
|
@ -55,7 +55,7 @@
|
||||||
flex-flow: column nowrap;
|
flex-flow: column nowrap;
|
||||||
padding-left: 1.25rem;
|
padding-left: 1.25rem;
|
||||||
|
|
||||||
> li > a {
|
a {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: .25rem .5rem;
|
padding: .25rem .5rem;
|
||||||
@include font-size(.875rem);
|
@include font-size(.875rem);
|
||||||
|
|
@ -70,7 +70,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[aria-current="page"] {
|
.active {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: rgba($black, .85);
|
color: rgba($black, .85);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@
|
||||||
<ul class="nav bd-sidenav mb-2 collapse{{ if $active_group }} show{{ end }}" id="{{ $group_slug }}-collapse">
|
<ul class="nav bd-sidenav mb-2 collapse{{ if $active_group }} show{{ end }}" id="{{ $group_slug }}-collapse">
|
||||||
{{- range $doc := $group.pages -}}
|
{{- range $doc := $group.pages -}}
|
||||||
{{- $doc_slug := $doc.title | urlize }}
|
{{- $doc_slug := $doc.title | urlize }}
|
||||||
<li{{ if and $active_group (eq $page_slug $doc_slug) }} class="active bd-sidenav-active"{{ 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) }} aria-current="page"{{ 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 -}}
|
{{- $doc.title -}}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue