Browse Source

fixed top scroll for footnotes clicks

master
Marcell Mars 2 years ago
parent
commit
039f0b937b
  1. 10
      _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/js/sandpoints.js
  2. 2
      _vendor/modules.txt

10
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/js/sandpoints.js generated vendored

@ -64,20 +64,12 @@ window.addEventListener('DOMContentLoaded', (e) => {
}
document.querySelectorAll('#TableOfContents a').forEach(i => {
document.querySelectorAll('#TableOfContents a, .anchorz, .footnote-backref, .footnote-ref').forEach(i => {
i.addEventListener('click', e => {
setTimeout(() => {
window.scrollBy({top: document.querySelector('.header').clientHeight * -1.25, behavior: 'smooth'})}, 50);
})
})
document.querySelectorAll('.anchorz').forEach(i => {
i.addEventListener('click', e => {
setTimeout(() => {
window.scrollBy({ top: document.querySelector('.header').clientHeight * -1.25, behavior: 'smooth' })
}, 50);
})
})
})
toggleAllLinks = function () {

2
_vendor/modules.txt vendored

@ -1 +1 @@
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201207142206-ba2a130517be
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201207150315-65923a609e55

Loading…
Cancel
Save