lb-dk-2023/layouts/partials/pagination.html

27 lines
686 B
HTML
Raw Normal View History

2023-08-15 17:02:21 +02:00
{{ $pag := $.Paginator }}
{{ if gt $pag.TotalPages 1 }}
<nav aria-label="Page navigation" class="w-100">
<ul class="pagination justify-content-center pagination-lg">
{{ range $pag.Pagers }}
{{ if eq . $pag }}
<li class="page-item active">
<a class="page-link" href="{{ .URL }}">{{ .PageNumber }}</a>
</li>
{{ else }}
<li class="page-item">
<a class="page-link" href="{{ .URL }}">{{ .PageNumber }}</a>
</li>
{{ end }}
{{ end }}
{{ if $pag.HasNext }}
<li class="page-item">
<a class="page-link" href="{{ $pag.Next.URL }}" rel="next">
</a>
</li>
{{ end }}
</ul>
<!-- </nav> -->
</nav>
{{ end }}