initial commit
This commit is contained in:
commit
b710cfda80
98 changed files with 9669 additions and 0 deletions
32
layouts/partials/menu-filetree.html
Normal file
32
layouts/partials/menu-filetree.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
{{ $current := . }}
|
||||
{{ template "tree-nav" dict "sect" .Site.Home.Sections "current" $current }}
|
||||
|
||||
<!-- templates -->
|
||||
{{ define "tree-nav" }}
|
||||
{{ $current := .current }}
|
||||
|
||||
<ul class="gdoc-nav__list">
|
||||
{{ range .sect.GroupBy "Weight" "desc" }}
|
||||
{{ range .ByTitle }}
|
||||
|
||||
<li>
|
||||
{{ if or .Content .Params.ListOnly }}
|
||||
<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)) }}
|
||||
{{ if and (ne $numberOfPages 0) (not .Params.ListOnly) }}
|
||||
{{ template "tree-nav" dict "sect" .Pages "current" $current}}
|
||||
{{ end }}
|
||||
</li>
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue