feat: add section specific navigation bar
This commit is contained in:
parent
f7bb574a9b
commit
4162b7110c
|
@ -2,7 +2,7 @@
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-12 col-lg-10 col-xl-8">
|
<div class="col-md-12 col-lg-10 col-xl-8">
|
||||||
<article>
|
<article>
|
||||||
<h1 class="text-center">{{ .Title }}</h1>
|
<h1 class="text-center">{{ if eq .CurrentSection .FirstSection }}{{ .Section | humanize }}{{ else }}{{ .Title }}{{ end }}</h1>
|
||||||
<div class="text-center">{{ .Content }}</div>
|
<div class="text-center">{{ .Content }}</div>
|
||||||
<div class="card-list">
|
<div class="card-list">
|
||||||
{{ $currentSection := .CurrentSection }}
|
{{ $currentSection := .CurrentSection }}
|
||||||
|
|
|
@ -129,6 +129,25 @@
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
<div class="container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }}">
|
||||||
|
<aside class="doks-sidebar">
|
||||||
|
<nav id="doks-docs-nav" class="collapse d-lg-none" aria-label="Tertiary navigation">
|
||||||
|
{{ partial "sidebar/docs-menu.html" . }}
|
||||||
|
</nav>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ else -}}
|
||||||
|
<nav class="doks-subnavbar py-2 sticky-lg-top d-lg-none" aria-label="Secondary navigation">
|
||||||
|
<div class="container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }} d-flex align-items-md-center">
|
||||||
|
<span class="navbar-text ms-0">{{ .Section | humanize }}</span>
|
||||||
|
<button class="btn doks-sidebar-toggle d-lg-none ms-auto order-3 collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#doks-docs-nav" aria-controls="doks-docs-nav" aria-expanded="false" aria-label="Toggle documentation navigation">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="doks doks-expand" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><title>Expand</title><polyline points="7 13 12 18 17 13"></polyline><polyline points="7 6 12 11 17 6"></polyline></svg>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="doks doks-collapse" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><title>Collapse</title><polyline points="17 11 12 6 7 11"></polyline><polyline points="17 18 12 13 7 18"></polyline></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
<div class="container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }}">
|
<div class="container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }}">
|
||||||
<aside class="doks-sidebar">
|
<aside class="doks-sidebar">
|
||||||
<nav id="doks-docs-nav" class="collapse d-lg-none" aria-label="Tertiary navigation">
|
<nav id="doks-docs-nav" class="collapse d-lg-none" aria-label="Tertiary navigation">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{ with .Parent -}}
|
{{ with .Parent -}}
|
||||||
{{ partial "main/breadcrumb.html" . -}}
|
{{ partial "main/breadcrumb.html" . -}}
|
||||||
<li class="breadcrumb-item"><a href="{{ .RelPermalink }}">{{ if .IsHome }}Home{{ else }}{{ .Title }}{{ end }}</a></li>
|
<li class="breadcrumb-item"><a href="{{ .RelPermalink }}">{{ if .IsHome }}Home{{ else if eq .CurrentSection .FirstSection }}{{ .Section | humanize }}{{ else }}{{ .Title }}{{ end }}</a></li>
|
||||||
{{ end -}}
|
{{ end -}}
|
Loading…
Reference in New Issue