2020-01-12 06:33:02 -08:00
|
|
|
{{ $current := . }}
|
|
|
|
{{ template "tree-nav" dict "sect" .Site.Home.Sections "current" $current }}
|
|
|
|
|
|
|
|
<!-- templates -->
|
|
|
|
{{ define "tree-nav" }}
|
|
|
|
{{ $current := .current }}
|
|
|
|
|
|
|
|
<ul class="gdoc-nav__list">
|
2020-02-05 07:46:29 -08:00
|
|
|
{{ range .sect.GroupBy "Weight" }}
|
2020-01-12 06:33:02 -08:00
|
|
|
{{ range .ByTitle }}
|
2020-01-13 15:15:39 -08:00
|
|
|
{{ if not .Params.geekdocHidden }}
|
2020-01-12 06:33:02 -08:00
|
|
|
<li>
|
2020-01-13 15:15:39 -08:00
|
|
|
{{ if or .Content .Params.geekdocFlatSection }}
|
2020-01-12 06:33:02 -08:00
|
|
|
<span class="flex">
|
|
|
|
<a href="{{ .RelPermalink }}" class="gdoc-nav__entry {{ if eq $current . }}is-active{{ end }}">
|
|
|
|
{{ partial "title" . }}
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
{{ else }}
|
|
|
|
<span class="flex">{{ partial "title" . }}</span>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
|
2020-01-13 15:15:39 -08:00
|
|
|
{{ if and (ne $numberOfPages 0) (not .Params.geekdocFlatSection) }}
|
2020-01-12 06:33:02 -08:00
|
|
|
{{ template "tree-nav" dict "sect" .Pages "current" $current}}
|
|
|
|
{{ end }}
|
|
|
|
</li>
|
2020-01-13 15:15:39 -08:00
|
|
|
{{ end }}
|
2020-01-12 06:33:02 -08:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
{{ end }}
|