From 3326723293908aa6db852a9fcb46fce3853bbab3 Mon Sep 17 00:00:00 2001 From: Nicholai Date: Sun, 21 Dec 2025 02:12:44 -0700 Subject: [PATCH] Add first-visit theme preference dialog and integrate into base layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Introduce ThemePreferenceDialog.astro with two‑step flow and reduced motion support. - Modify BaseLayout.astro to render dialog for first‑time visitors. - Ensure dialog respects user preferences and theme toggles. Hubert The Eunuch --- src/components/ThemePreferenceDialog.astro | 252 +++++++++++++++++++++ src/layouts/BaseLayout.astro | 13 +- 2 files changed, 263 insertions(+), 2 deletions(-) create mode 100644 src/components/ThemePreferenceDialog.astro diff --git a/src/components/ThemePreferenceDialog.astro b/src/components/ThemePreferenceDialog.astro new file mode 100644 index 0000000..11366ae --- /dev/null +++ b/src/components/ThemePreferenceDialog.astro @@ -0,0 +1,252 @@ +--- +// First-visit theme preference dialog +// Shows only to true first-time visitors +// Two-step flow: theme selection → remember preference +--- + +
+ +
+ +
+
+
+
+ + +
+ +
+
+
+ + THEME_SELECT + +
+ +
+ + +

+ Choose Theme +

+

+ Select your preferred visual mode +

+ + +
+ + + + + +
+
+ + + +
+
+ + diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index c13848c..7aa6a79 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -5,6 +5,7 @@ import Footer from '../components/Footer.astro'; import GridOverlay from '../components/GridOverlay.astro'; import Navigation from '../components/Navigation.astro'; import CustomCursor from '../components/CustomCursor'; +import ThemePreferenceDialog from '../components/ThemePreferenceDialog.astro'; import { HTML_MARKER, SITE_TITLE, SITE_DESCRIPTION, SOCIAL_LINKS } from '../consts'; interface Props { @@ -69,8 +70,13 @@ const personSchema = { @@ -90,6 +96,9 @@ const personSchema = { + + +