diff options
author | Wolfgang Müller | 2021-06-12 20:28:30 +0200 |
---|---|---|
committer | Wolfgang Müller | 2021-06-12 20:28:30 +0200 |
commit | 34f0c8a527f443c0a296ce301631f2625a808d25 (patch) | |
tree | 4fdfd3ba2323fe56ad38b5dc123fb009d1490f56 /templates | |
parent | 725b8fcbca3db267cee943c64098d6caa77b8cab (diff) | |
download | zunzuncito-34f0c8a527f443c0a296ce301631f2625a808d25.tar.gz |
Put post titles in the banner
Post titles are currently only visible in the feed, or on the post page
itself. Since people may remember posts by their titles rather than
their number, display the titles on each post's banner as well for
easier searching. This means we can now get rid of the extra item in the
post page's description.
A neat side effect is that we now have a header element for each
<article>, making W3C a bit happier.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/macros.html | 5 | ||||
-rw-r--r-- | templates/page.html | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/templates/macros.html b/templates/macros.html index 9f0f792..354eb6e 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -7,11 +7,12 @@ <header> <img class="avatar" alt="{{ config.extra.author }}" src="{{ config.extra.avatar }}" /> <div class="banner smaller"> - <span class="info"> + <div class="info"> <a class="bold-hover" title="permalink to this post" href="{{ post.permalink }}">{% if mention %}№ {{ post.slug }} {% else %}§{% endif %}</a> <time class="mute" datetime="{{ post.date }}" title="{{ post.date }}">{{ post.date | date(format="%F %R") }}</time> + {%- if post.title %} · <h2>{{ post.title }}</h2>{% endif %} {%- if post.draft %}<span class="warning">DRAFT</span>{% endif %} - </span> + </div> {%- if "tags" in post.taxonomies %} <nav class="tags"> <ul class="inline">{{ self::render_tags(tags=post.taxonomies.tags) }}</ul> diff --git a/templates/page.html b/templates/page.html index 8703c7c..394dd97 100644 --- a/templates/page.html +++ b/templates/page.html @@ -10,9 +10,6 @@ post № {{ page.slug }} {%- block description %} post № {{ page.slug }} -{%- if page.title -%} -· <em>{{ page.title }}</em> -{%- endif -%} {%- endblock description %} {%- block content %} |