ungleich-staticcms/templates/macros/pagination.html
2020-02-05 13:44:56 +01:00

34 lines
905 B
HTML

{% macro render_pagination(pagination) %}
<div class="container">
<div class="row mb-5">
<div class="col-md-3">
<!-- unused for centering -->
</div>
<div class="col-md-6">
{% if pagination.has_prev %}
<a href="{{ pagination.prev|url }}">&laquo; Previous</a>
{% else %}
&laquo; Previous
{% 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 %}
Next &raquo;
{% endif %}
</div>
<div class="col-md-3">
<!-- unused for centering -->
</div>
</div>
</div>
{% endmacro %}