From 1ecdc1044398676b59223e7426c7d2774a3a6f83 Mon Sep 17 00:00:00 2001 From: rzen Date: Mon, 4 May 2026 17:57:21 -0400 Subject: [PATCH] =?UTF-8?q?site:=20editorial=20controls=20+=201d-chess=20f?= =?UTF-8?q?ind=20=E2=80=94=20chunk=205/4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add EditAction + EditConfirm components (dev-only editorial UI bits) - Stage 1d-chess find page (missed by earlier glob since slug starts with a digit) --- src/components/EditAction.astro | 64 +++++++++ src/components/EditConfirm.astro | 196 ++++++++++++++++++++++++++++ src/content/find/1d-chess/hero.svg | 13 ++ src/content/find/1d-chess/index.mdx | 11 ++ 4 files changed, 284 insertions(+) create mode 100644 src/components/EditAction.astro create mode 100644 src/components/EditConfirm.astro create mode 100644 src/content/find/1d-chess/hero.svg create mode 100644 src/content/find/1d-chess/index.mdx diff --git a/src/components/EditAction.astro b/src/components/EditAction.astro new file mode 100644 index 0000000..fd14de3 --- /dev/null +++ b/src/components/EditAction.astro @@ -0,0 +1,64 @@ +--- +interface Props { + label: string; + command?: string; + confirm: string; + action?: string; + variant?: 'inline' | 'block'; +} +const { + label, + command, + confirm, + action = 'copy', + variant = 'block', +} = Astro.props; +--- + + + + diff --git a/src/components/EditConfirm.astro b/src/components/EditConfirm.astro new file mode 100644 index 0000000..af66158 --- /dev/null +++ b/src/components/EditConfirm.astro @@ -0,0 +1,196 @@ +--- +// Singleton confirm dialog + toast for editorial actions. +// Included once in BaseLayout when import.meta.env.DEV is true. +// Listens for clicks on any [data-edit-action] element, presents a confirm +// modal, then copies the command to the clipboard on go. +--- + + + + + + + + diff --git a/src/content/find/1d-chess/hero.svg b/src/content/find/1d-chess/hero.svg new file mode 100644 index 0000000..6bfa2fc --- /dev/null +++ b/src/content/find/1d-chess/hero.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/content/find/1d-chess/index.mdx b/src/content/find/1d-chess/index.mdx new file mode 100644 index 0000000..3d815e1 --- /dev/null +++ b/src/content/find/1d-chess/index.mdx @@ -0,0 +1,11 @@ +--- +name: "1D Chess" +subtitle: "Chess puzzle reduced to a single line of squares" +date: 2026-05-03 +link: https://rowan441.github.io/1dchess/chess.html +source: "Daring Fireball — Linked List" +topics: [general-delight] +tags: [puzzle, chess, web-toy, free] +--- + +Strip a chessboard to one row of eight squares and you'd think the game collapses — instead the puzzles get harder to see, because the spatial intuition that helps in 2D is gone. A small browser toy that takes about thirty seconds to learn and longer than expected to get good at. Free, no signup, no ads.