hugo-theme-minima/layouts/partials/paginator.html
Allen Bai 9cafc258c3
paginator: quick fix on newer/older btn
Fixes: https://github.com/Mivinci/hugo-theme-minima/issues/6
Signed-off-by: Allen Bai <carpe.diem.allen@gmail.com>
2021-08-15 17:12:38 -04:00

16 lines
391 B
HTML

{{ $page := $.Paginator }}
{{ if gt $page.TotalPages 1 }}
<div class="mt-2">
{{ if $page.HasPrev }}
<a href="{{ $page.Prev.URL }}" class="mr-2">← Newer</a>
{{ else }}
<span class="mr-2">← Newer</span>
{{ end }}
{{ if $page.HasNext }}
<a href="{{ $page.Next.URL }}" class="ml-2">Older →</a>
{{ else }}
<span class="ml-2">Older →</span>
{{ end }}
</div>
{{ end }}