mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
initial commit
This commit is contained in:
39
layouts/partials/pagination.html
Normal file
39
layouts/partials/pagination.html
Normal file
@@ -0,0 +1,39 @@
|
||||
{{ $paginator := .Paginator }}
|
||||
{{ if gt $paginator.TotalPages 1 }}
|
||||
<ul class="flex flex-row mt-8">
|
||||
{{ if $paginator.HasPrev }}
|
||||
<li>
|
||||
<a
|
||||
href="{{ $paginator.Prev.URL }}"
|
||||
class="mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
|
||||
rel="prev"
|
||||
>
|
||||
←
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ range $paginator.Pagers }}
|
||||
<li>
|
||||
<a
|
||||
href="{{ .URL }}"
|
||||
class="{{ if eq . $paginator }}
|
||||
bg-primary-200 dark:bg-primary-400 dark:text-neutral-800
|
||||
{{ end }} mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
|
||||
>
|
||||
{{ .PageNumber }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ if $paginator.HasNext }}
|
||||
<li>
|
||||
<a
|
||||
href="{{ $paginator.Next.URL }}"
|
||||
class="mx-1 block min-w-[1.8rem] rounded text-center hover:bg-primary-600 hover:text-neutral"
|
||||
rel="next"
|
||||
>
|
||||
→
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user