mirror of https://github.com/onweru/compose.git

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