shared-bulma-theme/layouts/partials/layout/pagination.html

27 lines
800 B
HTML
Executable file

{{ $paginator := .Paginator }}
<!-- If there's more than one page. -->
{{ if gt $paginator.TotalPages 1 }}
<div class="section">
<div class="container">
<nav class="pagination is-right" role="navigation" aria-label="pagination">
{{ if $paginator.HasPrev }}
<a class="pagination-previous" href="{{ $paginator.Prev.URL }}">Previous Page</a>
{{ end }}
{{ if $paginator.HasNext }}
<a class="pagination-next" href="{{ $paginator.Next.URL }}">Next Page</a>
{{ end }}
<ul class="pagination-list">
{{ range $paginator.Pagers }}
<li>
<a class="pagination-link" aria-label="Goto page {{ .PageNumber}}" href="{{ .URL }}">{{ .PageNumber }}</a>
</li>
{{ end }}
</ul>
</nav>
</div>
</div>
{{ end }}