19 lines
754 B
HTML
19 lines
754 B
HTML
|
{% with page_count=(item_count/max_items)|round(method="ceil")|int %}
|
||
|
{% if page_count > 1 %}
|
||
|
<nav aria-label="Page navigation example" style="display: inline-block; margin: 5px">
|
||
|
<form method="get" action="">
|
||
|
{% for key in request.args.keys() %}
|
||
|
{% if key != "page" %}<input type="hidden" name="{{ key }}" value="{{ request.args.get(key) }}">{% endif %}
|
||
|
{% endfor %}
|
||
|
<ul class="pagination">
|
||
|
{% for i in range(1, page_count+1) %}
|
||
|
<li class="page-item{% if page == i %} active{% endif %}">
|
||
|
<button name="page" value="{{ i }}" class="page-link">{{ i }}</button>
|
||
|
</li>
|
||
|
{% endfor %}
|
||
|
</ul>
|
||
|
</form>
|
||
|
</nav>
|
||
|
{% endif %}
|
||
|
{% endwith %}
|