mixyll/_includes/pagination.html

24 lines
1.1 KiB
HTML
Raw Permalink Normal View History

2020-01-24 11:20:29 +00:00
{% if paginator.total_pages != 1 %}
<div class="pagination clearfix mb1 mt4">
<div class="left">
{% if paginator.previous_page %}
{% if paginator.page == 2 %}
<a class="pagination-item" href="{{ "/" | relative_url }}">&laquo; {{ site.text.pagination.newer | default: "Newer" }}</a>
{% else %}
<a class="pagination-item" href="{{ paginator.previous_page_path | relative_url }}">&laquo; {{ site.text.pagination.newer | default: "Newer" }}</a>
{% endif %}
{% else %}
<span class="pagination-item disabled">&laquo; {{ site.text.pagination.newer | default: "Newer" }}</span>
{% endif %}
</div>
<div class="right">
{% if paginator.next_page %}
<a class="pagination-item" href="{{ paginator.next_page_path | relative_url }}">{{ site.text.pagination.older | default: "Older" }} &raquo;</a>
{% else %}
<span class="pagination-item disabled">{{ site.text.pagination.older | default: "Older" }} &raquo;</span>
{% endif %}
</div>
<div class="pagination-meta">Page {{ paginator.page }} of {{ paginator.total_pages }}</div>
</div>
{% endif %}