The old Pelican theme I used to use for mcol.xyz
git clone https://mcol.xyz/code/rice-theme
Log | Files | Refs | README

commit 84a92b973bfd5cba732d811719fbb418e2d39882
parent ad02c90645c40094243ffcd391e496568268e424
Author: mcol <mcol@posteo.net>
Date:   Sun,  2 Aug 2020 12:57:13 +0100

use same logic as archive for category pages

Diffstat:
Mtemplates/category.html | 35++++++++++++++++-------------------
1 file changed, 16 insertions(+), 19 deletions(-)

diff --git a/templates/category.html b/templates/category.html @@ -4,24 +4,21 @@ {% block content %} -<h2>{{ SITENAME }} / {{ category }}</h2> - -{% for article in articles_page.object_list %} -<li> - <article> - - <header> - <h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> - </header> - - <footer class="post-info"> - <time class="published" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time> - </footer> - - <div class="entry-content"> {{ article.summary }} </div> - - </article> -</li> -{% endfor %} +<h1>category: {{ category }}</h1> + +<div id=ar> + {% for year, date_year in dates|groupby( 'date.year' )|sort(reverse=True) %} + <div class=ar-yr>{{ year }}</div> + + {% for month, articles in date_year|groupby('date.month')|sort(reverse=True) %} + {% for article in articles %} + <div class=ar-art> + <a href="/{{ article.url }}">{{ article.title }}</a> + </div> + <div>{{ article.date.strftime('%b %d') }}</div> + {% endfor %} + {% endfor %} + {% endfor %} +</div> {% endblock %}