friendenstein/templates/section.html

43 lines
1.5 KiB
HTML
Raw Permalink Normal View History

2024-01-02 12:18:18 +01:00
{% extends "page.html" %}
2023-07-04 02:37:44 +02:00
{% block content %}
2023-07-04 02:37:44 +02:00
<h1>{{ section.title }}</h1>
{{ section.content | safe }}
2024-01-19 19:44:44 +01:00
{%- if paginator -%}
{%- set pages = paginator.pages -%}
{%- else -%}
{% set pages = section.pages -%}
{%- endif -%}
2024-01-02 02:31:44 +01:00
<ul class="title-list">
{%- for page in pages -%}
{%- if page.extra.date_format.list -%}
{%- set datefmt = page.extra.date_format.list -%}
{%- elif section.extra.date_format.list -%}
{%- set datefmt = section.extra.date_format.list -%}
{%- elif config.extra.date_format.list -%}
{%- set datefmt = config.extra.date_format.list -%}
{%- else -%}
{% set datefmt = " @ %Y-%m-%dT%H:%M:%S%Z" %}
{%- endif -%}
2024-01-19 19:44:44 +01:00
{%- if page.extra.redirect -%}
{%- set page_link = page.extra.redirect -%}
{%- else -%}
{%- set page_link = page.permalink -%}
{%- endif -%}
<li><a href="{{ page_link | safe }}">{{ page.title }}
{%- if section.extra.show_subtitle and section.extra.show_subtitle == true and page.extra.subtitle -%}
<span class="content-subtitle"> - {{ page.extra.subtitle }}</span>
{%- endif -%}
<span class="content-date">{{ page.date | date(format=datefmt) }}</span>
</a></li>
{%- endfor -%}
2023-07-04 02:37:44 +02:00
</ul>
2023-07-04 02:37:44 +02:00
{% if paginator %}
2024-01-02 02:31:44 +01:00
<div class="metadata">{% if paginator.previous %}<a href="{{ paginator.first }}"></a> &nbsp; <a href="{{ paginator.previous }}"></a>{% endif %} &nbsp; {{ paginator.current_index }} / {{ paginator.number_pagers }} &nbsp; {% if paginator.next %}<a href="{{ paginator.next }}"></a> &nbsp; <a href="{{ paginator.last }}"></a>{% endif %}</div>
2023-07-04 02:37:44 +02:00
{% endif %}
2023-12-23 01:31:43 +01:00
{% endblock content %}