aboutsummaryrefslogtreecommitdiff
path: root/layouts/notes/list.html
blob: 86deddb5e886a69e9797da31831cb490091cabfc (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
35
36
37
38
39
40
41
{{ define "main" }}
  <article lang="{{ default "en" .Params.lang }}">
    <header class="document-header">
      <h1>{{ .Title }}</h1>
      {{ partial "document-view.html" . }}
    </header>
    {{ .Content }}
    {{- if eq .File.Path "notes/_index.md" }}
      {{- with .RegularPages.ByTitle }}
        <section aria-labelledby="standalone-title">
          <h2 id="standalone-title">STANDALONE NOTES</h2>
          <ul class="document-list">
            {{- range . }}
              <li><time datetime="{{ time.Format "2006-01-02" .Params.updated }}">{{ time.Format "2006-01-02" .Params.updated }}</time> <a href="{{ .RelPermalink }}" lang="{{ .Params.lang }}">{{ .LinkTitle }}</a></li>
            {{- end }}
          </ul>
        </section>
      {{- end }}
      {{- with .Sections.ByTitle }}
        <section aria-labelledby="series-title">
          <h2 id="series-title">SERIES</h2>
          <ul class="document-list">
            {{- range . }}
              <li><a href="{{ .RelPermalink }}" lang="{{ .Params.lang }}">{{ .LinkTitle }}</a>{{ with .Params.description }} — {{ . }}{{ end }}</li>
            {{- end }}
          </ul>
        </section>
      {{- end }}
    {{- else }}
      <ol class="document-list series-chapter-list">
        {{- range $index, $page := .RegularPages.ByWeight }}
          <li>
            <span class="chapter-number">{{ printf "%02d" (add $index 1) }}</span>
            <a href="{{ $page.RelPermalink }}" lang="{{ $page.Params.lang }}">{{ $page.LinkTitle }}</a>
            <span class="list-updated">updated {{ time.Format "2006-01-02" $page.Params.updated }}</span>
          </li>
        {{- end }}
      </ol>
    {{- end }}
  </article>
{{ end }}