summaryrefslogtreecommitdiffstatshomepage
path: root/templates
diff options
context:
space:
mode:
authorWolfgang Müller2021-08-13 13:57:38 +0200
committerWolfgang Müller2021-08-13 14:07:45 +0200
commit6ae65265b707f73a573a2da8918f02117eaa3120 (patch)
tree1cf322659339cc06e4c9a7b6d717289317915d83 /templates
parent417ea38248e7a716bdeada3bde3c9063fba558da (diff)
downloadzunzuncito-6ae65265b707f73a573a2da8918f02117eaa3120.tar.gz
templates: Fix permalink content for mentioned posts
A regular posts indicates its permalink with a section sign. However, for mentioned posts we'd like to be explicit about the post number, since we may refer to them this way in the parent post. This behaviour should have been working since day one in ad2be2b (Initial commit, 2021-06-12), but it was subtly broken. Since the render_post macro does not have access to the 'mention' variable, only the section sign would ever be used to indicate a permalink. This probably happened because the rendering code for a post used to live in the post template instead of a macro.
Diffstat (limited to 'templates')
-rw-r--r--templates/macros.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/macros.html b/templates/macros.html
index d3ba894..ffa8641 100644
--- a/templates/macros.html
+++ b/templates/macros.html
@@ -4,7 +4,7 @@
<img class="avatar" alt="{{ config.extra.author }}" src="{{ config.extra.avatar }}" />
<div class="banner smaller">
<div class="info">
- <a class="bold-hover" title="permalink to this post" href="{{ post.permalink }}">{% if mention %}№ {{ post.slug }} {% else %}§{% endif %}</a>
+ <a class="bold-hover" title="permalink to this post" href="{{ post.permalink }}">{% if class == "mention" %}№ {{ post.slug }} {% else %}§{% endif %}</a>
<time class="mute" datetime="{{ post.date }}" title="{{ post.date }}">{{ post.date | date(format="%F") }}</time>
<h2 class="mute title">{{ post.title }}</h2>
</div>