about summary refs log tree commit diff
path: root/layouts/partials/pagination.html
blob: c561c09c52eebee4cb093d537ffd09f86bd55e96 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{{ if or ( .Paginator.HasPrev ) ( .Paginator.HasNext ) }}
    {{ $toNewPostsMessage := i18n "toNewPosts" }}
    {{ $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>
            {{ end }}
        </div>
        <div class="right pagination-item {{ if not .Paginator.HasNext }}disabled{{ end }}">
            {{ if .Paginator.HasNext }}
                <a href="{{ .Paginator.Next.URL | relLangURL }}">{{ $toOldPostsMessage }}</a>
            {{ end }}
        </div>
    </div>
{{ end }}