From e5fa2f642a4dc39a6561c4f40b9b034f59655722 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Sun, 28 Apr 2024 17:03:06 +0200 Subject: [PATCH] Minor styling improvements The hash is lightly deemphasized and appears only on hover. --- sipa/config/default.py | 24 ++++++++++++++++-------- sipa/static/css/style.css | 6 +++++- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/sipa/config/default.py b/sipa/config/default.py index 1a3b0097..e64311aa 100644 --- a/sipa/config/default.py +++ b/sipa/config/default.py @@ -29,14 +29,22 @@ 'toc' ] FLATPAGES_EXTENSION_CONFIGS = { - 'sane_lists': {}, - 'sipa.utils.bootstraped_tables': {}, - 'sipa.utils.link_patch': {}, - 'meta': {}, - 'attr_list': {}, - 'toc': { - 'permalink': " #" - } + "sane_lists": {}, + "sipa.utils.bootstraped_tables": {}, + "sipa.utils.link_patch": {}, + "meta": {}, + "attr_list": {}, + "toc": { + "permalink": "#", + "permalink_class": " ".join( + [ + "headerlink", + "ms-2", + "link-secondary", + "link-opacity-75", + ] + ), + }, } # Mail configuration diff --git a/sipa/static/css/style.css b/sipa/static/css/style.css index fad088fb..253ba889 100644 --- a/sipa/static/css/style.css +++ b/sipa/static/css/style.css @@ -23,11 +23,15 @@ a:not([class]):hover { .headerlink { color: var(--bs-secondary-color); text-decoration: none; + display: none; } .headerlink:hover { color: var(--bs-heading-color); - font-weight: bold; +} + +:is(h2, h3, h4, h5, h6):hover .headerlink { + display: inline; }