From 004e7b8b114dc7335228b167f887c4d5c84bd5df Mon Sep 17 00:00:00 2001 From: Corban-Lee Date: Tue, 15 Oct 2024 12:07:08 +0100 Subject: [PATCH] doc improvement --- apps/home/static/home/js/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/home/static/home/js/index.js b/apps/home/static/home/js/index.js index 2db301c..c1255c2 100644 --- a/apps/home/static/home/js/index.js +++ b/apps/home/static/home/js/index.js @@ -224,6 +224,9 @@ $(".sidebar-backdrop").on("click", () => setSidebarVisibility(false)); $(window).on('resize', () => { const sidebarVisibility = getSidebarVisibility(); + // If the sidebar expands to be permanently visible, remove the pin & open + // effects, so that it collapses again when shrinking the screen. + // // Can't pass conditional directly, causes flickering effect if (sidebarVisibility && $(window).width() > 992) { setSidebarPinned(false);