24 lines
1.2 KiB
HTML
24 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 }}">« Previous</a>
|
||
|
{% else %}
|
||
|
<span class="pagination__disabled">« Previous</span>
|
||
|
{% endif %}
|
||
|
| {{ pagination.page }} |
|
||
|
{% if pagination.has_next %}
|
||
|
<a class="pagination__anchor {% if odd %}-odd{% else %}-even{% endif %}" href="{{ pagination.next|url }}">Next »</a>
|
||
|
{% else %}
|
||
|
<span class="pagination__disabled">Next »</span>
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</section>
|
||
|
{% endif %}
|
||
|
{% endmacro %}
|