site/templates/index.html

40 lines
1.9 KiB
HTML
Raw Normal View History

2020-08-11 16:14:38 +02:00
{% extends "base.html" %}
{% block content -%}
{%- for page in paginator.pages %}
{% include "post.html" %}
<hr class="hr">
{%- endfor %}
{%- if paginator.number_pagers > 1 %}
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
{% if paginator.next %}<a class="pagination-previous" href="{{ paginator.next | safe }}">Ältere Beiträge</a>{% endif %}
{% if paginator.previous %}<a class="pagination-next" href="{{ paginator.previous | safe }}">Neuere Beiträge</a>{% endif %}
<ul class="pagination-list">
{%- if paginator.current_index != paginator.number_pagers %}
<li><a class="pagination-link" aria-label="Zu Seite {{ paginator.number_pagers }}" href="{{ paginator.last | safe }}">{{ paginator.number_pagers }}</a></li>
{%- endif %}
{%- if paginator.current_index + 3 <= paginator.number_pagers %}
<li><span class="pagination-ellipsis">&hellip;</span></li>
{%- endif %}
{%- if paginator.current_index + 2 <= paginator.number_pagers %}
<li><a class="pagination-link" aria-label="Zu Seite {{ paginator.current_index + 1 }}" href="{{ paginator.next | safe }}">{{ paginator.current_index + 1 }}</a></li>
{%- endif %}
<li><a class="pagination-link is-current" aria-label="Seite 46" aria-current="page">{{ paginator.current_index }}</a></li>
{%- if paginator.current_index > 2 %}
<li><a class="pagination-link" aria-label="Zu Seite {{ paginator.current_index - 1 }}" href="{{ paginator.previous | safe }}">{{ paginator.current_index - 1 }}</a></li>
{%- endif %}
{%- if paginator.current_index > 3 %}
<li><span class="pagination-ellipsis">&hellip;</span></li>
{%- endif %}
{%- if paginator.current_index != 1 %}
<li><a class="pagination-link" aria-label="Zu Seite 1" href="{{ paginator.first | safe }}">1</a></li>
{%- endif %}
</ul>
</nav>
{%- endif %}
{%- endblock content %}
{% block scripts -%}
{{ super() }}
{% include "podlove-player-script.html" %}
{%- endblock scripts %}