repos / starfx

supercharged async flow control library.
git clone https://github.com/neurosnap/starfx.git

starfx / docs / tmpl
Eric Bower · 30 Jul 24

toc.partial.tmpl

 1{{define "toc"}}
 2<div class="sitemap-grid">
 3{{range .Sitemap.Children -}}
 4  {{if .Children}}
 5  <div class="box my">
 6      {{if .GenHref}}
 7        <h2 class="text-xl inline-block">
 8          <a href="{{.GenHref}}">{{.Text}}</a>
 9        </h2>
10      {{else}}
11        <h2 class="text-xl text-underline inline-block">
12          {{.Text}}
13        </h2>
14      {{end}}
15    </h2>
16    <ul class="list-none" style="padding-left: 0;">
17    {{range .Children -}}
18      <li>
19        <a href="{{.GenHref}}">{{.Text}}</a>
20
21        <ul class="list-disc" style="padding-left: 2rem;">
22        {{range .Children}}
23          <li>
24            <a href="{{.GenHref}}">{{.Text}}</a>
25          </li>
26        {{end}}
27        </ul>
28      </li>
29    {{- end}}
30    </ul>
31  </div>
32  {{end}}
33{{- end}}
34</div>
35{{end}}