Let the owner manage categories, and give the menus a shelf
Categories were baked into config/<site>.site.json, so adding one meant a rebuild and a redeploy. They are now data: data/sections.json, seeded from the config the first time, and managed in the admin (add, rename, reorder, remove). A category's web address is fixed when it is created because that is what a QR code points at, and a category cannot be removed while it still holds menus. The landing and the top bar were the ugliest parts. The landing was a column of hairlines with tiny meta — a broadsheet, and the paper that makes this app worth looking at was nowhere on it. It is now a shelf: each category is a row whose right edge is a sliver of that menu's first page, bleeding off the screen, with the shelf edge in brass and the name in heavy tight Archivo. The bar was a row of teal pills that would not survive more categories: it now names the menu you are reading and opens a sheet listing the rest, each with its own paper sliver, and the current one is the only teal thing on screen. The sheet is a link to the landing page, so navigating still works without the script. Also fixes the category manager's own layout, which I shipped unstyled, and the markup contract the route tests described.
This commit is contained in:
1 parent
7bf67cc299
commit
c31b73d553
25 files changed
+1225
-190
No files matched your search
@@ -32,7 +32,8 @@ npm run check-site -- https://menu-new.hopsngrains.com
|
||||
## Layout
|
||||
|
||||
```
|
||||
src/config.ts Site config: brand, theme, Sections, limits
|
||||
src/config.ts Site config: brand, theme, seed Sections, limits
|
||||
src/storage/sections.ts Categories: the Site's own list, edited in the admin
|
||||
src/storage/manifest.ts Manifest type, validation, atomic JSON writes
|
||||
src/storage/sets.ts The Menu Set store: create, add Pages, publish, restore, delete
|
||||
src/storage/validate.ts Boot validation: fatal problems and warnings
|
||||
@@ -43,7 +44,7 @@ src/routes/public.ts Landing, Section, archive and media routes
|
||||
src/routes/admin.ts Sign in, dashboard, editor, upload, publish, restore, delete
|
||||
src/server.ts buildApp (what tests drive) and main (what the container runs)
|
||||
public/ Hand-written CSS, ~2KB of progressive-enhancement JS, Archivo
|
||||
config/ Per-Site config, one file per Site
|
||||
config/ Per-Site brand, theme, limits and the first category list
|
||||
test/ node:test suites
|
||||
docs/plan.md The agreed plan
|
||||
docs/operating.md Publishing, fixing and rolling back, for whoever operates it
|
||||
|
||||
Reference in new issue
Block a user