website/layouts/partials/paginator.html

23 lines
794 B
HTML
Raw Normal View History

{{ if gt .Paginator.TotalPages 1 }}
<div id="pageNavigation" class='
{{ if eq .Site.Params.Navtype "circles" }}
nav-circles
{{ end }}
'>
{{ if .Paginator.HasPrev }}
<a href="{{ .Paginator.Prev.URL }}" title="Previous page">&lt;&lt;&lt;</a>
{{ end }}
{{ $currentPage := .Paginator.PageNumber }}
{{ range .Paginator.Pagers }}
{{ if ne .PageNumber $currentPage }}
<a href="{{ .URL }}">{{ .PageNumber }}</a>
{{ else }}
<span>[{{ .PageNumber }}]</span>
{{ end }}
{{ end }}
{{ if .Paginator.HasNext }}
<a href="{{ .Paginator.Next.URL }}" title="Next page">&gt;&gt;&gt;</a>
{{ end }}
</div>
{{ end }}