webseite/templates/macros/pagination.html
L3D fd742c7049 redesign website (!1)
Co-authored-by: L3D <l3d@see-base.de>
Reviewed-on: https://backwesen.de/c3woc/webseite/pulls/1
2022-05-18 00:35:37 +02:00

23 lines
1.2 KiB
HTML

{% macro render_pagination(pagination, odd) %}
{% if pagination.has_next or pagination.has_prev %}
<section class="content {% if odd %}-odd{% else %}-even{% endif %}">
<div class="content__box">
<div class="content__inner_box">
<div class="content__pagination {% if odd %}-odd{% else %}-even{% endif %}">
{% if pagination.has_prev %}
<a class="pagination__anchor {% if odd %}-odd{% else %}-even{% endif %}" href="{{ pagination.prev|url }}">&laquo; Previous</a>
{% else %}
<span class="pagination__disabled">&laquo; Previous</span>
{% endif %}
| {{ pagination.page }} |
{% if pagination.has_next %}
<a class="pagination__anchor {% if odd %}-odd{% else %}-even{% endif %}" href="{{ pagination.next|url }}">Next &raquo;</a>
{% else %}
<span class="pagination__disabled">Next &raquo;</span>
{% endif %}
</div>
</div>
</div>
</section>
{% endif %}
{% endmacro %}