summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/taxonomy_list.html32
-rw-r--r--templates/taxonomy_single.html12
2 files changed, 33 insertions, 11 deletions
diff --git a/templates/taxonomy_list.html b/templates/taxonomy_list.html
index 9182c43..222711c 100644
--- a/templates/taxonomy_list.html
+++ b/templates/taxonomy_list.html
@@ -1,12 +1,32 @@
{% extends "base.html" %}
{% block content %}
-<section class="posts">
- <h1 class="post-title">Tags</h1>
- <section class="terms">
+<section class="archive">
{% for term in terms %}
- <div class="post-content"><a href="{{ term.permalink }}" class="post-title-link">#{{ term.name }}</a></div>
+ <ul class="post-archive">
+ {# Group the posts by year #}
+ {% set map = term.pages | group_by(attribute="year") %}
+ {% set_global years = [] %}
+ {# Convert the years map to an array (since maps do not have determined order) #}
+ {% for year, ignored in map %}
+ {% set_global years = years | concat(with=year) %}
+ {% endfor %}
+
+ <div class="term-name"><a href="{{ term.permalink }}" class="term-name">#{{ term.name }}</a></div>
+
+ {% for year in years | sort | reverse %}
+ <div class="years">
+ {% set posts = map[year] %}
+ <div class="year">{{ year }}</div>
+ {% for post in posts %}
+ <li class="post-item">
+ <span class="post-date">{{ post.date | date(format="%m/%d") }}</span>
+ <a href="{{ post.permalink }}" class="post-title">{{ post.title }}</a>
+ </li>
+ {% endfor %}
+ </div>
+ {% endfor %}
+ </ul>
{% endfor %}
- </section>
</section>
-{% endblock %}
+{% endblock %} \ No newline at end of file
diff --git a/templates/taxonomy_single.html b/templates/taxonomy_single.html
index 9dbf19f..dec55cc 100644
--- a/templates/taxonomy_single.html
+++ b/templates/taxonomy_single.html
@@ -9,20 +9,22 @@
{% set pages = term.pages %}
{% endif %}
<section class="posts">
- <div class="post-title">{{ term.name }}</div>
+ <div class="post-title term-name term-name-heading">
+ #{{ term.name }}
+ </div>
{% for post in pages %}
<article class="post">
<div class="post-title"><a href="{{ post.permalink }}" class="post-title-link">{{ post.title }}</a></div>
<div class="post-content">
- {{ post.summary | safe }}
- <a href="{{ post.permalink }}" class="More">More</a>
+ {{ post.summary | safe }}
+ <a href="{{ post.permalink }}" class="More">More</a>
</div>
{{ macros::post_meta(post=post, chinese_date=config.extra.seje_chinese_date, expand=false) }}
</article>
{% endfor %}
-{# {{ paginator.next }} #}
+ {# {{ paginator.next }} #}
</section>
{% if paginator %}
{% include "paginator.html" %}
{% endif %}
-{% endblock %}
+{% endblock %} \ No newline at end of file