Update footnotes for new Sphinx

This commit is contained in:
RunasSudo 2023-09-23 22:36:20 +10:00
parent 6098e2fcc7
commit 23c6749de2
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
3 changed files with 7 additions and 10 deletions

View File

@ -12,13 +12,10 @@ sup {
/* Format multiple footnote backlinks */
span.fn-backref {
.footnote-list .footnote .backrefs {
display: none;
}
dl.footnote span.brackets:not(:last-child)::before {
content: '[';
}
dl.footnote span.brackets:not(:last-child)::after {
content: ']';
.fn-bracket {
display: none;
}

View File

@ -2,7 +2,7 @@ function initFootnotes() {
var elPreview = document.getElementById('footnote-preview');
function mouseoverFootnote(evt) {
var fnText = document.querySelector(evt.target.getAttribute('href')).nextElementSibling.children[0].innerHTML;
var fnText = document.querySelector(evt.target.getAttribute('href') + ' p').innerHTML;
elPreview.innerHTML = fnText;
elPreview.style.display = 'block';
elPreview.style.top = (evt.target.getBoundingClientRect().top + 16) + 'px';

View File

@ -57,11 +57,11 @@ a, a.reference, a.footnote-reference {
/* Footnotes */
dl.footnote dt {
.footnote-list .footnote {
position: relative;
}
span.fn-backref {
.footnote-list .footnote .backrefs {
position: absolute;
background-color: white;
z-index: 999;
@ -71,7 +71,7 @@ span.fn-backref {
top: -3px;
}
dl.footnote dt:hover span.fn-backref {
.footnote-list .footnote:hover .backrefs {
display: inline;
}