Merge pull request #112 from iakunin/2021-11-06-pagination-bug

Fixing pagination bug
This commit is contained in:
Dmitry Kolosov 2021-11-07 15:46:58 +03:00 committed by GitHub
commit 55525e11aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,15 +1,15 @@
{{ if or ( .Paginator.HasPrev ) ( .Paginator.HasNext ) }}
{{ $toNewPostsMessage := i18n "toNewPosts" }}
{{ $toOldPostsMessage := i18n "toOldPosts" }}
{{ $toOldPostsMessage := i18n "toOldPosts" }}
<div class="pagination">
<div class="left pagination-item {{ if not .Paginator.HasPrev }}disabled{{ end }}">
{{ if .Paginator.HasPrev }}
<a href="{{ .Paginator.Prev.URL | relLangURL }}">{{ $toNewPostsMessage }}</a>
<a href="{{ .Paginator.Prev.URL }}">{{ $toNewPostsMessage }}</a>
{{ end }}
</div>
<div class="right pagination-item {{ if not .Paginator.HasNext }}disabled{{ end }}">
{{ if .Paginator.HasNext }}
<a href="{{ .Paginator.Next.URL | relLangURL }}">{{ $toOldPostsMessage }}</a>
<a href="{{ .Paginator.Next.URL }}">{{ $toOldPostsMessage }}</a>
{{ end }}
</div>
</div>