2026-04-08 19:49:15 +02:00
|
|
|
{{- /* Custom pagination component.
|
2026-05-08 13:18:05 +02:00
|
|
|
Call as: {{ partial "pagination.html" .
|
|
|
|
|
}}
|
2026-04-08 19:49:15 +02:00
|
|
|
*/ -}}
|
|
|
|
|
{{- $paginator := .Paginator -}}
|
|
|
|
|
{{- if gt $paginator.TotalPages 1 -}}
|
2026-05-08 13:18:05 +02:00
|
|
|
<nav class="flex items-center justify-center gap-2 py-16" aria-label="Pagination">
|
|
|
|
|
{{- if $paginator.HasPrev -}}
|
|
|
|
|
<a
|
|
|
|
|
href="{{ $paginator.Prev.URL }}"
|
|
|
|
|
class="label border border-mist text-ash px-5 py-3 hover:border-gold hover:text-gold transition-all duration-300"
|
|
|
|
|
aria-label="Previous page"
|
|
|
|
|
>{{ partial "icon.html" "arrow-left" }} Prev</a
|
|
|
|
|
>
|
|
|
|
|
{{- end -}}
|
2026-04-08 19:49:15 +02:00
|
|
|
|
2026-05-08 13:18:05 +02:00
|
|
|
{{- range $paginator.Pagers -}}
|
|
|
|
|
<a
|
|
|
|
|
href="{{ .URL }}"
|
|
|
|
|
class="label border px-4 py-3 transition-all duration-300 {{ if eq . $paginator }}
|
|
|
|
|
border-gold text-gold
|
|
|
|
|
{{ else }}
|
|
|
|
|
border-mist text-ash hover:border-gold hover:text-gold
|
|
|
|
|
{{ end }}"
|
|
|
|
|
{{- if eq . $paginator }}aria-current="page"{{ end }}
|
|
|
|
|
>{{ .PageNumber }}</a
|
|
|
|
|
>
|
|
|
|
|
{{- end -}}
|
2026-04-08 19:49:15 +02:00
|
|
|
|
2026-05-08 13:18:05 +02:00
|
|
|
{{- if $paginator.HasNext -}}
|
|
|
|
|
<a
|
|
|
|
|
href="{{ $paginator.Next.URL }}"
|
|
|
|
|
class="label border border-mist text-ash px-5 py-3 hover:border-gold hover:text-gold transition-all duration-300"
|
|
|
|
|
aria-label="Next page"
|
|
|
|
|
>Next {{ partial "icon.html" "arrow-right" }}</a
|
|
|
|
|
>
|
|
|
|
|
{{- end -}}
|
2026-04-08 19:49:15 +02:00
|
|
|
|
2026-05-08 13:18:05 +02:00
|
|
|
</nav>
|
2026-04-08 19:49:15 +02:00
|
|
|
{{- end -}}
|