24 lines
1.1 KiB
HTML
24 lines
1.1 KiB
HTML
{{ if or ( .Paginator.HasPrev ) ( .Paginator.HasNext ) }}
|
|
{{ $toNewPostsMessage := i18n "toNewPosts" | humanize }}
|
|
{{ $toOldPostsMessage := i18n "toOldPosts" | humanize }}
|
|
<div class="pagination">
|
|
<div class="left">
|
|
{{ if .Paginator.HasPrev }}
|
|
{{ if eq .Paginator.PageNumber 2 }}
|
|
<a class="pagination-item" href="{{ .Site.BaseURL }}{{ .Site.LanguagePrefix }}">{{ $toNewPostsMessage }}</a>
|
|
{{ else }}
|
|
<a class="pagination-item" href="{{ .Paginator.Prev.URL }}">{{ $toNewPostsMessage }}</a>
|
|
{{ end }}
|
|
{{ else }}
|
|
<span class="pagination-item disabled">{{ $toNewPostsMessage }}</span>
|
|
{{ end }}
|
|
</div>
|
|
<div class="right">
|
|
{{ if .Paginator.HasNext }}
|
|
<a class="pagination-item" href="{{ .Paginator.Next.URL }}">{{ $toOldPostsMessage }}</a>
|
|
{{ else }}
|
|
<span class="pagination-item disabled">{{ $toOldPostsMessage }}</span>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
{{ end }} |