blob: affc6239a80f3252a04531cedf16a958367b3705 (
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 $pag.HasPrev }}class="pagination-enabled"{{ else }}class="pagination-disabled"{{ end }}>
<a {{ if $pag.HasPrev }}href="{{ .URL }}"{{ end }}>«</a>
</li>
{{ end -}}
{{- range $pag.Pagers -}}
<li {{ if eq . $pag }}class="pagination-active"{{ else }}class="pagination-enabled"{{ end }}>
<a href="{{ .URL }}">{{ .PageNumber }}</a>
</li>
{{- end }}
{{- with $pag.Last }}
<li {{ if $pag.HasNext }}class="pagination-enabled"{{ else }}class="pagination-disabled"{{ end }}>
<a {{ if $pag.HasNext }}href="{{ .URL }}"{{ end }}>»</a>
</li>
{{- end }}
</ul>
{{ end }}
|