From d436474719a2d3654e2e1f7c62913fceaca1cab0 Mon Sep 17 00:00:00 2001 From: kgva CMS Date: Mon, 10 Aug 2026 22:57:17 +0000 Subject: [PATCH] fix: doom on the home page showed two $ ls blocks (its own + the always-open home menu) --- assets/js/shell.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/assets/js/shell.js b/assets/js/shell.js index 53f11be..de549d6 100644 --- a/assets/js/shell.js +++ b/assets/js/shell.js @@ -241,6 +241,19 @@ // re-run the same wiring a real pjax navigation would (file-row hover/ // click, route rebuilding) against this injected markup document.dispatchEvent(new CustomEvent("pjax:load")); + + // the home page's always-open menu lives in the header, not #main-content + // — hide it too, otherwise its own "$ ls" sits right above doom's and + // the listing looks doubled. restored on the next real navigation + // (leaving doom), which also fires pjax:load — registered after the + // dispatch above so it doesn't just catch its own event. + if (menu && !menu.hidden) { + menu.hidden = true; + document.addEventListener("pjax:load", function unhide() { + menu.hidden = false; + document.removeEventListener("pjax:load", unhide); + }, { once: true }); + } } function egg(lc, raw) {