1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-11 23:55:16 +01:00
blog/_src/_includes/paginator.html

54 lines
1.8 KiB
HTML

{% if paginator.total_pages > 1 %}
<nav class="row paginator">
<p class="paginator-previous col2">
{% if paginator.previous_page %}
<a
{% if page.category %}
{% if paginator.previous_page == 1 %}
href="/{{ page.category }}/"
{% else %}
href="/{{ page.category }}/page/{{ paginator.previous_page }}/"
{% endif %}
{% else %}
{% if paginator.previous_page == 1 %}
href="/"
{% else %}
href="/page/{{ paginator.previous_page }}/"
{% endif %}
{% endif %}
rel="prev">
<svg class="icon icon-entypo icon-entypo-chevron-left">
<use xlink:href="/assets/img/sprite.svg#entypo-chevron-left"></use>
</svg>
Previous
</a>
{% endif %}
</p>
<p class="col2 pagenumber textcenter">
<span class="paginator-number ">Page {{ paginator.page }} of {{ paginator.total_pages }}</span>
</p>
<p class="paginator-next col2">
{% if paginator.next_page %}
<a
{% if page.category %}
href="/{{ page.category }}/page/{{ paginator.next_page }}/"
{% else %}
href="/page/{{ paginator.next_page }}/"
{% endif %}
rel="next">Next
<svg class="icon icon-entypo icon-entypo-chevron-right">
<use xlink:href="/assets/img/sprite.svg#entypo-chevron-right"></use>
</svg>
</a>
{% endif %}
</p>
</nav>
{% endif %}