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

weru
31.34.2025 58b2d2b2cb07aecd69e2a538e6a3b550cd726b51
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
27
28
29
30
<aside class="aside menu">
  <div>
    <label class="aside_toggle toggle" title='{{ T "docs_menu" }}' role="button">{{ T "docs_menu" }} {{ partial "sprite" (dict "icon" "carly") }}</label>
  </div>
  {{- template "tree" (dict "page" . "section" .FirstSection)  }}
  {{- define "tree" }}
  {{- $section := .section }}
  {{- $page := .page }}
  {{- $permalink := $page.RelPermalink }}
  <section class="section aside_inner">
    <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>
        {{ $toc_id := printf "toc-%s" (replace (urlize .Title) "." "-") }}
        {{- if ne (print .TableOfContents) ""}}
          {{-  safeHTML (replace .TableOfContents "TableOfContents" $toc_id) }}
        {{- end }}
        {{- else }}
        {{- template "tree" (dict "page" $page "section" .) }}
        {{- end }}
        {{- end }}
      </section>
      {{- end }}
  </section>
  {{- end }}
</aside>