Add static home block renderer and local admin
This commit is contained in:
@@ -13,6 +13,37 @@ python3 -m http.server 8081 --bind 127.0.0.1
|
||||
|
||||
Open http://127.0.0.1:8081/
|
||||
|
||||
## Admin And Render
|
||||
|
||||
The first refactor step keeps the Webflow markup intact, but moves the home page into a block-rendered structure:
|
||||
|
||||
- `content/pages/home.json` - ordered page regions and block instances.
|
||||
- `templates/pages/home/shell.html` - original page shell with block slots.
|
||||
- `templates/pages/home/blocks/` - exact HTML chunks extracted from the current page.
|
||||
- `tools/render-home.mjs` - renders `index.html` from the content model and templates.
|
||||
- `admin/` - local admin UI for block order, enable/disable, duplicate, copy/paste, and JSON edits.
|
||||
|
||||
Run the local admin:
|
||||
|
||||
```bash
|
||||
cd /Users/dcconstructions/Downloads/mnt/NODEDC/NODEDC_SITE
|
||||
npm run admin
|
||||
```
|
||||
|
||||
Open http://127.0.0.1:8090/admin/
|
||||
|
||||
Render the public page after JSON changes:
|
||||
|
||||
```bash
|
||||
npm run render:home
|
||||
```
|
||||
|
||||
If the current `index.html` must be re-extracted into fresh templates:
|
||||
|
||||
```bash
|
||||
npm run extract:home
|
||||
```
|
||||
|
||||
## Structure
|
||||
|
||||
- `index.html`, `beta-apply.html`, `founders.html`, `enterprise.html` - editable local pages.
|
||||
@@ -22,6 +53,7 @@ Open http://127.0.0.1:8081/
|
||||
- `assets/vendor` - third-party browser scripts.
|
||||
- `docs/` - refactor notes, block model draft, and admin plan.
|
||||
- `originals` - untouched files copied from the original wget download.
|
||||
- `backbase/ssscript.app` - original downloaded app bundle backup.
|
||||
- `asset-manifest.json` - source URL to local file mapping.
|
||||
- `tools/build-local-copy.mjs` - rebuild script. It uses `NODEDC_SOURCE_DIR` when provided, otherwise the original local rescue folder.
|
||||
- `tools/localize-ru.mjs` - Russian localization and NODE.DC brand patch script.
|
||||
|
||||
Reference in New Issue
Block a user