List archives using a 2 column table.

This commit is contained in:
Matts
2012-02-11 19:07:09 -05:00
parent 775013fe20
commit 4dc289551f

View File

@@ -1,15 +1,19 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}{{ SITENAME }} <small>[archive]</small>{% endblock %} {% block title %}{{ SITENAME }} <small>[archive]</small>{% endblock %}
{% block content %} {% block content %}
{% for year, date_year in dates|groupby( 'date.year' ) %}
<h2>{{ year }}</h2> <h1>Archives</h1>
{% for month, articles in date_year|groupby( 'date.month' ) %}
<p><b>{{ articles[ 0 ].date.strftime( '%B' ) }}</b></p> <table class="table">
<ul> <tbody>
{% for article in articles %} {% for article in dates %}
<li><a href="{{ article.url }}">{{ article.title }}</a></li> <tr>
{% endfor %} <td>{{ article.date.strftime("%d %b %Y") }}</td>
</ul> <td><a href='{{ article.url }}'>{{ article.title }}</a></td>
{% endfor %} </tr>
{% endfor %} {% endfor %}
</tbody>
</table>
{% endblock %} {% endblock %}