Add pagination for taxonomies. Close #20
This commit is contained in:
parent
82727c8e8a
commit
9ea38661fb
8 changed files with 16 additions and 31 deletions
|
@ -1,19 +1,15 @@
|
|||
{{ if or ( .Paginator.HasPrev ) ( .Paginator.HasNext ) }}
|
||||
{{ $toNewPostsMessage := i18n "toNewPosts" | humanize }}
|
||||
{{ $toOldPostsMessage := i18n "toOldPosts" | humanize }}
|
||||
{{ $toOldPostsMessage := i18n "toOldPosts" | humanize }}
|
||||
<div class="pagination">
|
||||
<div class="left pagination-item {{ if not .Paginator.HasPrev }}disabled{{ end }}">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
{{ if eq .Paginator.PageNumber 2 }}
|
||||
<a href="{{ .Site.BaseURL }}{{ .Site.LanguagePrefix}}">{{ $toNewPostsMessage }}</a>
|
||||
{{ else }}
|
||||
<a href="{{ .Paginator.Prev.URL | relLangURL }}">{{ $toNewPostsMessage }}</a>
|
||||
{{ end }}
|
||||
{{ 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 | relLangURL }}">{{ $toOldPostsMessage }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue