From 264b8c01156f4f503e69468148e8ee4e4b1de021 Mon Sep 17 00:00:00 2001 From: William Zujkowski Date: Tue, 31 Mar 2026 21:56:38 -0400 Subject: [PATCH] feat: subsection anchor links with :target highlighting (#131) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Inline script assigns IDs to subsection list items: - (a) → #subsec-a - (a)(1) → #subsec-a-1 - (a)(A) → #subsec-a-A Enables deep-linking: /statute/.../section-111/#subsec-b CSS :target highlighting: - Gold background flash when arriving via anchor link - scroll-margin-top for sticky header clearance - Dark mode compatible Closes #131 Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/web/src/pages/statute/[...slug].astro | 25 ++++++++++++++++++++++ apps/web/src/styles/global.css | 16 ++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/apps/web/src/pages/statute/[...slug].astro b/apps/web/src/pages/statute/[...slug].astro index 4dc406c..b7eb354 100644 --- a/apps/web/src/pages/statute/[...slug].astro +++ b/apps/web/src/pages/statute/[...slug].astro @@ -441,6 +441,31 @@ const readingTimeMin = Math.max(1, Math.round(wordCount / 200)); })(); + + +