Add per-page backgrounds to canvas pages
Test and deploy / test (push) Successful in 1m56s
Test and deploy / deploy (push) Successful in 1m0s

Each canvas page key (the landing page, /stp, shrines and other admin-made
pages) can have its own background: a colour, an image and how the image
fills the window. Admins set it from a Background button beside Edit layout,
with live preview and image upload or drop; DefaultLayout paints it behind
the whole window and falls back to the halftone.

Backed by a new Background GraphQL type keyed by page key, validated
server-side, hidden with admin-only pages, and moved or deleted along with
its page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-15 00:41:19 +01:00
co-authored by Claude Opus 5.5
parent 967b464779
commit e54aaac181
16 changed files with 1236 additions and 32 deletions
+8
View File
@@ -216,6 +216,14 @@ renders any page's boxes.
The server refuses slugs that an SPA or nginx route would answer first
(`validateSlug` in `backend/graph/page_helpers.go`) — add to that list when
adding a route.
- **Backgrounds.** Each page key can have its own background (`Background` in
GraphQL, `stores/background.js`): a colour, an image, and whether the image
fills the window, fits inside it or tiles. Admins set it with the
"Background" button next to "Edit layout" (`BackgroundEditor.vue`), which
previews live and takes an uploaded or dropped image. `DefaultLayout` paints
it behind the whole window, navbar included, while that canvas is mounted,
and falls back to the halftone. Renaming or deleting a page carries its
background along; an admin-only page's background is hidden with it.
- **Admin only.** A box or a page can be marked admin-only. The server never
sends those to anyone else, so they are fit for private notes; admins see
such boxes outlined, with a 🔒 in edit mode. The "Note" template starts