hugo-tango-theme/layouts/partials/pagination.html

14 lines
739 B
HTML
Raw Normal View History

2018-01-11 09:16:05 +04:00
{{ $pag := $.Paginator }} {{ if gt $pag.TotalPages 1 }}
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
2018-01-13 03:38:00 +04:00
<a href="{{ if $pag.HasPrev }}{{ $pag.Prev.URL }}{{ end }}" class="pagination-previous" {{ if not $pag.HasPrev }}disabled{{ end }}></a>
<a href="{{ if $pag.HasNext }}{{ $pag.Next.URL }}{{ end }}" class="pagination-next" {{ if not $pag.HasNext }}disabled{{ end }}></a>
2018-01-11 09:16:05 +04:00
<ul class="pagination-list">
{{ range $pag.Pagers }}
<li>
<a href="{{ .URL }}" class="pagination-link {{ if eq . $pag }}is-current{{ end }}" {{ if eq . $pag }}aria-current="page"
{{ end }}>{{ .PageNumber }}</a>
</li>
{{ end }}
</ul>
</nav>
<br> {{ end }}