From 1c93df0a6fe9cc564678b5aba971f20d78c18166 Mon Sep 17 00:00:00 2001 From: welpo Date: Mon, 20 Feb 2023 01:21:20 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BF=EF=B8=8F=20refactor:=20improve=20tabl?= =?UTF-8?q?e=20of=20contents=20accessibility?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/macros/macros.html | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/templates/macros/macros.html b/templates/macros/macros.html index ea4648f..404d252 100644 --- a/templates/macros/macros.html +++ b/templates/macros/macros.html @@ -144,7 +144,7 @@ {# Optional table of contents #} {% if page.extra.toc | default(value=false) %} {% if page.toc %} -
+

Table of Contents

    {% for h1 in page.toc %} @@ -155,24 +155,23 @@ {% for h2 in h1.children %}
  • {{ h2.title }} + {% if h2.children %} + + {% endif %}
  • - - {% if h2.children %} - - {% endif %} {% endfor %}
{% endif %} {% endfor %} -
+
{% endif %} {% endif %}