From 12539b16a8c5a2733b5dc39670bad36b4a660009 Mon Sep 17 00:00:00 2001 From: ClovertaTheTrilobita Date: Fri, 18 Sep 2026 16:41:41 +0800 Subject: [PATCH] fix menu button --- src/components/Posts/PostMenu.astro | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/Posts/PostMenu.astro b/src/components/Posts/PostMenu.astro index 1402303..a432e57 100644 --- a/src/components/Posts/PostMenu.astro +++ b/src/components/Posts/PostMenu.astro @@ -202,7 +202,7 @@ const tocHeadings = headings.filter((h) => h.depth === 2 || h.depth === 3); position: fixed; top: 0.75rem; right: 0.8rem; - z-index: 30; + z-index: 40; max-width: min(78vw, 22rem); padding: 0.6rem 0.75rem; border: 1.5px solid var(--deep-blue); @@ -252,7 +252,7 @@ const tocHeadings = headings.filter((h) => h.depth === 2 || h.depth === 3); position: fixed; top: calc(env(safe-area-inset-top) + 4.2rem); right: 0.8rem; - z-index: 29; + z-index: 39; width: min(88vw, 24rem); max-height: min(65vh, 32rem); overflow-x: hidden; @@ -299,6 +299,10 @@ const tocHeadings = headings.filter((h) => h.depth === 2 || h.depth === 3); if (btn.dataset.bound === "true") return; btn.dataset.bound = "true"; + // Keep the fixed controls outside the animated article container so + // the header and its divider cannot create a higher paint layer. + document.body.append(btn, panel); + const defaultText = preview.getAttribute("data-default-text") || "本文目录";