/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]>
85 lines
1.9 KiB
YAML
85 lines
1.9 KiB
YAML
schema:
|
|
- graph/schema/*.graphql
|
|
|
|
exec:
|
|
filename: graph/generated.go
|
|
package: graph
|
|
|
|
model:
|
|
filename: graph/model/models_gen.go
|
|
package: model
|
|
|
|
resolver:
|
|
layout: follow-schema
|
|
dir: graph
|
|
package: graph
|
|
filename_template: "{name}.resolvers.go"
|
|
|
|
models:
|
|
# Two bindings, tried in order. IntID comes first, so it is what gqlgen
|
|
# picks where it has a free choice — resolver arguments stay `id int`.
|
|
# UintID is there so a model's `ID uint` field binds to `id: ID!` directly,
|
|
# with no hand-written resolver converting it. Both write an id as a quoted
|
|
# decimal string ("12") and read a string or a number, so which one a field
|
|
# uses is invisible on the wire.
|
|
ID:
|
|
model:
|
|
- github.com/99designs/gqlgen/graphql.IntID
|
|
- github.com/99designs/gqlgen/graphql.UintID
|
|
User:
|
|
model:
|
|
- adam-french.co.uk/backend/models.User
|
|
fields:
|
|
password:
|
|
resolver: false
|
|
deletedAt:
|
|
resolver: false
|
|
Post:
|
|
model:
|
|
- adam-french.co.uk/backend/models.Post
|
|
fields:
|
|
deletedAt:
|
|
resolver: false
|
|
Activity:
|
|
model:
|
|
- adam-french.co.uk/backend/models.Activity
|
|
fields:
|
|
deletedAt:
|
|
resolver: false
|
|
Favorite:
|
|
model:
|
|
- adam-french.co.uk/backend/models.Favorite
|
|
fields:
|
|
deletedAt:
|
|
resolver: false
|
|
Rowing:
|
|
model:
|
|
- adam-french.co.uk/backend/models.Rowing
|
|
fields:
|
|
deletedAt:
|
|
resolver: false
|
|
Message:
|
|
model:
|
|
- adam-french.co.uk/backend/models.Message
|
|
fields:
|
|
deletedAt:
|
|
resolver: false
|
|
Bookmark:
|
|
model:
|
|
- adam-french.co.uk/backend/models.Bookmark
|
|
fields:
|
|
deletedAt:
|
|
resolver: false
|
|
Place:
|
|
model:
|
|
- adam-french.co.uk/backend/models.Place
|
|
fields:
|
|
deletedAt:
|
|
resolver: false
|
|
Box:
|
|
model:
|
|
- adam-french.co.uk/backend/models.Box
|
|
fields:
|
|
deletedAt:
|
|
resolver: false
|