nekrochan/templates/macros/static-pagination.html

23 řádky
766 B
HTML

{% macro static_pagination(base, current, chain) %}
<div class="pagination box inline-block">
{% if current == 1 %}
[Předchozí]
{% else %}
{% if chain %}
[<a href="{{ base }}&page={{ current - 1 }}">Předchozí</a>]
{% else %}
[<a href="{{ base }}?page={{ current - 1 }}">Předchozí</a>]
{% endif %}
{% endif %}
&#32;
{% if chain %}
[<b><a href="{{ base }}&page={{ current }}">{{ current }}</a></b>]&#32;
[<a href="{{ base }}&page={{ current + 1 }}">Další</a>]
{% else %}
[<b><a href="{{ base }}?page={{ current }}">{{ current }}</a></b>]&#32;
[<a href="{{ base }}?page={{ current + 1 }}">Další</a>]
{% endif %}
</div>
{% endmacro %}