blob: 4c1669eb4365ade8d5adda75d8f7ed237d067301 (
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
<paginator-navigation>
{{- with .Paginator -}}
{{ if and .HasPrev .First }}
<a
href="{{ .First.URL }}"
aria-label="First"
title="First"
role="button">
First
</a>
{{ else }}
<button
disabled
title="Disabled"
aria-label="First">
First
</button>
{{- end -}}
{{ with .Prev }}
<a
href="{{ .URL }}"
aria-label="Back"
title="Back"
role="button">
{{ safeHTML (readFile "static/icons/feather/arrow-left.svg") }}
Back
</a>
{{ else }}
<button
disabled
title="Disabled"
aria-label="Back">
{{ safeHTML (readFile "static/icons/feather/arrow-left.svg") }}
Back
</button>
{{- end -}}
{{
$hidden := (sub .TotalNumberOfElements
(sub (len $.Site.RegularPages) (len (where $.Site.Pages "Type" "page"))))
}}
{{ if .Next }}
<a
href="{{ .Next.URL }}"
aria-label="Next"
title="Next"
role="button">
Next
{{ safeHTML (readFile "static/icons/feather/arrow-right.svg") }}
</a>
{{ else }}
<button
disabled
title="Disabled"
aria-label="Next">
Next
{{ safeHTML (readFile "static/icons/feather/arrow-right.svg") }}
</button>
{{- end -}}
{{ if and .HasNext .Last }}
<a
href="{{ .Last.URL }}"
aria-label="Last"
title="Next"
role="button">
Last
</a>
{{ else }}
<button
disabled
title="Disabled"
aria-label="Last">
Last
</button>
{{- end -}}
{{ end }}
</paginator-navigation>
|