aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/site/layouts/partials/docs-sidebar.html
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twbs/bootstrap/site/layouts/partials/docs-sidebar.html')
-rw-r--r--vendor/twbs/bootstrap/site/layouts/partials/docs-sidebar.html74
1 files changed, 37 insertions, 37 deletions
diff --git a/vendor/twbs/bootstrap/site/layouts/partials/docs-sidebar.html b/vendor/twbs/bootstrap/site/layouts/partials/docs-sidebar.html
index 2a8ef05ac..eec268ceb 100644
--- a/vendor/twbs/bootstrap/site/layouts/partials/docs-sidebar.html
+++ b/vendor/twbs/bootstrap/site/layouts/partials/docs-sidebar.html
@@ -1,45 +1,45 @@
-<form role="search" class="bd-search d-flex align-items-center">
- <input type="search" class="form-control" id="search-input" placeholder="Search..." aria-label="Search for..." autocomplete="off" data-docs-version="{{ .Site.Params.docs_version }}">
- <button class="btn bd-search-docs-toggle d-md-none p-0 ml-3" type="button" data-toggle="collapse" data-target="#bd-docs-nav" aria-controls="bd-docs-nav" aria-expanded="false" aria-label="Toggle docs navigation">
- {{ partial "icons/menu.svg" (dict "width" "30" "height" "30") }}
- </button>
-</form>
+<nav class="collapse bd-links" id="bd-docs-nav" aria-label="Docs navigation">
+ {{- $url := split .Permalink "/" -}}
+ {{- $page_slug := index $url (sub (len $url) 2) -}}
-<div class="collapse d-md-block row" id="bd-docs-nav">
- <nav class="bd-links" aria-label="Main navigation">
- {{- $url := split .Permalink "/" -}}
- {{- $page_slug := index $url (sub (len $url) 2) -}}
+ <ul class="list-unstyled mb-0 py-3 pt-md-1">
+ {{- range $group := .Site.Data.sidebar -}}
+ {{- $link := $group.title -}}
+ {{- $link_slug := $link | urlize -}}
- {{- range $group := .Site.Data.sidebar -}}
- {{- $link := $group.title -}}
- {{- $link_slug := $link | urlize -}}
+ {{- if $group.pages -}}
+ {{- $link = index $group.pages 0 -}}
+ {{- $link_slug = $link.title | urlize -}}
+ {{- end -}}
- {{- if $group.pages -}}
- {{- $link = index $group.pages 0 -}}
- {{- $link_slug = $link.title | urlize -}}
- {{- end -}}
+ {{- $group_slug := $group.title | urlize -}}
+ {{- $is_active_group := eq $.Page.Params.group $group_slug -}}
- {{- $group_slug := $group.title | urlize -}}
- {{- $is_active_group := eq $.Page.Params.group $group_slug }}
+ {{- 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>
- <div class="bd-toc-item{{ if $is_active_group }} active{{ end }}">
- <a class="bd-toc-link" href="/docs/{{ $.Site.Params.docs_version }}/{{ $group_slug }}/{{ if $group.pages }}{{ $link_slug }}/{{ end }}">
+ <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>
-
- {{- if and $is_active_group $group.pages }}
- <ul class="nav bd-sidenav">
- {{- range $doc := $group.pages -}}
- {{- $doc_slug := $doc.title | urlize }}
- <li{{ if and $is_active_group (eq $page_slug $doc_slug) }} class="active bd-sidenav-active"{{ end }}>
- <a href="/docs/{{ $.Site.Params.docs_version }}/{{ $group_slug }}/{{ $doc_slug }}/">
- {{- $doc.title -}}
- </a>
- </li>
- {{- end }}
- </ul>
- {{- end }}
- </div>
+ </li>
{{- end }}
- </nav>
-</div>
+ {{- end }}
+ </ul>
+</nav>