b57d3a928f
The sphinx documentation [0] describes the _static folder as the location for the custom.js and custom.css so we move the files there, as we do not need those files outside the directory. This also removes the error message when building: WARNING: html_static_path entry '_static' does not exist [0] https://www.sphinx-doc.org/en/master/development/theming.html#add-your-own-static-files-to-the-build-assets Signed-off-by: Hannes Duerr <h.duerr@proxmox.com>
8 lines
295 B
JavaScript
8 lines
295 B
JavaScript
window.addEventListener('DOMContentLoaded', (event) => {
|
|
let activeSection = document.querySelector("a.current");
|
|
if (activeSection) {
|
|
// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
|
|
activeSection.scrollIntoView({ block: 'center' });
|
|
}
|
|
});
|