1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-12-19 00:52:19 +01:00

layouts/_default/list.html: Only show pagination if necessary

This commit is contained in:
Alan Orth 2016-10-18 22:53:14 -04:00
parent cdcae6c8a4
commit 2abe8b1cd3
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -5,6 +5,7 @@
{{ .Render "summary" }}
{{ end }}
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
<nav class="blog-pagination">
{{ if and (.Paginator.HasPrev) (.Paginator.HasNext) }}
<a class="btn btn-outline-primary" href="{{ .Paginator.Prev.URL }}" role="button">{{ i18n "paginatorPrevious" }}</a>
@ -19,4 +20,5 @@
<a class="btn btn-outline-primary" href="{{ .Paginator.Next.URL }}" role="button">{{ i18n "paginatorNext" }}</a>
{{ end }}
</nav>
{{ end }}
{{ end }}