blob: 9e0d1549f7085e759ef6c8ddfdfb3262763932ca (
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
|
{{- if .Paginator -}}
<div class="flex flex-wrap justify-between">
<span>
{{- with .Paginator.Prev }}
<a href="{{ .URL }}" class="flex align-center">
<img src="{{ "svg/backward.svg" | relURL }}" class="book-icon" alt="Previous" />
</a>
{{ end }}
</span>
{{ if gt (len .Paginator.Pagers) 1 }}
<span class="flex gap">
{{- $currentPageNumber := .Paginator.PageNumber -}}
{{- range $pageIndex := (slice -2 -1 0 1 2) -}}
{{- with index $.Paginator.Pagers (add $currentPageNumber $pageIndex -1) -}}
<a {{if ne $currentPageNumber .PageNumber }}href="{{ .URL }}"{{end}}>{{ .PageNumber }}</a>
{{- end -}}
{{- end -}}
</span>
{{ end }}
<span>
{{- with .Paginator.Next }}
<a href="{{ .URL }}" class="flex align-center">
<img src="{{ "svg/forward.svg" | relURL }}" class="book-icon" alt="Next" />
</a>
{{ end }}
</span>
</div>
{{- end -}}
|
; all rights regarding Text and Data Mining (TDM) are reserved.