/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]>
42 lines
1.1 KiB
JSON
42 lines
1.1 KiB
JSON
{
|
|
"name": "nginx-html",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"engines": {
|
|
"node": "^20.19.0 || >=22.12.0"
|
|
},
|
|
"scripts": {
|
|
"build:wasm": "wasm-pack build crates/stp_wasm --target web --out-dir ../../src/wasm",
|
|
"dev": "vite",
|
|
"build": "npm run build:wasm && vite build",
|
|
"build:js": "vite build",
|
|
"preview": "vite preview"
|
|
},
|
|
"dependencies": {
|
|
"@codemirror/lang-html": "^6.4.11",
|
|
"@codemirror/view": "^6.43.14",
|
|
"@mdit/plugin-katex": "^0.24.1",
|
|
"@tailwindcss/vite": "^4.1.18",
|
|
"@vueuse/core": "^14.2.1",
|
|
"axios": "^1.13.2",
|
|
"codemirror": "^6.0.2",
|
|
"dompurify": "^3.3.3",
|
|
"katex": "^0.16.27",
|
|
"markdown-it": "^14.1.0",
|
|
"markdown-it-wikilinks": "^1.4.0",
|
|
"pinia": "^3.0.4",
|
|
"tailwindcss": "^4.1.18",
|
|
"typescript": "^5.9.3",
|
|
"vue": "^3.5.22",
|
|
"vue-router": "^4.6.3"
|
|
},
|
|
"devDependencies": {
|
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
"vite": "^7.3.2",
|
|
"vite-plugin-top-level-await": "^1.6.0",
|
|
"vite-plugin-vue-devtools": "^8.0.3",
|
|
"vite-plugin-wasm": "^3.6.0"
|
|
}
|
|
}
|