Files
website/layouts/partials/tree.html
T
Bjørn Erik Pedersen 7f3b633aa0 Convert site to Hugo (#8316)
This commit converts content and layout to use Hugo.
2018-05-05 09:00:51 -07:00

26 lines
873 B
HTML

{{ $section := . }}
<a class="item" data-title="{{ .LinkTitle }}" href="{{ .RelPermalink }}"></a>
{{ template "section-tree-nav-pages" . }}
{{ template "section-tree-nav" $section }}
{{ define "section-tree-nav" }}
{{ $sections := where .Sections ".Params.toc_hide" "!=" true }}
{{ range $sections }}
<div class="item" data-title="{{ .LinkTitle }}">
<div class="container">
{{ if ge (len .Content) 10 }}
{{/* The section page has content, so link to it. */}}
<a class="item" data-title="{{ .LinkTitle }}" href="{{ .RelPermalink }}"></a>
{{ end }}
{{ template "section-tree-nav-pages" . }}
{{ template "section-tree-nav" . }}
</div>
</div>
{{ end }}
{{ end }}
{{ define "section-tree-nav-pages" }}
{{ range where .Pages ".Params.toc_hide" "!=" true }}
<a class="item" data-title="{{ .LinkTitle }}" href="{{ .RelPermalink }}"></a>
{{ end }}
{{ end }}