Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 1 | {% extends "base.html" %} |
pR0Ps | 6bf5227 | 2013-12-11 13:25:27 -0500 | [diff] [blame] | 2 | {% block title %}Archive | {{ SITENAME }}{% endblock %} |
Giulio Fidente | da4d95b | 2013-04-29 15:59:35 +0200 | [diff] [blame] | 3 | |
pR0Ps | d44c2f9 | 2014-12-18 01:49:27 -0500 | [diff] [blame] | 4 | {% block description %}A listing of all posts on this site{% endblock %} |
| 5 | |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 6 | {% block content %} |
Giulio Fidente | a5278c1 | 2013-03-23 00:33:24 +0100 | [diff] [blame] | 7 | <article> |
Giulio Fidente | 0bc1f0e | 2013-11-05 16:23:23 +0100 | [diff] [blame] | 8 | <div class="article_text"> |
Giulio Fidente | a5278c1 | 2013-03-23 00:33:24 +0100 | [diff] [blame] | 9 | <dl> |
pR0Ps | 0bb3dbd | 2014-03-01 16:48:19 -0500 | [diff] [blame] | 10 | {% for year, year_articles in articles|groupby('date.year')|reverse %} |
| 11 | <h2>{{ year }}</h2> |
| 12 | {% for _, month_articles in year_articles|groupby('date.month')|reverse %} |
| 13 | {# A little gross, but works (need a date object to get the month name). #} |
| 14 | <h3>{{ month_articles[0].date.strftime('%B') }}</h3> |
| 15 | <ul> |
| 16 | {% for article in month_articles %} |
pR0Ps | bcaaaed | 2015-01-10 18:22:32 -0500 | [diff] [blame] | 17 | <li><time datetime="{{ article.date.isoformat() }}">{{ article.date.strftime('%b %d, %Y') }}</time> - <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li> |
pR0Ps | 0bb3dbd | 2014-03-01 16:48:19 -0500 | [diff] [blame] | 18 | {% endfor %} |
| 19 | </ul> |
| 20 | {% endfor %} |
Giulio Fidente | a5278c1 | 2013-03-23 00:33:24 +0100 | [diff] [blame] | 21 | {% endfor %} |
| 22 | </dl> |
| 23 | </div> |
| 24 | </article> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 25 | {% endblock %} |