From 8a87d3527d8f44abc813d99320d8fcf6a950d593 Mon Sep 17 00:00:00 2001 From: Eric Wagoner Date: Tue, 29 Sep 2026 13:03:36 -0400 Subject: [PATCH] Pages show the hall-wide notice, when there is one, at the top The keeper's hall-announce writes one file on the shared host; the site serves it at /hall/announcement.json, and the banner shows it with the time in the reader's own clock, dismissable one notice at a time. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG --- deploy/Caddyfile.tmpl | 7 ++ src/lib/components/Announcement.svelte | 119 +++++++++++++++++++++++++ src/routes/+layout.svelte | 2 + 3 files changed, 128 insertions(+) create mode 100644 src/lib/components/Announcement.svelte diff --git a/deploy/Caddyfile.tmpl b/deploy/Caddyfile.tmpl index fd38a99..be8cb17 100644 --- a/deploy/Caddyfile.tmpl +++ b/deploy/Caddyfile.tmpl @@ -1,4 +1,11 @@ __HOST__ { + # The hall-wide notice (hall-announce on the host): one file, served by every game's site. + handle_path /hall/* { + root * /var/lib/hall + header Cache-Control "no-store" + file_server + } + root * /opt/waving-hands/build encode gzip zstd diff --git a/src/lib/components/Announcement.svelte b/src/lib/components/Announcement.svelte new file mode 100644 index 0000000..18f343f --- /dev/null +++ b/src/lib/components/Announcement.svelte @@ -0,0 +1,119 @@ + + +{#if shown} +
+ {shown.text}{when} + +
+{/if} + + diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index b93e9ba..33c1fca 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,7 +1,9 @@ + {@render children()}