pagination.html 836 B

12345678910111213141516171819202122
  1. <div class="pagination">
  2. <ul>
  3. {% if articles_page.has_previous() %}
  4. {% set num = articles_page.previous_page_number() %}
  5. <li class="prev"><a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html">&larr; Anterior</a></li>
  6. {% else %}
  7. <li class="prev disabled"><a href="#">&larr; Anterior</a></li>
  8. {% endif %}
  9. {% for num in range( 1, 1 + articles_paginator.num_pages ) %}
  10. <li class="{{ 'active' if num == articles_page.number else '' }}"><a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html">{{ num }}</a></li>
  11. {% endfor %}
  12. {% if articles_page.has_next() %}
  13. <li class="next"><a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">Próximo &rarr;</a></li>
  14. {% else %}
  15. <li class="next disabled"><a href="#">&rarr; Próximo</a></li>
  16. {% endif %}
  17. </ul>
  18. </div>