From 081c2bffb329182d92cf0534dd42b11826a87c39 Mon Sep 17 00:00:00 2001
From: memdmp <memdmp@estrogen.zone>
Date: Wed, 28 Jan 2026 01:06:31 +0100
Subject: feat: more theme work

---
 src/lib/blog/Post.svelte | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

(limited to 'src/lib/blog/Post.svelte')

diff --git a/src/lib/blog/Post.svelte b/src/lib/blog/Post.svelte
index 9fcc319..05afa78 100644
--- a/src/lib/blog/Post.svelte
+++ b/src/lib/blog/Post.svelte
@@ -5,6 +5,7 @@
 <script lang="ts">
   import { building, dev } from '$app/environment';
   import { page } from '$app/state';
+  import theme from '../theme.svelte';
 
   import { parsePostMetadata, type Post } from './Post';
 
@@ -43,9 +44,8 @@
     </p>
     {#if !ignorePublishedStatus && dev}
       <p class="mt-1 5">
-        <a
-          href={new URL('?ignore-unpublished=+', page.url).href}
-          class="quicklink">Ignore and read anyway</a
+        <a href="?ignore-unpublished" class="quicklink"
+          >Ignore and read anyway</a
         >
       </p>
     {:else if ignorePublishedStatus}
@@ -73,7 +73,15 @@
           class="quicklink"
           target="_blank"
           rel="noopener noreferrer">src</a
-        >{/if}<span class="select-none">▒</span>ctime: {meta.created
+        >{/if}<span class="select-none">▒</span><a
+        href="?theme={theme.opposite}"
+        class="quicklink theme-selector"
+        onclick={(e) => {
+          theme.flip();
+          e.currentTarget.blur();
+          e.preventDefault();
+        }}>toggle theme</a
+      ><span class="select-none theme-selector">▒</span>ctime: {meta.created
         .toISOString()
         .split('T')[0]}<span class="select-none">▒</span>mtime: {meta.updated
         .toISOString()
-- 
cgit v1.2.3

