26 řádky
694 B
HTML
26 řádky
694 B
HTML
{% macro pagination(base, pages, current) %}
|
|
<div class="pagination box inline-block">
|
|
{% if current == 1 %}
|
|
[Předchozí]
|
|
{% else %}
|
|
[<a href="{{ base }}?page={{ current - 1 }}">Předchozí</a>]
|
|
{% endif %}
|
|
 
|
|
|
|
{% 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 %}
|
|
 
|
|
{% endfor %}
|
|
|
|
{% if current == pages %}
|
|
[Další]
|
|
{% else %}
|
|
[<a href="{{ base }}?page={{ current + 1 }}">Další</a>]
|
|
{% endif %}
|
|
</div>
|
|
{% endmacro %}
|