diff --git a/book/_config.yml b/book/_config.yml index c20e1108cbe9e7a88f798a93562864c19094aaef..0ec1fbdd18d3a0ffffe4787206c72b64c454ef54 100644 --- a/book/_config.yml +++ b/book/_config.yml @@ -13,12 +13,18 @@ sphinx: # 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 diff --git a/book/_static/fix_admonition_style.css b/book/_static/fix_admonition_style.css deleted file mode 100644 index 3cd1764faabdfc939f243a2f4f520b9c17a51ea4..0000000000000000000000000000000000000000 --- a/book/_static/fix_admonition_style.css +++ /dev/null @@ -1,3 +0,0 @@ -.admonition.toggle-hidden .admonition-title ~ * { - display: none; -} diff --git a/book/_static/fix_alert_dark_mode.css b/book/_static/fix_alert_dark_mode.css deleted file mode 100644 index afa49f379a31e417d2fd5bc4a7a18e0516f5ca7f..0000000000000000000000000000000000000000 --- a/book/_static/fix_alert_dark_mode.css +++ /dev/null @@ -1,4 +0,0 @@ -html[data-theme="dark"] .alert { - --bs-alert-bg: #132119; - --bs-alert-color: #d1e7dd; -} diff --git a/book/_static/image_dark_mode.css b/book/_static/image_dark_mode.css deleted file mode 100644 index 8d3a586b4e1e50312a1b85929bf4f4bc18eed343..0000000000000000000000000000000000000000 --- a/book/_static/image_dark_mode.css +++ /dev/null @@ -1,3 +0,0 @@ -html[data-theme="dark"] main img:not(.only-dark):not(.dark-light) { - filter: invert(1) hue-rotate(180deg); -} diff --git a/book/_static/scroll.js b/book/_static/scroll.js deleted file mode 100644 index 5c3aa6179aae52e079b74e2857af95fe7c4e3f2f..0000000000000000000000000000000000000000 --- a/book/_static/scroll.js +++ /dev/null @@ -1,32 +0,0 @@ -// 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; -}); diff --git a/requirements.txt b/requirements.txt index dde3dc2ffa15ac0f0c054a7b3d4c7b8faf3e3bed..ab62e4690ff345135aee36a75637502867fba52c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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