mirror of
https://github.com/kremalicious/blog.git
synced 2024-11-11 23:55:16 +01:00
44 lines
1.4 KiB
HTML
44 lines
1.4 KiB
HTML
|
|
{% if paginator.total_pages > 1 %}
|
|
|
|
<nav class="paginator">
|
|
{% if paginator.previous_page %}
|
|
<a class="paginator__link"
|
|
{% if paginator.previous_page == 1 %}
|
|
href="/">
|
|
{% else %}
|
|
href="/page/{{paginator.previous_page}}">
|
|
{% endif %}
|
|
<svg class="icon icon-entypo icon-entypo-chevron-left">
|
|
<use xlink:href="/assets/img/sprite.svg#entypo-chevron-left"></use>
|
|
</svg>
|
|
</a>
|
|
{% endif %}
|
|
|
|
<a
|
|
{% if paginator.page == 1 %}
|
|
href="#" class="paginator__link active"
|
|
{% else %}
|
|
href="/" class="paginator__link"
|
|
{% endif %}
|
|
>1</a>
|
|
|
|
{% for count in (2..paginator.total_pages) %}
|
|
{% if count == paginator.page %}
|
|
<a href="#" class="paginator__link active">{{count}}</a>
|
|
{% else %}
|
|
<a class="paginator__link" href="/page/{{count}}">{{count}}</a>
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% if paginator.next_page %}
|
|
<a class="paginator__link" href="/page/{{paginator.next_page}}">
|
|
<svg class="icon icon-entypo icon-entypo-chevron-right">
|
|
<use xlink:href="/assets/img/sprite.svg#entypo-chevron-right"></use>
|
|
</svg>
|
|
</a>
|
|
{% endif %}
|
|
</nav>
|
|
|
|
{% endif %}
|