2024-06-20 14:10:42 +00:00
{% extends "layouts" ~ D I R ~ "default.twig" %}
{% block content %}
2024-09-05 17:51:48 +00:00
{% set pages = theme .pages_list ( ) %}
{% if posts .paginated is empty and pages is empty %}
<div role="status"> {{ "Nothing here yet!" | translate }} </div>
{% else %}
2024-06-20 14:10:42 +00:00
{% if posts .paginated is not empty %}
<h2> {{ "Posts" | translate }} </h2>
<ul>
{% for post in posts .paginated %}
<li>
<a href=" {{ post .url ( ) }} " rel="bookmark" title=" {{ 'Permanent link to “%s”' | translate | format ( post .title ( ) | striptags | fix ( true ) ) }} ">
{{ post .title ( ) }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
2024-09-05 17:51:48 +00:00
{% if pages is not empty %}
2024-06-20 14:10:42 +00:00
<h2> {{ "Pages" | translate }} </h2>
<ul>
2024-09-05 17:51:48 +00:00
{% for page in pages %}
{% set prev_page_depth = loop .first ? 1 : pages [ loop .index0 - 1 ] .depth %}
{% set this_page_depth = page .depth %}
{% set next_page_depth = loop .last ? 1 : pages [ loop .index0 + 1 ] .depth %}
2024-06-20 14:10:42 +00:00
{% if this_page_depth > prev_page_depth %}
{{ "<ul><li>" | repeat ( this_page_depth - prev_page_depth ) }}
2024-09-05 17:51:48 +00:00
{% else %}
2024-06-20 14:10:42 +00:00
<li>
{% endif %}
2024-09-05 17:51:48 +00:00
<a href=" {{ page .url ( ) }} " rel="bookmark" title=" {{ 'Permanent link to “%s”' | translate | format ( page .title | striptags | normalize | fix ( true ) ) }} "> {{ page .title }} </a>
{% if this_page_depth >= next_page_depth %}
{{ "</li></ul>" | repeat ( this_page_depth - next_page_depth ) -}}
2024-06-20 14:10:42 +00:00
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
2024-09-05 17:51:48 +00:00
{% if posts .next_page ( ) %}
<nav class="traversal">
<a href=" {{ url ( 'archive' ) }} " rel="archives"> {{ "More posts…" | translate }} </a>
</nav>
2024-06-20 14:10:42 +00:00
{% endif %}
{% endif %}
{% endblock %}