aboutsummaryrefslogtreecommitdiff
path: root/layouts/docs/list.html
blob: f8d665a378f4c6983130102eb5977ccaa79dac9c (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
27
28
29
30
31
32
33
34
{{ define "main" }}
  <div>
    <h1 class="title" style="{{ if eq (len .Pages) 0 }}text-align: center;{{ end }}">
      {{ if .Params.heading }}{{ .Params.heading }}{{ else }}{{ .Title }}{{ end }}
    </h1>
    <p>{{ .Description }}</p>

    {{ .Content }}

    <ul class="range">
      {{ if ne (len .Sections) 0}}
        {{ range .Sections }}
          <li>
            <a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{ .Description }}
            <ul class="range">
              <!-- Show pages under this section (but not subsections) -->
              {{ range (union .Sections .Pages).ByWeight }}
                <li>
                  <a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{ .Description }}
                </li>
              {{ end }}
            </ul>
          </li>
        {{ end }}
      {{ else }}
        {{ range .RegularPages.ByWeight }}
          <li>
            <a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{ .Description }}
          </li>
        {{ end }}
      {{ end }}
    </ul>
  </div>
{{ end }}