pelican-red/templates/_pagination.html

24 lines
1.3 KiB
HTML
Raw Normal View History

<div class='pagination-centered'><ul class="pagination">
{% if articles_page.has_previous() %}
{% if articles_page.previous_page_number() == 1 %}
<li class="arrow"><a href="{{ SITEURL }}/{{ page_name }}.html" title="Previous page">&laquo;</a></li>
{% else %}
<li class="arrow"><a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.previous_page_number() }}.html" title="Previous page">&laquo;</a></li>
{% endif %}
{% else %}
<li class="arrow unavailable"><a title="Previous page">&laquo;</a></li>
{% endif %}
{% for num in range (1, articles_paginator.num_pages + 1) %}
{% if num == articles_page.number %}
<li class="current"><a title="Current page">{{ num }}</a></li>
{% else %}
<li><a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 }}.html">{{ num }}</a></li>
{% endif %}
{% endfor %}
{% if articles_page.has_next() %}
<li class="arrow"><a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html" title="Next page">&raquo;</a></li>
{% else %}
<li class="arrow unavailable"><a title="Next page">&raquo;</a></li>
{% endif %}
</ul></div>