website/templates/section.html
2020-03-29 22:08:09 +02:00

46 lines
2.1 KiB
HTML

{% extends "index.html" %}
{% block title %}{{ section.title }} - {{ config.title }}{% endblock %}
{% block main %}
<section class="h-feed">
<h1><span class="p-name">{{ section.title }}</span>{% if paginator and paginator.number_pagers > 1 %} ({{ paginator.current_index }}/{{ paginator.number_pagers }}){% endif %}</h1>
<a class="u-url" hidden aria-hidden=true href="{{ section.permalink }}">Permalink</a>
{% set pages = paginator.pages| default(value=section.pages) %}
{% for page in pages %}
<article>
<div>
<a class="u-url" href="{{ page.permalink }}"><h2>{{ page.title }}</h2></a>
{%- if page.date -%}<time class="dt-published" datetime="{{ page.date }}">📅&nbsp;{{ page.date | date(format="%d/%m/%Y") }}</time>{%- endif -%}
</div>
{% if page.summary %}
<div class="p-summary e-content">
{{ page.summary | markdown | safe }}
<a class="read-more" href="{{ page.permalink }}">--> {% if lang %}{{ trans(key="readmore", lang=lang) }}{% else %}{{ trans(key="readmore") }}{% endif %} <--</a>
</div>
{% else %}
<div class="e-content">
{{ page.content | markdown | safe }}
</div>
{% endif %}
</article>
{% endfor %}
{% if paginator and paginator.number_pagers > 1 %}
<aside class="pagination">
{% if paginator.previous %}
<a href="{{ paginator.previous }}">
<--&nbsp;&nbsp;{% if lang %}{{ trans(key="previousPage", lang=lang) }}
{% else %}{{ trans(key="previousPage") }}{% endif %}
</a>
{% endif %}
{% if paginator.next %}
<a href="{{ paginator.next }}">
{% if lang %}{{ trans(key="nextPage", lang=lang) }}
{% else %}{{ trans(key="nextPage") }}{% endif %}&nbsp;&nbsp;-->
</a>
{% endif %}
</aside>
{% endif %}
</section>
{% endblock %}