mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-26 06:44:35 +02:00
Simplify sidebar styles
This commit is contained in:
committed by
XhmikosR
parent
9efaeba35e
commit
4448856038
@@ -11,7 +11,7 @@
|
||||
|
||||
<div class="container-xl my-4">
|
||||
<div class="row flex-xl-nowrap">
|
||||
<div class="col-md-3 bd-sidebar">
|
||||
<div class="col-md-3">
|
||||
{{ partial "docs-sidebar" . }}
|
||||
</div>
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
{{- $url := split .Permalink "/" -}}
|
||||
{{- $page_slug := index $url (sub (len $url) 2) -}}
|
||||
|
||||
<ul class="list-unstyled">
|
||||
<ul class="list-unstyled mb-0">
|
||||
{{- range $group := .Site.Data.sidebar -}}
|
||||
{{- $link := $group.title -}}
|
||||
{{- $link_slug := $link | urlize -}}
|
||||
@@ -15,17 +15,16 @@
|
||||
{{- $group_slug := $group.title | urlize -}}
|
||||
{{- $active_group := eq $.Page.Params.group $group_slug }}
|
||||
|
||||
<li class="bd-sidenav-group my-1{{ if $active_group }} active{{ end }}{{ if $group.pages }} has-children{{ 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 }}>
|
||||
<li class="my-1{{ if $active_group }} active{{ end }}">
|
||||
<a class="{{ if not $active_group }} collapsed{{ end }}" 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 mb-2 collapse{{ if $active_group }} show{{ end }}" id="{{ $group_slug }}-collapse">
|
||||
<ul class="list-unstyled 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="bd-sidenav-active"{{ end }}>
|
||||
<li>
|
||||
<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>
|
||||
@@ -37,8 +36,8 @@
|
||||
{{- end }}
|
||||
|
||||
<li class="my-3 mx-4 border-top"></li>
|
||||
<li class="bd-sidenav-group pl-3">
|
||||
<a class="d-inline-flex align-items-center bd-sidenav-group-link" href="/docs/{{ $.Site.Params.docs_version }}/migration/">
|
||||
<li{{ if eq $page_slug "migration" }} class="active"{{ end }}>
|
||||
<a href="/docs/{{ $.Site.Params.docs_version }}/migration/">
|
||||
Migration
|
||||
</a>
|
||||
</li>
|
||||
|
Reference in New Issue
Block a user