diff options
author | tdro <tdro@noreply.example.com> | 2022-05-03 04:25:49 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-05-03 04:25:49 -0400 |
commit | e92dc018e28ba8d44f1c6cbc9fb0b779dec271e6 (patch) | |
tree | 3667043819ab91065019dfe3b4ff83ad625c2b49 /themes/default/layouts/partials/pagination.html | |
download | canory-e92dc018e28ba8d44f1c6cbc9fb0b779dec271e6.tar.gz canory-e92dc018e28ba8d44f1c6cbc9fb0b779dec271e6.tar.bz2 canory-e92dc018e28ba8d44f1c6cbc9fb0b779dec271e6.zip |
config.yaml: Commission
Diffstat (limited to 'themes/default/layouts/partials/pagination.html')
-rw-r--r-- | themes/default/layouts/partials/pagination.html | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/pagination.html b/themes/default/layouts/partials/pagination.html new file mode 100644 index 0000000..4c1669e --- /dev/null +++ b/themes/default/layouts/partials/pagination.html @@ -0,0 +1,83 @@ +<paginator-navigation> + {{- with .Paginator -}} + + {{ if and .HasPrev .First }} + <a + href="{{ .First.URL }}" + aria-label="First" + title="First" + role="button"> + First + </a> + {{ else }} + <button + disabled + title="Disabled" + aria-label="First"> + First + </button> + {{- end -}} + + {{ with .Prev }} + <a + href="{{ .URL }}" + aria-label="Back" + title="Back" + role="button"> + {{ safeHTML (readFile "static/icons/feather/arrow-left.svg") }} + Back + </a> + {{ else }} + <button + disabled + title="Disabled" + aria-label="Back"> + {{ safeHTML (readFile "static/icons/feather/arrow-left.svg") }} + Back + </button> + {{- end -}} + + {{ + $hidden := (sub .TotalNumberOfElements + (sub (len $.Site.RegularPages) (len (where $.Site.Pages "Type" "page")))) + }} + + + {{ if .Next }} + <a + href="{{ .Next.URL }}" + aria-label="Next" + title="Next" + role="button"> + Next + {{ safeHTML (readFile "static/icons/feather/arrow-right.svg") }} + </a> + {{ else }} + <button + disabled + title="Disabled" + aria-label="Next"> + Next + {{ safeHTML (readFile "static/icons/feather/arrow-right.svg") }} + </button> + {{- end -}} + + + {{ if and .HasNext .Last }} + <a + href="{{ .Last.URL }}" + aria-label="Last" + title="Next" + role="button"> + Last + </a> + {{ else }} + <button + disabled + title="Disabled" + aria-label="Last"> + Last + </button> + {{- end -}} + {{ end }} +</paginator-navigation> |