From a97bf501507ded69c2e81dde84d3af957095e310 Mon Sep 17 00:00:00 2001 From: nschimme <5505185+nschimme@users.noreply.github.com> Date: Sat, 2 May 2026 18:43:05 +0000 Subject: [PATCH 1/5] fix: gandalf navbar placement and mobile behavior - Updated Gandalf logo desktop position to 32px for consistency with mume.org. - Wrapped Gandalf logo in an anchor tag linking to https://mume.org/. - Refactored mobile menu to use v-model for state management, eliminating double-toggle issues. - Optimized z-index values (Gandalf: 120, Toggle: 110) to ensure mobile menu clickability. - Refined scroll-hide logic to ensure navbar visibility at page top (scrollY < 10). - Ensured package-lock.json is preserved for reproducible builds. --- docs/.vitepress/theme/Layout.vue | 16 +++++++--------- docs/.vitepress/theme/mume.css | 5 +++-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/docs/.vitepress/theme/Layout.vue b/docs/.vitepress/theme/Layout.vue index 4740e16..0229208 100644 --- a/docs/.vitepress/theme/Layout.vue +++ b/docs/.vitepress/theme/Layout.vue @@ -15,10 +15,6 @@ const gandalfRef = ref(null) const lastUpdated = __LAST_UPDATED__ -const toggleMenu = () => { - isMenuOpen.value = !isMenuOpen.value -} - let prevScrollpos = 0 const handleScroll = () => { @@ -27,9 +23,9 @@ const handleScroll = () => { const navbar = navbarRef.value const gandalf = gandalfRef.value - if (prevScrollpos > currentScrollPos || prevScrollpos < 10 || width <= 650) { + if (prevScrollpos > currentScrollPos || currentScrollPos < 10 || width <= 650) { if (navbar) navbar.style.top = "0" - if (gandalf) gandalf.style.top = (width <= 650) ? "10px" : "22px" + if (gandalf) gandalf.style.top = (width <= 650) ? "10px" : "32px" } else { if (navbar) navbar.style.top = "-70px" if (gandalf) gandalf.style.top = "-86px" @@ -49,10 +45,10 @@ onUnmounted(() => {