flex/templates/archives.html
Matt Klich a44fba59a2 Update archives to display the date once all articles on the date.
The old method printed the date for every article even if they had the
same publish date. This update prints the date once for all articles
published on that date.
2016-02-06 21:42:48 -07:00

22 lines
556 B
HTML

{% extends "base.html" %}
{% block title %} – Archives{% endblock %}
{% block content %}
<article>
<header>
<h1>Archives</h1>
</header>
<div>
<dl>
{% set previous_date = False %}
{% for article in dates %}
{% if article.locale_date != previous_date: %}
{% set previous_date = article.locale_date %}
<dt>{{ article.locale_date }}</dt>
{% endif %}
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
{% endfor %}
</dl>
</div>
</article>
{% endblock %}