website-zola/templates/section.html

39 lines
1.3 KiB
HTML
Raw Permalink Normal View History

{% extends "base.html" %}
2024-09-11 21:17:26 +02:00
{% block main_content %}
{% if section.extra.section_path -%}
{% set section = get_section(path=section.extra.section_path) %}
{% endif -%}
2024-09-11 21:17:26 +02:00
{% block title %}
{{ post_macros::page_header(title=section.title) }}
{% endblock title %}
2024-09-11 21:17:26 +02:00
{% block post_list %}
<main class="list">
{%- if paginator %}
{%- set show_pages = paginator.pages -%}
{% else %}
{%- set show_pages = section.pages -%}
{% endif -%}
2024-09-11 21:17:26 +02:00
{{ post_macros::list_posts(pages=show_pages) }}
</main>
{% endblock post_list %}
2024-09-11 21:17:26 +02:00
{% if paginator %}
<ul class="pagination">
{% if paginator.previous %}
<span class="page-item page-prev">
<a href={{ paginator.previous }} class="page-link" aria-label="Previous"><span aria-hidden="true">← Prev</span></a>
</span>
{% endif %}
{% if paginator.next %}
<span class="page-item page-next">
<a href={{ paginator.next }} class="page-link" aria-label="Next"><span aria-hidden="true">Next →</span></a>
</span>
{% endif %}
</ul>
{% endif %}
{% endblock main_content %}