The canvas is centred, so on wide screens there is margin to its left
that boxes could not be dragged into: x was clamped to 0 in the drag
geometry, the arrow-key nudge and validateBox. Only y stays clamped.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Drop narration, history and restated-code comments across the repo,
keep short ones for security boundaries, upstream quirks and ordering
constraints, and record the convention in CLAUDE.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A box can now cast a shadow, independent of its frame: ticking "Shadow" in
the box editor gives a hard offset shadow, and Hard/Soft/Glow presets or any
typed CSS box-shadow value customise it. The value is stored on Box and
Component and carried through duplicates, components and layouts.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A component (models.Component, component.graphql) is a named HTML box.
"+ New box" now lists components and places a copy, as it did with the
hard-coded starters; the canvas's new Components button (ComponentPanel)
can also place one linked. A linked box has Box.componentId, its row's
html is nil, and the resolvers fill in the component's html before
answering (fillLinked), so saving the html in the box editor saves the
component and every linked box on every page changes. Only the html is
shared: title, geometry, frame and visibility stay each box's own.
The box editor gains "Save as component" (makes one from an html box and
links it) and, on a linked box, a banner with Detach (gives the box its
own copy). updateBox refuses html on a linked box. Deleting a component
detaches its boxes first, so no page changes. Layouts store the link and
the html; loading relinks only if the component still exists.
The built-in starters in templates.js are no longer listed directly:
"Import built-ins" in the panel creates them as components (skipping
names already taken), so they can be edited and deleted like the rest.
The html helpers there are unchanged. Everything is @admin.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The /stp canvas is now BoxCanvas.vue, keyed by a page. Boxes carry a
page ("stp", "index" for the landing page's notes overlay, or a Page
slug) and an adminOnly flag that the boxes resolver filters server-side.
A new Page type lets the admin create canvas pages in the browser,
served at /<slug> by the router's catch-all (CanvasPage.vue), starting
from a Blank, Shrine or Notes-board layout. Slugs that an SPA or nginx
route would answer first are refused. Renaming a page moves its boxes;
deleting it deletes them.
The GTO, Evangelion and Skipskipbenben placeholder routes are dropped
in favour of canvas pages listed on /shrines, which the landing page
now links to. The box editor gains an admin-only toggle and an
upload-and-insert button, and there are Note, Heading, Text, Gallery
and Video templates.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
/stp is now views/home3/Home3.vue: boxes an admin creates, drags, resizes
and edits in the browser, saved to the database so every visitor sees the
same layout.
- backend: a Box GraphQL type (kind widget|html, x/y/w/h/z in px on a
1400px design canvas, framed, hideOnMobile). Public `boxes` query;
create/update/delete are @admin. Geometry is clamped rather than
rejected. Framed has no gorm default, since GORM would turn an explicit
false into true on insert.
- vue: widget boxes render the existing widgets from a registry; html
boxes render in an iframe sandboxed with allow-scripts and no
allow-same-origin, so admin script can't read cookies or call /api. The
site tokens and fonts (inlined as data: URLs) are injected into each
frame. The canvas scales to fit the window; phones get a single column
in (y, x) order. Edit mode saves geometry on release and has a
CodeMirror side panel (lazy-loaded) with a live HTML preview. Templates
cover Clock, Weather (Open-Meteo) and Image/GIF. "Import current layout"
recreates the old Home.vue grid on an empty canvas.
- Home.vue is kept with a STATUS: legacy header. Docs updated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>