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 */ /* Format multiple footnote backlinks */
span.fn-backref { .footnote-list .footnote .backrefs {
display: none; display: none;
} }
dl.footnote span.brackets:not(:last-child)::before { .fn-bracket {
content: '['; display: none;
}
dl.footnote span.brackets:not(:last-child)::after {
content: ']';
} }

View File

@ -2,7 +2,7 @@ function initFootnotes() {
var elPreview = document.getElementById('footnote-preview'); var elPreview = document.getElementById('footnote-preview');
function mouseoverFootnote(evt) { 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.innerHTML = fnText;
elPreview.style.display = 'block'; elPreview.style.display = 'block';
elPreview.style.top = (evt.target.getBoundingClientRect().top + 16) + 'px'; elPreview.style.top = (evt.target.getBoundingClientRect().top + 16) + 'px';

View File

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