Skip to content

Commit

Permalink
Improve TOC heading spacing (#496)
Browse files Browse the repository at this point in the history
  • Loading branch information
dropforge authored Feb 16, 2024
1 parent 4b04c07 commit 0cf87ba
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
1 change: 1 addition & 0 deletions myhpi/static/js/myHPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
36 changes: 21 additions & 15 deletions myhpi/static/scss/myHPI.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
}

0 comments on commit 0cf87ba

Please sign in to comment.