link to Archives page grouped by month; drop Trigger Warning page
[Ultimately_Untrue_Thought.git] / theme / templates / archives.html
diff --git a/theme/templates/archives.html b/theme/templates/archives.html
new file mode 100644 (file)
index 0000000..187b184
--- /dev/null
@@ -0,0 +1,18 @@
+{% extends "base.html" %}
+
+{% block title %}{{ SITENAME }} - Archives{% endblock %}
+
+{% block content %}
+  <h2>Archives</h2>
+
+  <dl>
+    {% for article in dates %}
+
+        {% if loop.first or loop.previtem.date.month != article.date.month %}
+          <h4><strong>{{ article.date.strftime('%B %Y') }}</strong></h4>
+        {% endif %}
+
+        <dd>{{ article.date.strftime('%d') }} &emsp; <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
+    {% endfor %}
+  </dl>
+{% endblock %}