Loading config/_default/params.toml +1 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ lastMod = false flexSearch = true darkMode = true bootStrapJs = true breadCrumb = false breadCrumb = true highLight = true kaTex = false collapsibleSidebar = true Loading layouts/partials/sidebar/docs-menu.html +57 −98 Original line number Diff line number Diff line <aside> <ul class="list-unstyled collapsible-sidebar"> {{ $currentPage := . }} {{ range .Site.Menus.docs }} {{ if .HasChildren }} <li class="{{ if $currentPage.HasMenuCurrent "docs" . }}active{{ end }}"> <a href="#"> {{ .Pre }} <span>{{ .Name }}</span> </a> </li> <ul class="sub-menu"> {{ range .Children }} {{ if .HasChildren }} <li class="{{ if $currentPage.HasMenuCurrent "docs" . }}active{{ end }}"> <a href="#"> {{ .Pre }} <span>{{ .Name }}</span> </a> </li> <ul class="sub-menu"> {{ range .Children }} {{ if .HasChildren }} <li class="{{ if $currentPage.HasMenuCurrent "docs" . }}active{{ end }}"> <a href="#"> {{ .Pre }} <span>{{ .Name }}</span> </a> </li> <ul class="sub-menu"> {{ range .Children }} <li class="{{ if $currentPage.IsMenuCurrent "docs" . }}active{{ end }}"> <a href="{{ .URL }}">{{ .Name }}</a> </li> {{ end }} </ul> {{ else }} <li> <a href="{{ .URL }}"> {{ .Pre }} <span>{{ .Name }}</span> </a> </li> {{ end }} {{ end }} </ul> {{ else }} <li> <a href="{{ .URL }}"> {{ .Pre }} <span>{{ .Name }}</span> </a> </li> {{ end }} {{ end }} </ul> {{ else }} <li> <a href="{{ .URL }}"> {{ .Pre }} <span>{{ .Name }}</span> </a> </li> {{ end }} {{ end }} </ul> </aside> <!-- {{ if .Site.Params.options.collapsibleSidebar -}} <ul class="list-unstyled collapsible-sidebar"> {{ $currentPage := . -}} Loading @@ -90,10 +12,48 @@ <div class="collapse{{ if $active }} show{{ end }}" id="section-{{ .Identifier }}"> <ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small"> {{ range .Children -}} {{ if .HasChildren -}} <li class="my-1 ms-3"> <button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ .Identifier }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}"> {{ .Name }} </button> {{ if .HasChildren -}} <div class="collapse{{ if $active }} show{{ end }}" id="section-{{ .Identifier }}"> <ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small"> {{ range .Children -}} {{ if .HasChildren -}} <li class="my-1 ms-3"> <button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ .Identifier }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}"> {{ .Name }} </button> {{ if .HasChildren -}} <div class="collapse{{ if $active }} show{{ end }}" id="section-{{ .Identifier }}"> <ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small"> {{ range .Children -}} {{- $active := or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .) -}} {{- $active = or $active (eq $currentPage.Section .Identifier) -}} <li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li> {{ end -}} </ul> </div> {{ end -}} </li> {{ else -}} {{- $active := or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .) -}} {{- $active = or $active (eq $currentPage.Section .Identifier) -}} <li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li> {{ end -}} {{ end -}} </ul> </div> {{ end -}} </li> {{ else -}} {{- $active := or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .) -}} {{- $active = or $active (eq $currentPage.Section .Identifier) -}} <li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li> {{ end -}} {{ end -}} </ul> </div> {{ end -}} Loading @@ -115,4 +75,3 @@ {{ end -}} {{ end -}} {{ end -}} --> Loading
config/_default/params.toml +1 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ lastMod = false flexSearch = true darkMode = true bootStrapJs = true breadCrumb = false breadCrumb = true highLight = true kaTex = false collapsibleSidebar = true Loading
layouts/partials/sidebar/docs-menu.html +57 −98 Original line number Diff line number Diff line <aside> <ul class="list-unstyled collapsible-sidebar"> {{ $currentPage := . }} {{ range .Site.Menus.docs }} {{ if .HasChildren }} <li class="{{ if $currentPage.HasMenuCurrent "docs" . }}active{{ end }}"> <a href="#"> {{ .Pre }} <span>{{ .Name }}</span> </a> </li> <ul class="sub-menu"> {{ range .Children }} {{ if .HasChildren }} <li class="{{ if $currentPage.HasMenuCurrent "docs" . }}active{{ end }}"> <a href="#"> {{ .Pre }} <span>{{ .Name }}</span> </a> </li> <ul class="sub-menu"> {{ range .Children }} {{ if .HasChildren }} <li class="{{ if $currentPage.HasMenuCurrent "docs" . }}active{{ end }}"> <a href="#"> {{ .Pre }} <span>{{ .Name }}</span> </a> </li> <ul class="sub-menu"> {{ range .Children }} <li class="{{ if $currentPage.IsMenuCurrent "docs" . }}active{{ end }}"> <a href="{{ .URL }}">{{ .Name }}</a> </li> {{ end }} </ul> {{ else }} <li> <a href="{{ .URL }}"> {{ .Pre }} <span>{{ .Name }}</span> </a> </li> {{ end }} {{ end }} </ul> {{ else }} <li> <a href="{{ .URL }}"> {{ .Pre }} <span>{{ .Name }}</span> </a> </li> {{ end }} {{ end }} </ul> {{ else }} <li> <a href="{{ .URL }}"> {{ .Pre }} <span>{{ .Name }}</span> </a> </li> {{ end }} {{ end }} </ul> </aside> <!-- {{ if .Site.Params.options.collapsibleSidebar -}} <ul class="list-unstyled collapsible-sidebar"> {{ $currentPage := . -}} Loading @@ -90,10 +12,48 @@ <div class="collapse{{ if $active }} show{{ end }}" id="section-{{ .Identifier }}"> <ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small"> {{ range .Children -}} {{ if .HasChildren -}} <li class="my-1 ms-3"> <button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ .Identifier }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}"> {{ .Name }} </button> {{ if .HasChildren -}} <div class="collapse{{ if $active }} show{{ end }}" id="section-{{ .Identifier }}"> <ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small"> {{ range .Children -}} {{ if .HasChildren -}} <li class="my-1 ms-3"> <button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ .Identifier }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}"> {{ .Name }} </button> {{ if .HasChildren -}} <div class="collapse{{ if $active }} show{{ end }}" id="section-{{ .Identifier }}"> <ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small"> {{ range .Children -}} {{- $active := or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .) -}} {{- $active = or $active (eq $currentPage.Section .Identifier) -}} <li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li> {{ end -}} </ul> </div> {{ end -}} </li> {{ else -}} {{- $active := or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .) -}} {{- $active = or $active (eq $currentPage.Section .Identifier) -}} <li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li> {{ end -}} {{ end -}} </ul> </div> {{ end -}} </li> {{ else -}} {{- $active := or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .) -}} {{- $active = or $active (eq $currentPage.Section .Identifier) -}} <li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li> {{ end -}} {{ end -}} </ul> </div> {{ end -}} Loading @@ -115,4 +75,3 @@ {{ end -}} {{ end -}} {{ end -}} -->