2
0

pagination.html 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. <nav class="pagination" aria-label="Pagination">
  2. <ul class="pagination__list">
  3. {% if subpages.has_previous %}
  4. <li class="page-item">
  5. <a href="?page={{ subpages.previous_page_number }}" class="page-link previous arrows">previous</a>
  6. </li>
  7. {% else %}
  8. <li class="page-item disabled">
  9. <a class="page-link">previous</a>
  10. </li>
  11. {% endif %}
  12. {% for i in subpages.paginator.page_range %}
  13. {% if subpages.number == i %}
  14. <li class="page-item active"><span>{{ i }} <span class="sr-only">(current)</span></span></li>
  15. {% else %}
  16. <li class="page-item"><a href="?page={{ query_string|urlencode }}&amp;page={{ i }}" class="page-link">{{ i }}</a></li>
  17. {% endif %}
  18. {% endfor %}
  19. {% if subpages.has_next %}
  20. <li class="page-item">
  21. <a href="?page={{ subpages.next_page_number }}" class="page-link next arrows">next</a>
  22. </li>
  23. {% else %}
  24. <li class="page-item disabled">
  25. <a class="page-link">next</a>
  26. </li>
  27. {% endif %}
  28. </ul>
  29. </nav>