diff options
author | tdro <tdro@noreply.example.com> | 2022-06-19 22:53:43 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-06-19 22:53:43 -0400 |
commit | edb3ed2fd216e1498cc041b4d994af6d99a781d0 (patch) | |
tree | 92d837509b12dae9add4707a879827c5e2ebe2f3 /themes/default/layouts/partials/pagination.html | |
parent | bbbcd727f0ec79132c1ff0b889787c2650e19a4b (diff) | |
download | canory-edb3ed2fd216e1498cc041b4d994af6d99a781d0.tar.gz canory-edb3ed2fd216e1498cc041b4d994af6d99a781d0.tar.bz2 canory-edb3ed2fd216e1498cc041b4d994af6d99a781d0.zip |
themes/default/layouts/partials/pagination: Hide instead of using disabled fade
Diffstat (limited to 'themes/default/layouts/partials/pagination.html')
-rw-r--r-- | themes/default/layouts/partials/pagination.html | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/themes/default/layouts/partials/pagination.html b/themes/default/layouts/partials/pagination.html index 4c1669e..b9e377c 100644 --- a/themes/default/layouts/partials/pagination.html +++ b/themes/default/layouts/partials/pagination.html @@ -1,6 +1,5 @@ -<paginator-navigation> - {{- with .Paginator -}} - +{{- with .Paginator -}} + <paginator-navigation{{ if eq .TotalPages 1 }} hidden {{ end }}> {{ if and .HasPrev .First }} <a href="{{ .First.URL }}" @@ -11,7 +10,7 @@ </a> {{ else }} <button - disabled + data-invisible title="Disabled" aria-label="First"> First @@ -29,7 +28,7 @@ </a> {{ else }} <button - disabled + data-invisible title="Disabled" aria-label="Back"> {{ safeHTML (readFile "static/icons/feather/arrow-left.svg") }} @@ -37,12 +36,6 @@ </button> {{- end -}} - {{ - $hidden := (sub .TotalNumberOfElements - (sub (len $.Site.RegularPages) (len (where $.Site.Pages "Type" "page")))) - }} - - {{ if .Next }} <a href="{{ .Next.URL }}" @@ -54,7 +47,7 @@ </a> {{ else }} <button - disabled + data-invisible title="Disabled" aria-label="Next"> Next @@ -62,7 +55,6 @@ </button> {{- end -}} - {{ if and .HasNext .Last }} <a href="{{ .Last.URL }}" @@ -73,11 +65,11 @@ </a> {{ else }} <button - disabled + data-invisible title="Disabled" aria-label="Last"> Last </button> {{- end -}} - {{ end }} -</paginator-navigation> + </paginator-navigation> +{{ end }} |