diff --git a/.impeccable/design.json b/.impeccable/design.json index 3e40003..97f2547 100644 --- a/.impeccable/design.json +++ b/.impeccable/design.json @@ -392,7 +392,7 @@ "role": "tertiary", "displayName": "Pale Kraft", "canonical": "#d9ccb3", - "purpose": "Footer body text on walnut.", + "purpose": "Footer body text on walnut. Shipped as a literal #d9ccb3 in style.css (.site-footer p, .footer__fine); there is no --kraft-pale custom property.", "tonalRamp": [ "#292214", "#4b3e25", @@ -590,7 +590,15 @@ ], "note": "Reproduces the mod's panel in the game's colours, frames and Noto Sans; reads only --ink, --muted, --edge and --orange from the site. Not site style: don't reuse it or restyle it." } - ] + ], + "browserChrome": { + "theme-color": "#16231c", + "purpose": " on every page, one value for both modes (a green-black near the night ground); not a palette token." + }, + "carcassFill": { + "value": "#3a2416", + "purpose": "The fill under the walnut texture on the cabinet carcass (.cab) and the scale folio mini cabinets (.mini-cab); drawers use walnut-2 #5d3c28." + } }, "components": [ { diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..1725299 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,153 @@ +# CLAUDE.md + +MixedStorage (timbermods/MixedStorage) is a Timberborn mod: one warehouse or pile holds several goods, each with a share +of capacity set by percentage. C# in `source/` (mod), `multiplayer/` (bundled BeaverBuddies Stability Fork bridge), +`tests/` (allocation tests, site test, version check), `loading-tests/`; the website is `site/`. Changes land on `main` +through a PR → merge. + +- CI (`.github/workflows/tests.yml`, every PR) runs, and you can run locally without the game: + `dotnet run --project tests/AllocationTests.csproj -c Release` (prints `PASS: 19,138 assertions…`), + `node tests/test-site.mjs` (76/76), and `powershell -NoProfile -Command ".\tests\check-version.ps1"` (prints `1.2.0`). +- The full mod build needs the game and DLLs: `.\build.ps1 -HarmonyPath <0Harmony.dll> -BeaverBuddiesPath ` + (see `docs/DEVELOPMENT.md`). The version lives only in `Directory.Build.props` plus + `packaging/MixedStorage/version-1.1/manifest.json`; a release bump also touches README, CHANGELOG.md and the site's + status note (`site/index.html#status`). + +## Standing rules + +- Never launch or drive Timberborn, and never touch installed mods or saves. The maintainer (Kyler) playtests himself. +- Commit on a branch and open a PR. Merge only when Kyler says so in the chat. +- Upgrade facts players need stay (replace files with the game closed; allocations are kept; remove the old + MixedStorage-BeaverBuddies add-on). Other version history goes only in CHANGELOG.md and release notes. + +## Website + +- **Where:** `site/`: `index.html` (features, cabinet, demo), `install.html`, `troubleshooting.html`, `faq.html`, + `404.html`, plus `robots.txt`, `sitemap.xml`, `.nojekyll`. Live at https://timbermods.github.io/MixedStorage/. +- **Published:** GitHub Pages serves the **`gh-pages`** branch, not main. After the PR is merged, run + `.\deploy-site.ps1` from a clean checkout of `origin/main` (it publishes that working tree's `site/`; `-DryRun` + lists the changes without pushing). Pages updates in about a minute. +- **Look:** "The Apothecary Drawer Cabinet". The site is one walnut cabinet on a painted wall: every drawer is a good, + and its height is that good's share, with brass label holders, kraft cards and brass cup pulls. The look is fixed: + updates extend it and never restyle it. +- **Design records (read these before any site change):** + - `PRODUCT.md`: the facts, voice, and every site contract. + - `DESIGN.md`: the visual system and its named rules, the source of truth for the look. + - `.impeccable/surfaces/site-index-html.md`: the direction contract. + - `.impeccable/design.json`: tokens and component snippets. + - `.impeccable/critique/`: the pre-redesign critique. `.impeccable/config.json`: detector ignores. + +### Design rules (from DESIGN.md; keep them) + +- **Fixed Materials**: only the wall changes between day and lamplight (ground, paper, ink, rule, link, orange). + Walnut, brass and kraft keep one value in both modes. +- **One Metal**: brass is the only accent that fills. The primary action (Download) is the one brass plate per view; + everything else is walnut, kraft or ink. Orange (`--orange`) is only the warning note's tab and the replica's Apply ring. +- **Card Ink**: text on kraft or brass is kraft-ink `#231a12`. Text on walnut is kraft `#d8c29b`, pale kraft `#d9ccb3` + or polished brass `#e0c27e`, and turns white on hover. +- **Names-Not-Sentences**: Alegreya SC is for names, headings, labels, buttons and figures. Questions, captions, notes + and prose use the system face. +- **Counter**: every count, capacity and percentage uses tabular figures; proportions are drawn at true share. +- **Mounted-or-Set-In**: paper panels are set in (1.5px rule border, no shadow); the cabinet, frames, plates and + hardware are mounted (one soft shadow downward). Nothing floats or glows. +- **Rail**: header and footer meet the page with a 3px tarnished-brass (`#8a6a2c`) rail. +- Tokens live in `site/assets/style.css` `:root`; night values in `@media (prefers-color-scheme: dark)`. Day / night: + ground `--bg` #dfe4da / #18221f, tint `--bg-deep` #d0d8cc / #111916, `--paper` #eef1ea / #1f2b27, `--ink` #1d2320 / + #ece6d8, `--muted` #4c5751 / #b8b09d, `--line` #aab5ab / #34423c, `--link` #1f5a50 / #8fd0c2, `--orange` #b35c10 / + #ffa60f. Fixed: walnut #4a2f1f, #5d3c28, #6e4a32, edge #2e1c12, carcass fill #3a2416; brass #c19a4b, hi #e0c27e, + deep #8a6a2c; kraft #d8c29b. Two literals with no custom property: pale kraft `#d9ccb3` (footer text) and every + page's `` (one value for both modes). The legacy classes + `panel--blue` / `panel--maroon` in install and troubleshooting just map to paper; leave them. +- Fonts: Alegreya SC 500 and 700, self-hosted in `site/assets/fonts/` (`OFL-Alegreya.txt`); body is the system-ui + stack; mono is ui-monospace. Noto Sans 400/700 (`OFL.txt`) belongs to the panel replica only. No other webfonts, + nothing from a CDN at runtime. +- Textures: `walnut.webp` (tile 720px), `kraft.webp` (tile 200px), `brass.webp` (fit to height), `holder.png` + (nine-slice, `border-image: url(textures/holder.png) 16`), `pull.png` (the one "this opens" sign, on drawers and + accordions), made by `site/assets/textures/make_textures.py` (numpy + Pillow, seed 1200; run it from that folder). + Change the script and re-run it rather than editing images. Every shipping raster carries provenance (a + `.json` sidecar): run the Impeccable `embed-prompt` command on each new or changed image. +- Themes: light and dark follow the OS (`prefers-color-scheme`) only. There is no toggle and no storage key. Check both. +- Phones: no horizontal scroll at 390px, and tap targets ≥ 44px (buttons 48, small 44, toc 46, accordions 52). + Breakpoints 900 / 760 (brass Menu button) / 600px. +- Motion: the cabinet's drawers ease `flex-grow` and `padding-bottom` over 0.6s cubic-bezier(.2,.8,.2,1) when a split + button redraws them (`cabinet.js` with `split.js`, the mod's rounding); plates lift 1px; an accordion's pull drops + 3px. Everything is off under `prefers-reduced-motion`. +- The in-game panel replica (`game-panel.css`, `demo.js`, `goods.js`, `split.js`) must keep matching the mod's real + Storage Allocation panel (the 0.5.7-era native look; `site/assets/panel.webp` is the in-game screenshot). It reads only + `--ink`, `--muted`, `--edge`, `--orange`. Don't restyle it toward the cabinet or reuse its parts elsewhere. Update + `split.js` / `demo.js` when the mod's rounding (`AllocationPlan.Capacities`) or messages (`StorageView`) change. +- Don't: imitate wood, brass or paper with CSS gradients or bevels; put kickers or small labels above headings; build + stat rows or icon-tile grids; use hard zero-blur offset shadows; set sentences in Alegreya SC; add a second accent + fill; use official Timberborn logos or key art (the goods icons in `site/assets/goods/` are allowed and credited). +- New components: build them from the tokens and components above, match the neighbouring sections, and add them to + DESIGN.md. + +### Content rules + +- Describe the mod as it is now. Don't write "New in ", "added in …" or version history on player pages; + that belongs in CHANGELOG.md and the GitHub release notes. +- The played and not-played status matches the README's "Compatibility and testing" exactly. Never invent numbers, + reviews or screenshots. +- Keep the credits and lines: goods icons are Timberborn's; "An unofficial community mod … Not affiliated with or + endorsed by Mechanistry"; maintained by Timbermods; MIT for the project, OFL for the fonts. +- Terminology as in game and README: Storage Allocation, Apply 100%, Apply: store nothing, Copy allocations, Paste + allocations, Clear all, Revert, Max, Allocated goods only, excess, Accept / Obtain / Supply / Empty, Copy settings + (the game's tool), BeaverBuddies Stability Fork. +- `site/assets/release.js` is shared across timbermods sites and byte-identical: replace it, never edit it. + +### Update the website for a new release + +When asked to "update the website for the latest release, consistent with the design": +1. Read the release and the docs: `gh release list -R timbermods/MixedStorage -L 5`, + `gh release view -R timbermods/MixedStorage`, README, CHANGELOG.md, `docs/DEVELOPMENT.md`. List every + player-facing change. +2. Update every place the site states a changed fact: + - The release version is **never** written statically: `release.js` fills `data-release="tag"` (fallback text + "the mod"), `data-release="asset-name"` (fallback `MixedStorage-vX.Y.Z.zip`, which the test requires), + `data-release-href="download"|"notes"` (fallback `…/releases/latest` or `…/releases`) and the + `data-release-show` pills. Leave those fallbacks alone. `grep -rn "" site` should find nothing. + - Game version (`grep -rn "1\.1\.2\.4" site`): install meta/og description, hero meta row and `#buildings` ledger + (index), `#requirements` ledger and the `#verify` log line (install), `#faq-version`, and `footer__fine` on all + five pages including 404. The `version-1.1` folder appears in install `#steps` and troubleshooting `#t-not-listed`. + - Harmony version (`grep -rn "2\.4\.1" site`): hero meta, `#buildings` ledger, install requirements and step 4, + troubleshooting `#t-harmony`. + - Status: the `#status` note ("What's been played") in index.html, plus PRODUCT.md's Operating Context and + Honest status. + - Features and controls: index `#features` rules list (three rules) and the `#in-the-game` ledger; install `#first` + (steps, the store-nothing paragraph, the drafts note, the controls table), `#upgrading` warn note, `#multiplayer` + list; the FAQ groups; troubleshooting `#problems`. Supported buildings: index `#buildings` table and `#faq-buildings`. + - Panel changes: the replica (`demo.js`, `game-panel.css`) and its tips list; ask Kyler for a new in-game + screenshot rather than faking one. +3. Put new content into the existing components: a new question goes in the right FAQ group as a `details.qa` with a + stable id; a new problem is a `details.qa` in troubleshooting with "Why it happens" / "What to do" h4s; a new + control is a row in install's controls table; a feature is a `.ledger` row; a caution is a `.panel.note.note--warn`. + Don't restyle anything. +4. Test: `node tests/test-site.mjs` (must pass 76/76). It enforces: download buttons (`a.btn` "Download") with + `data-release-href="download"` and a `/releases/latest` fallback on index and install; elements marked `hidden` stay + hidden under the stylesheets; `404.html` loads assets by absolute `/MixedStorage/` paths; every page loads + `assets/release.js` with the same `data-repo` and `data-asset`; the offered-release scenarios. CI also runs the + allocation tests and `tests/check-version.ps1`. +5. Preview: `python -m http.server 8788 -d site` (in the background), then open http://localhost:8788/. Capture light, + dark and a 390px phone. If the personal `impeccable-site-flow` skill is available, use + `python /scripts/capsite.py http://localhost:8788/ "" install.html troubleshooting.html faq.html 404.html`; + otherwise use the Browser pane in both colour schemes at desktop and mobile sizes. Check the changed sections and + that there's no horizontal scroll. Stop the server afterwards. +6. Optional but recommended: run the detector, + `"$(ls -d ~/.claude/plugins/cache/impeccable/impeccable/*/skills/impeccable | tail -1)/scripts/impeccable" detect --json site` + (parse from the first `[`). Known false positives: cramped-padding on the four main pages and flat-type-hierarchy on + 404 (ignored in config); `side-tab` on the 3px walnut rules (`.page-head`, `.rules li`) and the scale folio's leader + line; `layout-transition` on the drawers' `padding-bottom` (the signature motion) and the replica's fill bar; + two `nested-cards` on index (the cabinet's drawers and the replica's sections nest by design); Noto Sans, + off-ramp sizes and colours in the replica; `flat-type-hierarchy` from footer headings; + `gpt-thin-border-wide-shadow` on mounted frames and plates; the "could not read /MixedStorage/assets/style.css" note. +7. If the look changed (a new component or layout), update DESIGN.md and `.impeccable/design.json`. +8. Update the README if it repeats the facts. +9. Ship: branch → commit → push → `gh pr create`. After Kyler says merge: `gh pr merge --merge`, then from a + checkout of `origin/main` run `.\deploy-site.ps1` (try `-DryRun` first), then verify: + - `gh api repos/timbermods/MixedStorage/pages/builds/latest -q .status` is `built`; + - `curl -s https://timbermods.github.io/MixedStorage/ | grep -c ""` finds the change. + +### Full redesign + +A new look goes through the whole Impeccable flow (init → critique → audit → direction → build → finish review → +DESIGN.md). With the personal skill: "use the impeccable-site-flow skill to redesign this site". diff --git a/DESIGN.md b/DESIGN.md index 451d3e0..79c8eef 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -135,7 +135,7 @@ components: padding: "0 12px" height: "46px" cabinet: - backgroundColor: "{colors.walnut}" + backgroundColor: "#3a2416" textColor: "{colors.kraft}" rounded: "{rounded.cabinet}" padding: "18px 18px 22px" @@ -197,10 +197,10 @@ A painted-wall ground with warm cabinet materials on it. Walnut is the structure - **Tarnished Brass** (brass-deep): plate borders, the header's bottom rail and the footer's top rail. ### Secondary -- **Walnut** (walnut, walnut-2, walnut-3, walnut-edge): the header, the footer, the cabinet and its drawers, walnut plates (secondary buttons), the rules' top rules (walnut-3) and the frame around in-game screenshots. walnut-edge draws every drawer's and cabinet's inset edge and the cabinet feet. +- **Walnut** (walnut, walnut-2, walnut-3, walnut-edge): the header, the footer, the cabinet and its drawers, walnut plates (secondary buttons), the rules' top rules (walnut-3) and the frame around in-game screenshots. walnut-edge draws every drawer's and cabinet's inset edge and the cabinet feet. The cabinet carcass and the scale folio's mini cabinets sit on a darker `#3a2416` fill under the walnut texture; drawers sit on walnut-2. ### Tertiary -- **Kraft Card** (kraft) with **Kraft Ink** (kraft-ink) and **Faded Ink** (kraft-soft): label cards in holders, step numbers, table-of-contents cards, pills, the pressed split button. Text on kraft is always kraft-ink; kraft-soft is only for the percentage under a count. **Pale Kraft** (kraft-pale) is the footer's body text on walnut. +- **Kraft Card** (kraft) with **Kraft Ink** (kraft-ink) and **Faded Ink** (kraft-soft): label cards in holders, step numbers, table-of-contents cards, pills, the pressed split button. Text on kraft is always kraft-ink; kraft-soft is only for the percentage under a count. **Pale Kraft** (kraft-pale) is the footer's body text on walnut. It ships as a literal `#d9ccb3` in `style.css` (`.site-footer p`, `.footer__fine`); there is no `--kraft-pale` custom property. - **Warning Orange** (orange-day / orange-night): the warning note's tab only. The panel replica also reads it for its Apply ring. ### Neutral @@ -210,6 +210,7 @@ A painted-wall ground with warm cabinet materials on it. Walnut is the structure - **Ink** (ink-day / ink-night), **Muted Ink** (muted-day / muted-night): text and secondary text. Muted also draws the leader line and the dimension bracket. - **Rule** (line-day / line-night): 1px row rules and 1.5px panel borders. - **Verdigris Link** (link-day / link-night): inline links, underlined with a 3px offset that thickens to 2px on hover. +- **Browser chrome:** every page sets ``, one value for both modes (a green-black near the night ground). It is not a palette token. ### Named Rules **The Fixed Materials Rule.** Only the wall changes between day and lamplight: ground, paper, ink, rule, link and orange. Walnut, brass and kraft keep one value in both modes. @@ -244,7 +245,7 @@ A painted-wall ground with warm cabinet materials on it. Walnut is the structure A single centred column, `min(1160px, 100% - 2 × gutter)`, with a fluid gutter (16–40px). Full-width sections pad clamp(56px, 8vw, 104px) top and bottom and alternate between the plain ground and the deeper tint. Headers and footers are full-bleed walnut. -- **Hero:** two columns (1fr : 1.05fr) with name, pitch, mechanism line, a Download + Install guide button row, a dot-separated meta line and a status line on the left, and the cabinet on the right. They stack at 900px. The cabinet body is clamp(320px, 34vw, 400px) tall, and 320px on phones. +- **Hero:** two columns (1fr : 1.05fr) with name, pitch, mechanism line, a Download + Install guide button row, a dot-separated meta line and a status line on the left, and the cabinet on the right. They stack at 900px. The cabinet body is clamp(320px, 34vw, 400px) tall, 340px under 760px and 320px under 600px. - **Rules:** three columns, each item under a 3px walnut rule. The scale folio sits under it as three columns (one under 600px). - **Screenshots:** 0.7fr : 1.3fr, stacked at 900px. - **Ledger:** two columns of rows (name 11rem, text), one column at 900px, name above text at 600px. diff --git a/PRODUCT.md b/PRODUCT.md index c1d0db1..18f80b0 100644 --- a/PRODUCT.md +++ b/PRODUCT.md @@ -71,7 +71,8 @@ models. One download covers single player and co-op. the site's replica does the same. - No official Timberborn logos or key art. The game's goods icons are allowed (they're already used, credited as Timberborn's). -- License: MIT for the project's own code, docs and site; goods icons belong to Mechanistry; Noto Sans under OFL. +- License: MIT for the project's own code, docs and site; goods icons belong to Mechanistry; Alegreya SC (the site's display face) and Noto Sans (the panel replica's) + are self-hosted under the SIL OFL. - Unofficial community mod, not affiliated with or endorsed by Mechanistry. Maintained by Timbermods. ## Evidence on Hand