Merge pull request #26 from elementalvoid/archives-learns-multiple-articles-per-date

Update archives template to display the date once all articles on the date.
This commit is contained in:
Alexandre Vicenzi 2016-02-12 22:08:51 -02:00
commit eac81087ee

View file

@ -8,8 +8,12 @@
</header> </header>
<div> <div>
<dl> <dl>
{% set previous_date = False %}
{% for article in dates %} {% for article in dates %}
{% if article.locale_date != previous_date %}
{% set previous_date = article.locale_date %}
<dt>{{ article.locale_date }}</dt> <dt>{{ article.locale_date }}</dt>
{% endif %}
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd> <dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
{% endfor %} {% endfor %}
</dl> </dl>