website/templates/section.html

46 lines
2.1 KiB
HTML
Raw Normal View History

2020-03-29 20:44:15 +02:00
{% extends "index.html" %}
{% block title %}{{ section.title }} - {{ config.title }}{% endblock %}
{% block main %}
<section class="h-feed">
2020-03-29 22:08:09 +02:00
<h1><span class="p-name">{{ section.title }}</span>{% if paginator and paginator.number_pagers > 1 %} ({{ paginator.current_index }}/{{ paginator.number_pagers }}){% endif %}</h1>
2020-03-29 20:44:15 +02:00
<a class="u-url" hidden aria-hidden=true href="{{ section.permalink }}">Permalink</a>
2020-03-29 22:08:09 +02:00
{% set pages = paginator.pages| default(value=section.pages) %}
{% for page in pages %}
2020-03-29 20:44:15 +02:00
<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>
2020-03-29 20:44:15 +02:00
</div>
{% else %}
<div class="e-content">
{{ page.content | markdown | safe }}
</div>
{% endif %}
</article>
{% endfor %}
2020-03-29 22:08:09 +02:00
{% 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>
2020-03-29 20:44:15 +02:00
{% endblock %}