From 6849d8ffe5ccdffe5a9a46571f321155a762e323 Mon Sep 17 00:00:00 2001 From: Wesley Ray Date: Fri, 14 Aug 2026 09:18:07 -0400 Subject: [PATCH] Reading map: a legend under the figure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Five marks, and until now the only way to learn what any of them meant was to hover a dot. The last row is the one worth having: it says out loud that the fuchsia node is where the quote at the top of the page came from, which is otherwise a connection nobody would guess was being made. Three things it does not do: Counts come from the payload at mount, not from the markup — they move every time a book is indexed, and a hardcoded 8,424 would go stale on the next one. Swatches take the palette the renderer resolved rather than re-reading the CSS vars, so a scheme modifier on the container (`--ember` swaps the newest hue) cannot leave the legend describing a different picture than the one on screen. The quoted row follows markQuoted's return value, not the attempt. A quote whose source book was never indexed leaves the map unmarked, and the legend now stays quiet about it instead of pointing at a colour that is not there. Co-Authored-By: Claude Opus 5 --- src/components/ReadingMap.astro | 89 ++++++++++++++++++++++++++++++--- src/lib/reading-map.js | 11 ++-- 2 files changed, 91 insertions(+), 9 deletions(-) diff --git a/src/components/ReadingMap.astro b/src/components/ReadingMap.astro index 4ea1710..613284b 100644 --- a/src/components/ReadingMap.astro +++ b/src/components/ReadingMap.astro @@ -40,6 +40,17 @@ const {
{caption &&
{caption}
} + + {/* Counts are filled in from the payload at mount, not hardcoded — they move every time a + book is indexed. The `quoted` row stays hidden until markQuoted() actually finds a node, + so the legend never names a mark that is not on screen. */} +