summaryrefslogtreecommitdiff
path: root/layouts/partials/paginator.html
diff options
context:
space:
mode:
authorMiqdd <ahmadmiqdad27@te.student.pens.ac.id>2024-01-22 06:39:54 +0700
committerMiqdd <ahmadmiqdad27@te.student.pens.ac.id>2024-01-22 06:39:54 +0700
commit04fdcac1dce2cc439dd8ad1b115507671040737e (patch)
treefca0e8fa90c182863adf6a2baedadf8ebb46a5f4 /layouts/partials/paginator.html
Publish
Diffstat (limited to 'layouts/partials/paginator.html')
-rw-r--r--layouts/partials/paginator.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/layouts/partials/paginator.html b/layouts/partials/paginator.html
new file mode 100644
index 0000000..5acc06d
--- /dev/null
+++ b/layouts/partials/paginator.html
@@ -0,0 +1,15 @@
+{{ $pag := $.Paginator }}
+{{ if gt $pag.TotalPages 1 }}
+<ul class="pagination">
+ <span class="page-item page-prev">
+ {{ if $pag.HasPrev }}
+ <a {{ if $pag.HasPrev }}href="{{ $pag.Prev.URL }}"{{ end }} class="page-link" aria-label="Previous"><span aria-hidden="true">← Prev</span></a>
+ {{ end }}
+ </span>
+ <span class="page-item page-next">
+ {{ if $pag.HasNext }}
+ <a {{ if $pag.HasNext }}href="{{ $pag.Next.URL }}"{{ end }} class="page-link" aria-label="Next"><span aria-hidden="true">Next →</span></a>
+ {{ end }}
+ </span>
+</ul>
+{{ end }}