blob: 90a930183f085c63046527d317ac5fa96e4593cc (
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
|
{{- define "styles" -}}
<style>
{{ partial "navigator.css.html" (dict "Link" "/") | safeCSS }}
{{ partial "tabbar.css.html" (dict "Context" . "Hash" "#drafts") | safeCSS }}
</style>
{{- end -}}
{{- define "header" -}}
{{- $author := .Section -}}
{{- $authors := where .Site.RegularPages "Section" $author -}}
{{- $drafts := where .Site.RegularPages "Draft" true -}}
{{- $filteredPages := $authors | intersect $drafts -}}
{{- $paginator := .Paginate $filteredPages -}}
{{- partial "navigator-middle.html"
(dict
"Context" .
"IconLabel" "Back"
"Id" "back"
"Title" "Drafts"
"Icon" "arrow-left"
"Subtitle" (print (partial "count-drafts.html" .) " " "Total")
"Href" (or (and (gt .Paginator.PageNumber 1) (.Paginator.Prev.URL | relURL)) ("" | relURL))
)
-}}
{{- partial "profile.html" . -}}
{{- end -}}
{{- define "middle" -}}
{{- range .Paginator.Pages -}}
{{- partial "render-embed.html" . -}}
{{- else -}}
<footer>
<code>No items found!</code>
</footer>
{{- end -}}
{{- end -}}
{{- define "footer" -}}
{{- partial "pagination.html" . -}}
{{- partial "footer.html" . -}}
{{- end -}}
{{- define "right" -}}
{{- partial "navigator-right.html" . -}}
{{- end -}}
|