Add static home block renderer and local admin

This commit is contained in:
dcconstructions
2026-06-25 21:36:08 +03:00
parent 03e19601f3
commit aaae2da433
18 changed files with 1313 additions and 0 deletions
+22
View File
@@ -166,6 +166,28 @@ Global non-block content:
5. Add Payload CMS only after static JSON rendering is visually stable.
6. Optimize media and runtime after block rendering is stable.
## Phase 1 Implementation Status
Started on June 25, 2026.
Implemented:
- `content/pages/home.json` contains the first ordered block model for the home page.
- `templates/pages/home/shell.html` contains the current Webflow shell with two render slots.
- `templates/pages/home/blocks/` contains exact HTML block chunks extracted from the current localized page.
- `tools/render-home.mjs` renders `index.html` from the JSON model and templates.
- `tools/extract-home-blocks.mjs` can regenerate the first template split from the current `index.html`.
- `tools/admin-server.mjs` and `admin/` provide a local block editor.
Current guarantee:
- Rendering through `npm run render:home` has byte-for-byte parity with the pre-refactor `index.html`.
Current limitation:
- Blocks are still HTML-template blocks. The admin can manage order, enabled state, duplication, copy/paste, IDs, labels, anchors, and raw block JSON. The next pass must extract text/media fields from each block template into typed JSON fields.
- The `c-viz` wrapper is preserved as a region boundary because it is coupled to WebGL/color-flip behavior. Blocks inside that region should stay inside it until the runtime is better understood.
## Optimization Passes
Do after structural parity, not before: