kestrelsnest-blog/themes/kestrel/layouts/partials/pagination.html

28 lines
674 B
HTML
Raw Permalink Normal View History

2022-12-03 19:26:48 +00:00
{{ with $.Paginator }}
{{ if gt .TotalPages 1 }}
<ul class="pagination">
{{ with .Prev }}
<li class="page-item">
<a class="page-link" href="{{ .URL }}">
{{ partial "icon.html" (dict "ctx" $ "name" "arrow-left") }}
</a>
</li>
{{ end }}
{{ range .Pagers }}
<li class="page-item{{ if eq .PageNumber $.Paginator.PageNumber }} active{{ end }}">
<a class="page-link" href="{{ .URL }}">
{{ .PageNumber }}
</a>
</li>
{{ end }}
{{ with .Next }}
<li class="page-item">
<a class="page-link" href="{{ .URL }}">
{{ partial "icon.html" (dict "ctx" $ "name" "arrow-right") }}
</a>
</li>
{{ end }}
</ul>
{{ end }}
{{ end }}