nekrochan/templates/macros/pagination.html

26 řádky
694 B
HTML
Surový Normální zobrazení Historie

2023-12-11 16:18:43 +01:00
{% macro pagination(base, pages, current) %}
2024-03-03 00:19:48 +01:00
<div class="pagination box inline-block">
2024-02-17 22:24:39 +01:00
{% if current == 1 %}
[Předchozí]
2023-12-11 16:18:43 +01:00
{% else %}
2024-02-17 22:24:39 +01:00
[<a href="{{ base }}?page={{ current - 1 }}">Předchozí</a>]
{% endif %}
&#32;
{% for page in 1..(pages + 1) %}
{% if page == current %}
[<b><a href="{{ base }}?page={{ page }}">{{ page }}</a></b>]
{% else %}
[<a href="{{ base }}?page={{ page }}">{{ page }}</a>]
{% endif %}
2024-03-03 00:19:48 +01:00
&#32;
2024-02-17 22:24:39 +01:00
{% endfor %}
{% if current == pages %}
[Další]
{% else %}
[<a href="{{ base }}?page={{ current + 1 }}">Další</a>]
2023-12-11 16:18:43 +01:00
{% endif %}
</div>
{% endmacro %}