2021-08-11 05:28:33 +00:00
|
|
|
{{ $paginator := .Paginator }}
|
|
|
|
{{ if gt $paginator.TotalPages 1 }}
|
2021-08-16 00:41:00 +00:00
|
|
|
<ul class="flex flex-row mt-8">
|
2021-08-11 05:28:33 +00:00
|
|
|
{{ if $paginator.HasPrev }}
|
2021-08-16 00:41:00 +00:00
|
|
|
<li>
|
2021-08-11 05:28:33 +00:00
|
|
|
<a
|
|
|
|
href="{{ $paginator.Prev.URL }}"
|
2022-08-18 04:59:46 +00:00
|
|
|
class="mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
|
2021-08-11 05:28:33 +00:00
|
|
|
rel="prev"
|
|
|
|
>
|
|
|
|
←
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
{{ range $paginator.Pagers }}
|
2021-08-16 00:41:00 +00:00
|
|
|
<li>
|
|
|
|
<a
|
|
|
|
href="{{ .URL }}"
|
2022-08-18 04:59:46 +00:00
|
|
|
class="{{ if eq . $paginator }}
|
2021-08-20 07:02:08 +00:00
|
|
|
bg-primary-200 dark:bg-primary-400 dark:text-neutral-800
|
2022-08-18 04:59:46 +00:00
|
|
|
{{ end }} mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
|
2021-08-16 00:41:00 +00:00
|
|
|
>
|
|
|
|
{{ .PageNumber }}
|
|
|
|
</a>
|
2021-08-11 05:28:33 +00:00
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
{{ if $paginator.HasNext }}
|
2021-08-16 00:41:00 +00:00
|
|
|
<li>
|
2021-08-11 05:28:33 +00:00
|
|
|
<a
|
|
|
|
href="{{ $paginator.Next.URL }}"
|
2022-08-18 04:59:46 +00:00
|
|
|
class="mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
|
2021-08-11 05:28:33 +00:00
|
|
|
rel="next"
|
|
|
|
>
|
|
|
|
→
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
{{ end }}
|