2020-01-12 06:33:02 -08:00
|
|
|
{{ $current := . }}
|
2021-01-15 11:55:11 -08:00
|
|
|
{{ template "tree-navx" dict "sect" .Site.Home.Pages "current" $current }}
|
2020-01-12 06:33:02 -08:00
|
|
|
|
|
|
|
<!-- templates -->
|
2021-01-15 11:55:11 -08:00
|
|
|
{{ define "tree-navx" }}
|
2020-01-12 06:33:02 -08:00
|
|
|
{{ $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-11-11 02:48:25 -08:00
|
|
|
{{ if not .Params.GeekdocHidden }}
|
2020-11-16 13:47:50 -08:00
|
|
|
|
|
|
|
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
|
|
|
|
{{ $isParent := and (ne $numberOfPages 0) (not .Params.GeekdocFlatSection) }}
|
|
|
|
{{ $isCurrent := eq $current . }}
|
|
|
|
{{ $isAncestor := .IsAncestor $current }}
|
|
|
|
{{ $id := substr (sha1 .Permalink) 0 8 }}
|
|
|
|
|
2021-01-15 11:55:11 -08:00
|
|
|
{{ if .Content }}
|
2020-01-12 06:33:02 -08:00
|
|
|
<li>
|
2020-11-16 13:47:50 -08:00
|
|
|
{{ if and $isParent .Params.GeekdocCollapseSection }}
|
|
|
|
<input type="checkbox" id="{{ printf "navtree-%s" $id }}" class="gdoc-nav__toggle" {{ if or $isCurrent $isAncestor }}checked{{ end }}>
|
|
|
|
<label for="{{ printf "navtree-%s" $id }}" class="flex justify-between">
|
|
|
|
{{ end }}
|
2021-01-15 11:55:11 -08:00
|
|
|
<span class="flex">
|
|
|
|
<a href="{{ .RelPermalink }}" class="gdoc-nav__entry" style="font-weight:normal">
|
|
|
|
{{ partial "title" . }}
|
|
|
|
</a>
|
|
|
|
</span>
|
2020-11-16 13:47:50 -08:00
|
|
|
{{ if and $isParent .Params.GeekdocCollapseSection }}
|
2021-01-15 11:55:11 -08:00
|
|
|
<svg class="icon keyborad_arrow_left"><use xlink:href="#keyborad_arrow_right"></use></svg>
|
2020-11-16 13:47:50 -08:00
|
|
|
<svg class="icon keyborad_arrow_down hidden"><use xlink:href="#keyborad_arrow_down"></use></svg>
|
|
|
|
</label>
|
|
|
|
{{ end }}
|
2020-01-12 06:33:02 -08:00
|
|
|
|
2021-01-15 11:55:11 -08:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
2020-11-16 13:47:50 -08:00
|
|
|
{{ if $isParent }}
|
2021-01-15 11:55:11 -08:00
|
|
|
{{ template "tree-navx" dict "sect" .Pages "current" $current}}
|
2020-01-12 06:33:02 -08:00
|
|
|
{{ end }}
|
|
|
|
</li>
|
2020-01-13 15:15:39 -08:00
|
|
|
{{ end }}
|
2020-01-12 06:33:02 -08:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
{{ end }}
|