From 0cf87ba31f1f791f268169dddc211311f9f064f4 Mon Sep 17 00:00:00 2001 From: dropforge <151669220+dropforge@users.noreply.github.com> Date: Fri, 16 Feb 2024 16:36:32 +0000 Subject: [PATCH] Improve TOC heading spacing (#496) --- myhpi/static/js/myHPI.js | 1 + myhpi/static/scss/myHPI.scss | 36 +++++++++++++++++++++--------------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/myhpi/static/js/myHPI.js b/myhpi/static/js/myHPI.js index 7198c8ca..303a4a12 100644 --- a/myhpi/static/js/myHPI.js +++ b/myhpi/static/js/myHPI.js @@ -70,6 +70,7 @@ const localizeLastPublished = () => { let abbr = document.createElement("abbr"); abbr.setAttribute("title", lastPublishedLocalized) lastPublished.removeAttribute("title") + lastPublished.innerText = lastPublished.textContent.trim() let parent = lastPublished.parentNode; parent.replaceChild(abbr, lastPublished); diff --git a/myhpi/static/scss/myHPI.scss b/myhpi/static/scss/myHPI.scss index d2c8dba8..cfd2a8cd 100644 --- a/myhpi/static/scss/myHPI.scss +++ b/myhpi/static/scss/myHPI.scss @@ -171,6 +171,12 @@ h1.side-panel-title::after { padding: 0; } +.toc-container ul li a { + display: block; + line-height: 100%; + padding-bottom: 0.3rem; +} + .toc-container ul li>ul { margin-left: 0.5rem; } @@ -302,19 +308,19 @@ img { } @media (pointer: coarse), (hover: none) { - [title] { - position: relative; - display: inline-flex; - justify-content: center; - } - [title]:focus::after { - content: attr(title); - position: absolute; - top: 90%; - color: #000; - background-color: #fff; - border: 1px solid; - width: fit-content; - padding: 3px; - } + [title] { + position: relative; + display: inline-flex; + justify-content: center; + } + [title]:focus::after { + content: attr(title); + position: absolute; + top: 90%; + color: #000; + background-color: #fff; + border: 1px solid; + width: fit-content; + padding: 3px; } +} \ No newline at end of file