diff --git a/src/jupyterbook_patches/patches/_static/fix_alert_dark_mode.css b/src/jupyterbook_patches/patches/_static/fix_alert_dark_mode.css deleted file mode 100644 index afa49f3..0000000 --- a/src/jupyterbook_patches/patches/_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/src/jupyterbook_patches/patches/_static/image_dark_mode.css b/src/jupyterbook_patches/patches/_static/image_dark_mode.css deleted file mode 100644 index 5b3e850..0000000 --- a/src/jupyterbook_patches/patches/_static/image_dark_mode.css +++ /dev/null @@ -1,7 +0,0 @@ -html[data-theme="dark"] img:not(.only-dark):not(.dark-light) { - filter: invert(1) hue-rotate(180deg); -} - -html[data-theme="dark"] .logo img { - filter: invert(1) hue-rotate(180deg); -} \ No newline at end of file diff --git a/src/jupyterbook_patches/patches/_static/scroll.js b/src/jupyterbook_patches/patches/_static/scroll.js deleted file mode 100644 index 422d500..0000000 --- a/src/jupyterbook_patches/patches/_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/src/jupyterbook_patches/patches/dark_mode.py b/src/jupyterbook_patches/patches/dark_mode.py deleted file mode 100644 index 08c766e..0000000 --- a/src/jupyterbook_patches/patches/dark_mode.py +++ /dev/null @@ -1,10 +0,0 @@ -from jupyterbook_patches.patches import BasePatch, logger - - -class DarkModePatch(BasePatch): - name = "darkmode" - - def initialize(self, app): - logger.info("Initializing dark mode patch") - app.add_css_file(filename="fix_alert_dark_mode.css") - app.add_css_file(filename="image_dark_mode.css") diff --git a/src/jupyterbook_patches/patches/scroll.py b/src/jupyterbook_patches/patches/scroll.py deleted file mode 100644 index 66df91d..0000000 --- a/src/jupyterbook_patches/patches/scroll.py +++ /dev/null @@ -1,9 +0,0 @@ -from jupyterbook_patches.patches import BasePatch, logger - - -class ScrollPatch(BasePatch): - name = "scroll" - - def initialize(self, app): - logger.info("Initializing scroll patch") - app.add_js_file(filename="scroll.js", loading_method="async")