48 lines
1.3 KiB
HTML
48 lines
1.3 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}{{ section.title }} - {{ config.title }}{% endblock title %}
|
|
|
|
{% block content %}
|
|
<h1>{{ section.title }}</h1>
|
|
|
|
{% if section.content %}
|
|
<div class="section-content">
|
|
{{ section.content | safe }}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<ul class="post-list">
|
|
{% if paginator %}
|
|
{% set pages = paginator.pages %}
|
|
{% else %}
|
|
{% set pages = section.pages %}
|
|
{% endif %}
|
|
{% if section.extra.use_chapter_sort %}
|
|
{% set pages = pages | sort(attribute="extra.chapter") %}
|
|
{% for page in pages %}
|
|
<li>
|
|
<span class="chapter">{{ page.extra.chapter }}</span>
|
|
<a href="{{ page.permalink }}">{{ page.title }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
{% else %}
|
|
{% for page in pages %}
|
|
<li>
|
|
<time datetime="{{ page.date }}">{{ page.date | date(format="%Y-%m-%d") }}</time>
|
|
<a href="{{ page.permalink }}">{{ page.title }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</ul>
|
|
|
|
{% if paginator %}
|
|
<nav class="pagination">
|
|
{% if paginator.previous %}
|
|
<a href="{{ paginator.previous }}">← {% if section.extra.use_chapter_sort %}Previous{% else %}Newer{% endif %}</a>
|
|
{% endif %}
|
|
{% if paginator.next %}
|
|
<a href="{{ paginator.next }}">{% if section.extra.use_chapter_sort %}Next{% else %}Older{% endif %} →</a>
|
|
{% endif %}
|
|
</nav>
|
|
{% endif %}
|
|
{% endblock content %}
|