From f005208fc015f8e28e4c9332641c7b9067b2127a Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Wed, 16 Jun 2021 16:42:17 +0200 Subject: 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. --- sass/style.sass | 3 +++ templates/macros.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 @@
{% if mention %}№ {{ post.slug }} {% else %}§{% endif %} - {%- if class != "single" %}

{{ post.title }}

{% endif %} +

{{ post.title }}

{%- if "tags" in post.taxonomies %}