diff options
author | Wolfgang Müller | 2021-06-16 16:42:17 +0200 |
---|---|---|
committer | Wolfgang Müller | 2021-06-16 17:04:24 +0200 |
commit | f005208fc015f8e28e4c9332641c7b9067b2127a (patch) | |
tree | 28e71a42d6304d6ca216b8733a61b667d7f5ab18 | |
parent | 89adeed2396b1180273479af089eaca416081e4f (diff) | |
download | zunzuncito-f005208fc015f8e28e4c9332641c7b9067b2127a.tar.gz |
Use CSS to hide titles on single post pages
This removes a branch from the template and also makes sure that screen
readers and similar software still get access to the post title even if
we want to hide it on the presentational layer.
-rw-r--r-- | sass/style.sass | 3 | ||||
-rw-r--r-- | templates/macros.html | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sass/style.sass b/sass/style.sass index c05ed26..9229ce2 100644 --- a/sass/style.sass +++ b/sass/style.sass @@ -151,6 +151,9 @@ article > section.post border-radius: 8px max-width: 100% +article.single h2.title + display: none + div.banner > div.info display: inline-flex diff --git a/templates/macros.html b/templates/macros.html index a331606..6bb608b 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -6,7 +6,7 @@ <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 class != "single" %}<h2 class="mute title">{{ post.title }}</h2>{% endif %} + <h2 class="mute title">{{ post.title }}</h2> </div> {%- if "tags" in post.taxonomies %} <nav class="tags"> |