blob: 6af5f1af1ff89b8703f0fe9904ee551ca1a5650b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<aside class="aside">
{{- template "tree" (dict "page" . "section" .FirstSection) }}
{{- define "tree" }}
{{- $section := .section }}
{{- $page := .page }}
{{- $permalink := $page.RelPermalink }}
<section class="section">
<h2 class="section_title{{ if eq $section.RelPermalink $permalink }} active{{ end }}"><a href="{{ $section.Permalink }}" class="group">{{ $section.Title }}</a></h2>
{{- $pages := $section.Pages }}
{{- with $pages }}
<section class="" id="docs-{{ anchorize $section.Title }}">
{{- range . }}
{{- if .IsPage }}
<h3 class="section_link{{ if eq .RelPermalink $permalink }} active{{ end }}"><a id="docs-{{ anchorize .Title }}" href="{{ .Permalink }}">{{ .Title }}</a></h3>
{{- if ne (print .TableOfContents) ""}}
{{- .TableOfContents }}
{{- end }}
{{- else }}
{{- template "tree" (dict "page" $page "section" .) }}
{{- end }}
{{- end }}
</section>
{{- end }}
</section>
{{- end }}
</aside>
|