diff options
author | Shubham Saini <me@ubh.sh> | 2023-02-09 00:19:28 +0000 |
---|---|---|
committer | Shubham Saini <me@ubh.sh> | 2023-02-09 00:19:28 +0000 |
commit | d7da16ecfa5cadb643df78694db44963ba665cbe (patch) | |
tree | 00c5234f542f7064e91827064767bcf59f094a2c /layouts/partials/paginator.html |
init
Diffstat (limited to 'layouts/partials/paginator.html')
-rwxr-xr-x | layouts/partials/paginator.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/layouts/partials/paginator.html b/layouts/partials/paginator.html new file mode 100755 index 0000000..5acc06d --- /dev/null +++ b/layouts/partials/paginator.html | |||
@@ -0,0 +1,15 @@ | |||
1 | {{ $pag := $.Paginator }} | ||
2 | {{ if gt $pag.TotalPages 1 }} | ||
3 | <ul class="pagination"> | ||
4 | <span class="page-item page-prev"> | ||
5 | {{ if $pag.HasPrev }} | ||
6 | <a {{ if $pag.HasPrev }}href="{{ $pag.Prev.URL }}"{{ end }} class="page-link" aria-label="Previous"><span aria-hidden="true">← Prev</span></a> | ||
7 | {{ end }} | ||
8 | </span> | ||
9 | <span class="page-item page-next"> | ||
10 | {{ if $pag.HasNext }} | ||
11 | <a {{ if $pag.HasNext }}href="{{ $pag.Next.URL }}"{{ end }} class="page-link" aria-label="Next"><span aria-hidden="true">Next →</span></a> | ||
12 | {{ end }} | ||
13 | </span> | ||
14 | </ul> | ||
15 | {{ end }} | ||