ungleich-staticcms/templates/macros/pagination.html

35 lines
905 B
HTML
Raw Permalink Normal View History

{% macro render_pagination(pagination) %}
2020-02-05 12:44:56 +00:00
<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 %}
2020-02-05 12:44:56 +00:00
{% 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>
2019-11-20 12:36:06 +00:00
</div>
{% endmacro %}