From 1a0291546939b9089b6faae7064a45c7d75ff5d5 Mon Sep 17 00:00:00 2001 From: hovanhoa Date: Tue, 9 Jun 2026 22:11:31 +0700 Subject: [PATCH 1/2] fix(gallery): center header content & grid in max-width container for consistency Co-Authored-By: Claude Opus 4.8 --- pages/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/index.tsx b/pages/index.tsx index eaf85fa..0aca3b6 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -78,7 +78,7 @@ const Home: NextPage = ({ images }: { images: ImageProps[] }) => { 'radial-gradient(100% 140% at 0% 0%, var(--rd-accent-bg), transparent 55%), var(--rd-surface-2)', }} > -
+
hovanhoa ยท gallery

photographs @@ -94,7 +94,7 @@ const Home: NextPage = ({ images }: { images: ImageProps[] }) => { onClose={closeModal} /> )} -
+
{images.map(({id, public_id, format, blurDataUrl}) => ( Date: Tue, 9 Jun 2026 22:14:28 +0700 Subject: [PATCH 2/2] feat: light default theme + cross-subdomain theme sync - default theme is light (no system-preference fallback) - persist theme in a cookie scoped to .hovanhoa.net so toggling on any *.hovanhoa.net subdomain syncs across all of them - anti-flash script reads the shared cookie Co-Authored-By: Claude Opus 4.8 --- components/nav.tsx | 5 ++++- pages/_document.tsx | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/nav.tsx b/components/nav.tsx index e275ba1..7300c25 100644 --- a/components/nav.tsx +++ b/components/nav.tsx @@ -41,8 +41,11 @@ function ThemeToggle() { const next = !dark setDark(next) document.documentElement.classList.toggle('dark', next) + const v = next ? 'dark' : 'light' try { - localStorage.setItem('theme', next ? 'dark' : 'light') + // shared across every *.hovanhoa.net subdomain + document.cookie = `theme=${v}; path=/; max-age=31536000; samesite=lax` + document.cookie = `theme=${v}; path=/; max-age=31536000; samesite=lax; domain=.hovanhoa.net` } catch {} } diff --git a/pages/_document.tsx b/pages/_document.tsx index 63a2599..ee73eda 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -40,7 +40,7 @@ class MyDocument extends Document {