aboutsummaryrefslogtreecommitdiffstats
path: root/Peli-Kiera/templates/category.html
diff options
context:
space:
mode:
Diffstat (limited to 'Peli-Kiera/templates/category.html')
-rw-r--r--Peli-Kiera/templates/category.html34
1 files changed, 34 insertions, 0 deletions
diff --git a/Peli-Kiera/templates/category.html b/Peli-Kiera/templates/category.html
new file mode 100644
index 0000000..12c566c
--- /dev/null
+++ b/Peli-Kiera/templates/category.html
@@ -0,0 +1,34 @@
+{% extends "base.html" %}
+
+{% block title %}{{ SITENAME }} - Archives{% endblock %}
+
+{% block content %}
+ <main>
+ <section id="list">
+ <h2>{{ category }}</h2>
+ <ul>
+ {% set new = namespace(p=0) %}
+ {% for article in articles_page.object_list %}
+ {% set period = article.date | strftime('%Y') %}
+ {% if period != new.p %}
+ <h3>{{ period }}</h3>
+ <li>
+ <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>
+ <time>{{ article.date|strftime('%b %Y') }}</time>
+ </li>
+ {% set new.p = article.date | strftime('%Y') %}
+ {% elif period == new.p %}
+ <li>
+ <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>
+ <time>{{ article.date|strftime('%b %Y') }}</time>
+ </li>
+ {% endif %}
+ {% endfor %}
+ </ul>
+ </section>
+ {% if articles_page.has_other_pages() %}
+ {% include 'pagination.html' %}
+ {% endif %}
+ </main>
+{% endblock %}
+