ungleich-staticcms/templates/macros/pagination.html

27 lines
738 B
HTML
Raw Normal View History

{% macro render_pagination(pagination) %}
2019-11-20 12:36:06 +00:00
<div class="ungleich-center-div">
<div class="pagination">
{% if pagination.has_prev %}
<a href="{{ pagination.prev|url }}">&laquo; Previous</a>
{% else %}
<span class="disabled">&laquo; Previous</span>
{% endif %} |
{% for page in range(1, pagination.pages + 1) %}
{% if page != pagination.page %}
<a href="{{ pagination.for_page(page)|url }}">{{ page }}</a> |
{% else %}
{{ pagination.page }} |
{% endif %}
{% endfor %}
{% if pagination.has_next %}
<a href="{{ pagination.next|url }}">Next &raquo;</a>
{% else %}
<span class="disabled">Next &raquo;</span>
{% endif %}
</div>
2019-11-20 12:36:06 +00:00
</div>
{% endmacro %}