Skip to main content

Popfold starter: a compact, built in code

A complete small Popfold site to copy: an office in a box. Six sections, one home, no model files. Every line in [brackets] in index.html is placeholder copy.

pnpm --filter popfold-template-compact dev # http://127.0.0.1:5190 (studio: /studio.html)
pnpm --filter popfold-template-compact build:static # stills + dist/

To start your own site from it, run node bin/popfold.mjs init <folder> in the Popfold folder, then work through the guide's "Create your own Popfold site".

FileWhat to change
index.htmlThe copy. One <section class="stage" id="…"> per beat of the story
src/home.tsHow each kind of piece is built (kinds), and the pieces' palette (K)
src/home.jsonThe home as data: its name, its look (look: the case's colours and each floor and wall), the lid's wordmark (emblem), the story (beats: one per section, with its camera), and each piece, where it stands and the story card behind it
src/main.tsWhich section a click on each room scrolls to (onPick)
src/style.cssThe page's look
vite.config.tsThe site's name, and which section each room's stories go under
src/studio.ts, studio.htmlThe studio page; nothing to change unless you add homes

Piece keys here are center/…, left/… and right/… (with -wall for wall pieces). Give the rooms your own names with rooms: { center: 'studio', left: 'library', right: 'workshop' } in the recipe.