blob: d1170e1ca3247cf1f88a99e107d60555a728345b (
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
|
{{- $paginator := . }}
{{- if gt $paginator.TotalPages 1 }}
<nav class="pagination" aria-label="{{ lang.Translate "pagination.label" | default "Page navigation" }}">
{{- if $paginator.HasPrev }}
<a href="{{ $paginator.Prev.URL }}"
class="pagination__link"
rel="prev"
aria-label="{{ lang.Translate "pagination.previous_page" | default "Previous page" }}"
>
← {{ lang.Translate "common.previous" | default "Previous" }}
</a>
{{- end }}
<p class="pagination__current">
{{ lang.Translate "pagination.position" $paginator.PageNumber $paginator.TotalPages | default (printf "Page %d of %d" $paginator.PageNumber $paginator.TotalPages) }}
</p>
{{- if $paginator.HasNext }}
<a href="{{ $paginator.Next.URL }}"
class="pagination__link"
rel="next"
aria-label="{{ lang.Translate "pagination.next_page" | default "Next page" }}"
>
{{ lang.Translate "common.next" | default "Next" }} →
</a>
{{- end }}
</nav>
{{- end }}
|