Document the redesign and project state

This commit is contained in:
yigid authored and Yigid BALABAN committed 2026-11-01 08:06:03 +03:00
1 parent f63be4148c
commit c028648346
4 files changed
+184 -3

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
# MEMORY.md
Entrypoint for project memory. Read this before working in the repo.
## Project
- Repo root: `/home/yigid/repos/pos`
- `site/` — PeacockProject static build output (the source for the port).
- `site-2/` — Astro port (the new site). See `site-2/README.md`.
## Memories
- [Port `site` to Astro in `site-2`](./memories/port-site-to-astro.md) — what was ported, decisions, verification, and follow-ups.
- [Redesign: homepage + project page](./memories/redesign-2026-11-01.md) — brief, design decisions, commits, verification.
## Current state (2026-11-01)
The Astro port is complete and builds. `cd site-2 && npm run build` emits
`dist/` with `/`, `/project`, `/projects` (redirect), `/devices`,
`/404.html`, assets and device data.
The homepage and project page were redesigned: solid buttons, no pill labels
or eyebrows, no gradient text, revised copy, and a parts list on `/project`.
+102
View File
@@ -0,0 +1,102 @@
# Port `site` to Astro (`site-2`)
Date: 2026-11-01
## Task
`site/` is a static build output. Port it 1:1 to Astro in `site-2/`.
## What `site/` actually contains
The current site is a hand-written static site with a dark "jewel" design:
- `index.html` — homepage
- `project/index.html` — "The Project" page
- `devices/index.html` — generated device cards (from `devices/status.json`)
- `assets/peacock-head.svg`, `assets/peacock-full.svg` — inlined at runtime
- `logo-mark-dark.png` — favicon
- `scripts/gen-devices.py` + `.github/workflows/devices.yml` — device pipeline
- `vercel.json` — static hosting config
It also contains **stale leftovers from an older Next.js export** (light
"builder design language" theme, branch `origin/site-redesign-light`):
`404.html`, `404/`, `_not-found/`, `_next/`, `index.txt`, `__next*.txt`,
`assets/site.css`, `assets/site.js`. Nothing in the current pages references
them (only `404.html` references `_next`). These were intentionally **not**
ported.
Git context: HEAD on `master` is commit `52064e2` ("Rework homepage copy …"),
which is the current dark site. The Next.js files date from commits
`46e21d5`/`2679833`/`211fe75`.
## Astro structure
```
site-2/
astro.config.mjs static, build.format 'directory'
public/ favicon, devices/status.json, devices/img/
src/
assets/peacock-*.svg imported with ?raw and inlined at build time
components/
Header.astro homeHref prop (index uses "#", others "/")
Footer.astro
Mark.astro strips <?xml?>, fill:#xxx -> fill:currentColor
IridescentDefs.astro hidden SVG with the #irid gradient
layouts/Base.astro head/meta/fonts, ambient/grain, page wrapper, shared script
pages/
index.astro
project.astro
devices.astro renders from public/devices/status.json at build time
404.astro
scripts/site.js reveals + spine (mark inlining removed)
styles/global.css exact original <style> block from index.html
scripts/gen-devices.py trimmed: no longer emits devices/index.html
.github/workflows/devices.yml commits public/devices/ instead of devices/
```
## Decisions
1. **Inline the peacock SVGs at build time** (`?raw` + regex) instead of the
original runtime `fetch()`. Same DOM/appearance, no network round-trip and
no flash. `data-mark` attributes are gone because they are no longer needed.
2. **Shared CSS as a stylesheet.** The original inlined the same `<style>` on
every page. Astro bundles it to `/_astro/Base.*.css`; rule set is identical
(88 selectors, minifier only rewrites `::after`→`:after` and media query
range syntax).
3. **Devices page is data-driven at build time** rather than generated HTML.
`devices.astro` reads `public/devices/status.json`, reproduces the Python
generator's grouping/platform/image/search logic exactly. The Python script
now only writes `status.json`, images and the wiki.
4. **404 is new** (in the dark design). The original `404.html` was the stale
light Next.js page; porting it would have preserved a design bug.
5. **Keep URLs identical**: `/`, `/project`, `/devices`, `/404.html`; external
links unchanged; nav unchanged (devices is still not in the nav).
6. `assets/site.css`/`site.js` were dropped because no current page uses them.
## Verification performed
- **Structure/text**: custom HTML parser diff (ignoring style/script/SVG/CSS
link/data-mark) → `IDENTICAL STRUCTURE/TEXT` for index, project, devices
(268/245/225 nodes).
- **CSS**: selector-set comparison → identical (88 global, 19 devices).
- **Layout**: Puppeteer `getBoundingClientRect` for every element at 1440×900,
fonts awaited → 0 meaningful differences. (Found and fixed one real bug: an
Astro HTML-compression whitespace drop before the "wiki" link on /devices.)
- **Pixels**: full-page screenshots of both sites, `prefers-reduced-motion`,
same fonts → identical dimensions; zero pixels differ by more than 1%.
- **Interactions**: reveals, spine fill (100% at bottom), mark paths, device
search filtering, no-result message, project door count, 404 title; no
console/page errors.
- Generator functions (`by_brand`, `platform`, `support_items`, `matrix_md`,
`index_md`) exercised against the real `status.json`.
## Follow-ups / notes
- `public/devices/status.json` is the single source for the devices page. The
CI script writes it there (Astro copies `public/` as-is).
- `site/` still has its own `.git` and is not tracked by this repo root (the
root is not a git repo). Do not edit `site/` as part of the port.
- If the design changes upstream in `site/`, re-extract the `<style>` block to
`src/styles/global.css` and re-check page markup.
- Screenshot/rect comparison scripts lived in `/tmp/opencode` and are not
committed.
+53
View File
@@ -0,0 +1,53 @@
# Redesign: homepage + project page
Date: 2026-11-01
## Brief
Improve the design of the homepage (`/`) and the project page (`/project`,
reachable as `/projects`). Constraints from the user:
1. Remove gradients from buttons and style them better.
2. No pills, no eyebrows.
3. Improve the copy.
4. Work with commits.
5. Scope: index page and the projects page.
## Decisions
- **One accent.** Iridescence now lives only in the peacock mark and the path
spine. Gradient text, gradient card washes, and gradient buttons are gone.
- **Buttons.** Solid cream primary (near-black label) and outlined secondary,
3px radius, no shadows, no shimmer. Clear hover and `:focus-visible` rings.
- **No pills or eyebrows.** Removed the pill eyebrow component, pulsing pip,
scroll cue, and the small label above card titles. The path keeps `01 / Build`
because it is a real sequence; it is plain mono text, not a pill.
- **Homepage.** Kept the hero and the feather-spine path. The ending is now two
editorial columns separated by a rule instead of two gradient cards. Copy was
rewritten to say what Peacock is, what each step does, and what to do next.
- **Project page.** Replaced the eight identical cards with a parts index: name
and language on the left, description and link on the right, hairline rows.
- **Shared shell.** Sans-serif sentence-case nav, active page state, solid
GitHub CTA, skip link, `<main>`, footer links, 3px radii on device cards and
badges, rectangular status badges, device copy tightened.
- **Routes.** `/project` stays canonical. `/projects` is a static redirect page
to it for the URL the user used.
## Verification
- `npm run build` emits 5 routes, including `/projects`.
- Headless Chromium (CDP) at 1440, 800, 390 and 320px:
- no horizontal overflow, no header overflow;
- zero `.eyebrow`, `.pip`, or `.grad` elements;
- primary button computed `background-image: none`, `border-radius: 3px`;
- nav resolves to Hanken Grotesk, no uppercase transform;
- project page has 8 parts; homepage has 2 doors.
- `/projects/` renders the redirect to `/project`.
- No console errors beyond Vite dev messages.
## Follow-ups
- `/devices` still uses a card grid; it was styled for consistency but not
redesigned.
- Mobile nav shows The Project and GitHub; Wiki/Community are in the footer.
- Screenshots are in `/tmp/opencode` and are not committed.
+6 -3
View File
@@ -1,7 +1,9 @@
# Peacock // OS — site # Peacock // OS — site
Astro port of the static site in `../site` (the PeacockProject build output). Astro site for Peacock. The structure and content started from the static build
Markup, copy, styling and interactions are kept 1:1 with the original. in `../site`; the visual design has since been reworked: solid cream buttons,
no pill labels or eyebrow tags, a calmer hero, and a parts index for the
project page.
## Commands ## Commands
@@ -32,7 +34,8 @@ src/
layouts/Base.astro document shell, fonts, shared script layouts/Base.astro document shell, fonts, shared script
pages/ pages/
index.astro / index.astro /
project.astro /project project.astro /project (the parts index)
projects.astro /projects -> /project
devices.astro /devices (built from public/devices/status.json) devices.astro /devices (built from public/devices/status.json)
404.astro /404.html 404.astro /404.html
scripts/site.js scroll reveals + path spine scripts/site.js scroll reveals + path spine