20 lines
958 B
HTML
20 lines
958 B
HTML
{{ if or ( .Paginator.HasPrev ) ( .Paginator.HasNext ) }}
|
|
{{ $toNewPostsMessage := i18n "toNewPosts" | 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 | absLangURL }}">{{ $toNewPostsMessage }}</a>
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
<div class="right pagination-item {{ if not .Paginator.HasNext }}disabled{{ end }}">
|
|
{{ if .Paginator.HasNext }}
|
|
<a href="{{ .Paginator.Next.URL | absLangURL }}">{{ $toOldPostsMessage }}</a>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
{{ end }} |