blob: 7220408d6040f745f9709ed254cbf70d3b16bf2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
{{- $pag := $.Paginator -}}
{{- if gt $pag.TotalPages 1 -}}
<ul class="pagination">
{{ with $pag.First -}}
<li{{ if not $pag.HasPrev }} class="pagination-disabled"{{ end }}>
<a {{ if $pag.HasPrev }}href="{{ .URL }}"{{ end }} aria-label="First"><span aria-hidden="true">«</span></a>
</li>
{{ end -}}
{{- range $pag.Pagers -}}
<li{{ if eq . $pag }} class="pagination-active"{{ end }}>
<a href="{{ .URL }}">{{ .PageNumber }}</a>
</li>
{{- end }}
{{- with $pag.Last }}
<li{{ if not $pag.HasNext }} class="pagination-disabled"{{ end }}>
<a {{ if $pag.HasNext }}href="{{ .URL }}"{{ end }} aria-label="Last"><span aria-hidden="true">»</span></a>
</li>
{{- end }}
</ul>
{{ end }}
|