blob: e45a0396217659e0cfbb1881bb090252cc0cfb9f (
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
{{ define "main" }}
{{- $isNotesRoot := .Parent.IsHome -}}
<article lang="{{ default "en" .Params.lang }}">
<header class="document-header">
<h1>{{ .Title }}</h1>
{{ partial "document-view.html" . }}
</header>
{{ .Content }}
{{- if $isNotesRoot }}
{{- 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.ByWeight }}
<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 }}
{{- with .RegularPages.ByWeight }}
<section aria-labelledby="series-articles-title">
<h2 id="series-articles-title">ARTICLES</h2>
<ol class="document-list series-chapter-list">
{{- range $index, $page := . }}
<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>
</section>
{{- end }}
{{- with .Sections.ByWeight }}
<section aria-labelledby="subseries-title">
<h2 id="subseries-title">SUBSERIES</h2>
<ol class="document-list series-chapter-list">
{{- range $index, $series := . }}
<li>
<span class="chapter-number">{{ printf "%02d" (add $index 1) }}</span>
<a href="{{ $series.RelPermalink }}" lang="{{ $series.Params.lang }}">{{ $series.LinkTitle }}/</a>{{ with $series.Params.description }} — {{ . }}{{ end }}
</li>
{{- end }}
</ol>
</section>
{{- end }}
{{- end }}
</article>
{{ end }}
|