aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/pagination.html
blob: 4c2d97f847d1057447fb65a3458b59eef3e88d21 (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
{{- with .Paginator -}}
  <paginator-navigation{{ if eq .TotalPages 1 }} hidden {{ end }}>
    {{ if and .HasPrev .First }}
      <a
        href="{{ .First.URL }}"
        title="First"
      >
        First
      </a>
    {{ else }}
      <button
        data-invisible
        title="Disabled"
      >
        First
      </button>
    {{- end -}}

    {{ with .Prev }}
      <a
        rel="prev"
        title="Back"
        href="{{ .URL }}"
      >
        {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/arrow-left.svg")) }}
        Back
      </a>
    {{ else }}
      <button
        data-invisible
        title="Disabled"
      >
        {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/arrow-left.svg")) }}
        Back
      </button>
    {{- end -}}

    {{ if .Next }}
      <a
        rel="next"
        title="Next"
        href="{{ .Next.URL }}"
      >
        Next
        {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/arrow-right.svg")) }}
      </a>
    {{ else }}
      <button
        data-invisible
        title="Disabled"
      >
        Next
        {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/arrow-right.svg")) }}
      </button>
    {{- end -}}

    {{ if and .HasNext .Last }}
      <a
        href="{{ .Last.URL }}"
        title="Last"
      >
        Last
      </a>
    {{ else }}
      <button
        data-invisible
        title="Disabled"
      >
        Last
      </button>
    {{- end -}}
  </paginator-navigation>
{{ end }}