2023-11-09 06:53:33 +00:00
|
|
|
{# vim: set ft=htmljinja
|
|
|
|
#}
|
|
|
|
|
2019-09-29 20:19:40 +01:00
|
|
|
{% macro render_pagination(pagination) %}
|
|
|
|
{% if pagination.pages > 1 %}
|
|
|
|
<nav aria-label="Page navigation example">
|
|
|
|
<ul class="pagination">
|
|
|
|
{% if pagination.has_prev %}
|
|
|
|
<li class="page-item"><a class="page-link" href="{{ url_for_other_page(pagination.page - 1) }}">« Previous</a></li>
|
|
|
|
{% endif %}
|
|
|
|
{%- for page in pagination.iter_pages() %}
|
|
|
|
{% if page %}
|
|
|
|
{% if page != pagination.page %}
|
|
|
|
<li class="page-item"><a class="page-link" href="{{ url_for_other_page(page) }}">{{ page }}</a></li>
|
|
|
|
{% else %}
|
2023-11-09 06:53:33 +00:00
|
|
|
<li class="page-item active"><a class="page-link" href="{{ url_for_other_page(page) }}">{{ page }} <span class="visually-hidden">(current)</span></a></li>
|
2019-09-29 20:19:40 +01:00
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
<li><span class="ellipsis">…</span></li>
|
|
|
|
{% endif %}
|
|
|
|
{%- endfor %}
|
|
|
|
{% if pagination.has_next %}
|
|
|
|
<li class="page-item">
|
|
|
|
<a class="page-link" href="{{ url_for_other_page(pagination.page + 1) }}" aria-label="Next">
|
|
|
|
<span aria-hidden="true">Next »</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
{% endif %}
|
|
|
|
{% endmacro %}
|