view piecrust/resources/theme/templates/_year.html @ 856:9bb22bbe093c

refactor: Make the blog archives functional again. The blog archives are using the same pattern as the taxonomy support.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 06 Jun 2017 01:23:25 -0700
parents
children
line wrap: on
line source

{% extends "default.html" %}

{% block main %}
<h2>Posts in {{ year }}</h2>

<section>
    {% for post in pagination.posts %}
    <p><em>{{post.timestamp|date('%d %B')}}</em> &ndash; <a href="{{ post.url }}">{{ post.title }}</a></p>
    {% endfor %}
</section>
<section>
    {% if pagination.prev_page %}<div class="prev"><a href="{{ pagination.prev_page }}">Next Posts</a></div>{% endif %}
    {% if pagination.next_page %}<div class="next"><a href="{{ pagination.next_page }}">Previous Posts</a></div>{% endif %}
</section>
{% endblock %}