blog/templates/blog-list.html
2023-05-06 20:30:36 +02:00

41 lines
2.0 KiB
HTML

{% extends "base.html" %}
{% import 'macros/card.html' as macro_card -%}
{% block content %}
<div class="columns is-multiline mt-6">
{% for page in paginator.pages %}
<div class="column is-one-third">
{% if page.taxonomies.Tag %}
{{ macro_card::create_card(link=page.permalink, img=page.extra.image, title=page.title, subtitle="la génèse", abstract=page.summary, tags=page.taxonomies.Tag, date=page.date) }}
{% else %}
{{ macro_card::create_card(link=page.permalink, img=page.extra.image, title=page.title, subtitle="la génèse", abstract=page.summary, tags="", date=page.date) }}
{% endif %}
</div>
{% endfor %}
</div>
<nav class="pagination is-rounded is-centered" role="navigation" aria-label="pagination">
<ul class="pagination-list">
{% if paginator.current_index > 2 %}
<li><a href="{{ paginator.first }}" class="pagination-link" aria-label="Page 1">1</a></li>
{% endif %}
{% if paginator.current_index > 3 %}
<li><span class="pagination-ellipsis">&hellip;</span></li>
{% endif %}
{% if paginator.previous %}
<li><a class="pagination-link" href="{{ paginator.previous }}" aria-label="Page {{ paginator.current_index -1 }}">{{ paginator.current_index - 1 }}</a></li>
{% endif %}
<li><a class="pagination-link is-current" aria-label="Page {{ paginator.current_index }}" aria-current="page">{{ paginator.current_index }}</a></li>
{% if paginator.next %}
<li><a class="pagination-link" href="{{ paginator.next }}" aria-label="Page {{ paginator.current_index +1 }}">{{ paginator.current_index + 1 }}</a></li>
{% endif %}
{% if paginator.current_index + 2 < paginator.number_pagers %}
<li><span class="pagination-ellipsis">&hellip;</span></li>
{% endif %}
{% if paginator.current_index < paginator.number_pagers - 1 %}
<li><a href="{{ paginator.last }}" class="pagination-link" aria-label="Page {{ paginator.number_pagers }}">{{ paginator.number_pagers }}</a></li>
{% endif %}
</ul>
</nav>
{% endblock content %}