Skip to content
Snippets Groups Projects
Verified Commit 9ce83b7e authored by Rok Štular's avatar Rok Štular
Browse files

chore(deps): Move patches into own package

parent 1fad10f6
No related branches found
No related tags found
2 merge requests!350Publish configuration changes,!349chore(deps): Move patches into own package
Pipeline #220598 passed
......@@ -2,31 +2,31 @@ title: MUDE
author: MUDE Teachers and the Student Army
copyright: "2023"
logo: _static/MUDE_Logo-small.png
execute:
execute_notebooks: "off"
only_build_toc_files: true
sphinx:
config:
# Bibliography style
bibtex_reference_style: author_year
html_js_files:
- https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js
- https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js
patch_config:
enabled-patches:
- scroll
- darkmode
- layout
extra_extensions:
- sphinx_inline_tabs
- sphinx_grasple
- sphinx.ext.imgconverter
- download_link_replacer
- jupyterbook_patches
bibtex_bibfiles:
- _bibliography/references_pd.bib
launch_buttons:
thebe: true
draft_banner: '⚠️This is a draft website. The most recent published version can be found <a href="https://mude.citg.tudelft.nl/book/intro.html">here</a>.⚠️'
html:
use_multitoc_numbering: false
announcement: '⚠️This is a draft website. The most recent published version can be found <a href="https://mude.citg.tudelft.nl/book/intro.html">here</a>.⚠️'
.admonition.toggle-hidden .admonition-title ~ * {
display: none;
}
html[data-theme="dark"] .alert {
--bs-alert-bg: #132119;
--bs-alert-color: #d1e7dd;
}
html[data-theme="dark"] main img:not(.only-dark):not(.dark-light) {
filter: invert(1) hue-rotate(180deg);
}
// Keep track of the scroll position
const NAVIGATION_ELEMENT_CLASS = "bd-sidebar-primary";
document.addEventListener("DOMContentLoaded", () => {
addEventListener("beforeunload", () => {
let elements = document.getElementsByClassName(NAVIGATION_ELEMENT_CLASS);
if (elements.length === 0) {
console.warn("No sidebar found, cannot save scroll position");
return;
}
localStorage.setItem("navigationScrollPosition", elements[0].scrollTop);
});
let elements = document.getElementsByClassName(NAVIGATION_ELEMENT_CLASS);
if (elements.length === 0) {
console.warn("No sidebar found, cannot restore scroll position");
return;
}
let scrollPosition = localStorage.getItem("navigationScrollPosition");
if (scrollPosition == null) {
return;
}
// Convert scroll position into a positive number and apply it
let parsedPosition = Math.abs(scrollPosition);
console.debug(`Restoring scroll position to ${parsedPosition}`);
elements[0].scrollTop = isNaN(parsedPosition) ? 0 : parsedPosition;
});
......@@ -3,4 +3,6 @@ jupyter-book
sphinx-inline-tabs
git+https://github.com/dbalague/sphinx-grasple
jupyterquiz
docutils == 0.17.1
\ No newline at end of file
docutils == 0.17.1
--extra-index-url https://gitlab.tudelft.nl/api/v4/projects/17983/packages/pypi/simple
jupyterbook_patches
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment