@jonandev/longbeard 0.6.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +21 -8
- package/CHANGELOG.md +28 -1
- package/README.md +11 -15
- package/beard.json +150 -46
- package/bin/long-beard.js +148 -39
- package/package.json +4 -2
- package/skills/design-md/SKILL.md +37 -20
- package/skills/design-reference-hunt/SKILL.md +111 -347
- package/skills/design-reference-hunt/references/sources.md +74 -0
- package/skills/design-reference-hunt/scripts/capture.mjs +15 -5
- package/skills/design-reference-hunt/scripts/contact-sheet.mjs +4 -3
- package/skills/design-reference-hunt/scripts/dribbble-cards.mjs +4 -0
- package/skills/design-reference-hunt/scripts/moodboard.mjs +51 -430
- package/skills/design-reference-hunt/references/quality.md +0 -95
- package/skills/design-reference-hunt/references/shots.md +0 -67
- package/skills/design-reference-hunt/scripts/proof.mjs +0 -301
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# The whole page, not the gallery, not only the hero
|
|
2
|
-
|
|
3
|
-
A reference is the design from top to bottom. The builder has to take how the **rest** of the page works, not only the first screen.
|
|
4
|
-
|
|
5
|
-
## Live sites — the script is for a keep
|
|
6
|
-
|
|
7
|
-
Open as many listings and score pages as the hunt asks. Do not scroll a candidate, and do not screenshot one. **Viewing a listing’s own thumbnails is allowed** — it is not a capture and writes nothing to `refs/`. Use `scripts/contact-sheet.mjs` on a TSV of `label\timageURL` to build labelled grids in a scratch folder (never `.design/`), then open only the shortlist at full size.
|
|
8
|
-
|
|
9
|
-
Run the capture script only on a URL you are keeping. That run is the only scroll. Do not screenshot the tab by hand. Do not stitch folds. Stitching is what repeats a sticky hero down the file. A file in `.design/refs/` that is not on the board gets deleted, and only during the whole look that owns that folder. A later hunt keeps its own shots in `.design/hunts/<slug>/refs/`. Do not delete those because the board does not cite them. A file in that folder that its note does not cite gets deleted, and only during that hunt. A loading hunt does not delete a board shot. The whole look does not delete a hunt shot.
|
|
10
|
-
|
|
11
|
-
From the **project root** (relative `--out` resolves against `git rev-parse --show-toplevel`):
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
node <skill>/scripts/capture.mjs https://example.com --out .design/refs/<name>.jpg
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
For a later hunt:
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
node <skill>/scripts/capture.mjs https://example.com --out .design/hunts/<slug>/refs/<name>.jpg
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Tall captures (thousands of px) shrink when opened whole until body text is illegible. For reading only, add `--review <scratch>/name-review.jpg`. That writes side-by-side columns about 2,800 px tall; the real capture stays the single tall file in `refs/`. Review files stay in temp or session scratch, never `refs/`.
|
|
24
|
-
|
|
25
|
-
Type specimens (Google Fonts, etc.): use `--clip-selector "<css>"` to clip to an element's box — on `fonts.google.com` the specimen `main` — so the empty rail above it is not in the shot. `--clip x,y,w,h` still works when no element matches the area. Either way the shot is the specimen (name, large sample, text sample). A type shot may be cropped to the specimen — it is material, not a site.
|
|
26
|
-
|
|
27
|
-
The script opens Chrome, accepts a cookie **button** if the whole label matches (not partial “ok” inside other link text), strips short privacy/cookie dialogs, then scrolls a viewport at a time and pauses so pictures and reveals can finish. If a dismiss click navigates away, it exits non-zero with `navigated away: <url>` — do not keep that file. It pauses motion. It does not turn animations off, because that puts a revealed section back to blank. Then it unsticks `fixed`/`sticky` and takes **one** JPEG of the document. Node 22+. Chrome, Edge, or Chromium must be installed (`CHROME_PATH` if it is not in the usual place). Helpers stay Node with no package dependencies.
|
|
28
|
-
|
|
29
|
-
Then open the file (use the review sheet when the capture is tall). Write the hero and what is worth taking from it. A line you could have written without opening it does not count. Invalid if:
|
|
30
|
-
|
|
31
|
-
- the same band of the page appears twice (a stacked face, a repeated headline)
|
|
32
|
-
- a cookie dialog is still on it
|
|
33
|
-
- it is only the first screen of a long site
|
|
34
|
-
- most of the file is empty bands. Run the script once more. If the second file is still empty bands, the page is pinned or a canvas: write `coverage: fold`, keep a single viewport, and delete the tall file.
|
|
35
|
-
|
|
36
|
-
If it is invalid, delete it and run the script again. If the site will not scroll (WebGL, a locked canvas), say `coverage: fold` on the board, keep a **single** viewport shot, and find another scrolling site. Never glue folds by hand.
|
|
37
|
-
|
|
38
|
-
## Look at your own moodboard
|
|
39
|
-
|
|
40
|
-
The capture script takes a `file://` URL too, so the moodboard can be checked before anyone is shown it:
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
node <skill>/scripts/capture.mjs "file://$PWD/.design/moodboard.html" --out <scratch>/moodboard.jpg
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Open that shot. A caption that states the wrong reason, a face that fell back to the default serif, a tile that is a product page, or a missing picture is fixed on the board, and the moodboard script is run again. The shot stays in scratch, never in `refs/`.
|
|
47
|
-
|
|
48
|
-
## Open the piece
|
|
49
|
-
|
|
50
|
-
- Prefer a **live site**. Click through from Awwwards / Godly / Land-book / siteinspire / MaxiBestOf / Recent / Dark Mode Design to the actual URL, then run the script on that URL.
|
|
51
|
-
- Supahero: the live site behind a hero, or the hero crop itself when the piece is a hero. Not the grid.
|
|
52
|
-
- Muzli: the original URL. Not the Muzli page.
|
|
53
|
-
- Dribbble: listing pages are client-rendered; `/shots/...` often returns Human Verification to headless Chrome. Use `scripts/dribbble-cards.mjs` on a popular-search listing URL — it scrolls and prints TSV of `id-slug`, likes, views, image URL, title. Download artwork from `cdn.dribbble.com` (`<url>?resize=1600x1200`). Do not capture `/search`. Run queries one at a time; if a query returns 0 cards, retry after 8 seconds, then after 30 seconds, then record it under drops.
|
|
54
|
-
- Pinterest: the pin image only, not the board and not search. If a login wall appears, see [quality.md](quality.md).
|
|
55
|
-
- Never capture a search grid, a home feed, or a listing of cards (contact sheets of listing thumbnails are fine; they are not refs).
|
|
56
|
-
|
|
57
|
-
## Dribbble / Behance / Unsplash / Pinterest — not sites
|
|
58
|
-
|
|
59
|
-
These are pictures, not pages. Capture the **image** (or the type specimen), no page chrome. An illustration goes under **Material** (`kind: imagery`, `type`, or `mark`). A shot of a real screen goes under **Screens**. Never under Sites. A Pinterest pin follows that same split.
|
|
60
|
-
|
|
61
|
-
Unsplash and Wikimedia: search the **subject**, not stock category.
|
|
62
|
-
|
|
63
|
-
**Unsplash:** `/photos/<id>/download` returns an HTML bot page. On the search page, read `figure a[href*="/photos/"] img`, take its `src` up to the `?`, and download `<that>?w=1600&q=80` from `images.unsplash.com`. Keep the photo page URL as the card’s `url:`.
|
|
64
|
-
|
|
65
|
-
**Wikimedia Commons:** call the API with `-A "<project>-hunt/0.1"`, `prop=imageinfo&iiprop=url&iiurlwidth=1920`, save `thumburl` as the shot, and use `descriptionurl` as the card’s `url:`.
|
|
66
|
-
|
|
67
|
-
A board entry whose `shot` is a gallery listing, a stitched repeat, or an illustration filed as a website does not count.
|
|
@@ -1,301 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// The adaptation, with this project's own words in it. Paper and night side
|
|
3
|
-
// by side, at reading size, on a page and on a phone. It is not the product
|
|
4
|
-
// and it is not a page build: no navigation, no feature, no layout invented
|
|
5
|
-
// here. Everything on it comes from Read this.
|
|
6
|
-
//
|
|
7
|
-
// node proof.mjs .design/board.md --out .design/proof.html
|
|
8
|
-
// node proof.mjs .design/board.md --out .design/proof.html \
|
|
9
|
-
// --name "Your Project" --sample PROJECT.md --meta "Draft · 1,240 words · edited today"
|
|
10
|
-
import { execSync } from "node:child_process";
|
|
11
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
12
|
-
import { basename, dirname, isAbsolute, resolve } from "node:path";
|
|
13
|
-
|
|
14
|
-
const args = process.argv.slice(2);
|
|
15
|
-
const flag = (name) => {
|
|
16
|
-
const i = args.indexOf(`--${name}`);
|
|
17
|
-
if (i === -1) return "";
|
|
18
|
-
const v = args[i + 1] ?? "";
|
|
19
|
-
args.splice(i, 2);
|
|
20
|
-
return v;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const outArg = flag("out");
|
|
24
|
-
const nameArg = flag("name");
|
|
25
|
-
const sampleArg = flag("sample");
|
|
26
|
-
const metaArg = flag("meta");
|
|
27
|
-
const boardArg = args[0];
|
|
28
|
-
if (!boardArg || !outArg || args.length !== 1) {
|
|
29
|
-
console.error(
|
|
30
|
-
'usage: node proof.mjs .design/board.md --out .design/proof.html [--name "Project"] [--sample README.md] [--meta "Draft · 1,240 words"]',
|
|
31
|
-
);
|
|
32
|
-
process.exit(2);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function projectRoot() {
|
|
36
|
-
try {
|
|
37
|
-
return execSync("git rev-parse --show-toplevel", { encoding: "utf8" }).trim();
|
|
38
|
-
} catch {
|
|
39
|
-
return process.cwd();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const root = projectRoot();
|
|
44
|
-
const resolvePath = (path) => (!path ? "" : isAbsolute(path) ? path : resolve(root, path));
|
|
45
|
-
const boardPath = resolvePath(boardArg);
|
|
46
|
-
const outPath = resolvePath(outArg);
|
|
47
|
-
if (!existsSync(boardPath)) {
|
|
48
|
-
console.error(`proof: no board at ${boardArg}`);
|
|
49
|
-
process.exit(1);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const esc = (s) =>
|
|
53
|
-
String(s ?? "")
|
|
54
|
-
.replace(/&/g, "&")
|
|
55
|
-
.replace(/</g, "<")
|
|
56
|
-
.replace(/>/g, ">")
|
|
57
|
-
.replace(/"/g, """);
|
|
58
|
-
|
|
59
|
-
function fieldsOf(text) {
|
|
60
|
-
const fields = {};
|
|
61
|
-
let key = null;
|
|
62
|
-
for (const line of text.split(/\r?\n/)) {
|
|
63
|
-
const m = line.match(/^- ([a-z][a-z /-]*):\s*(.*)$/i);
|
|
64
|
-
if (m) {
|
|
65
|
-
key = m[1].toLowerCase();
|
|
66
|
-
fields[key] = m[2].trim();
|
|
67
|
-
continue;
|
|
68
|
-
}
|
|
69
|
-
if (key && /^\s+\S/.test(line)) fields[key] = `${fields[key]} ${line.trim()}`.trim();
|
|
70
|
-
}
|
|
71
|
-
return fields;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const md = readFileSync(boardPath, "utf8");
|
|
75
|
-
const readSlice = md.match(/## Read this\s*\n([\s\S]*?)(?=\n## |\n### |\n- kind:|$)/);
|
|
76
|
-
if (!readSlice) {
|
|
77
|
-
console.error("proof: the board has no Read this. Write the adaptation first.");
|
|
78
|
-
process.exit(1);
|
|
79
|
-
}
|
|
80
|
-
const read = fieldsOf(readSlice[1]);
|
|
81
|
-
if (!read.colour) {
|
|
82
|
-
console.error("proof: Read this has no colour line.");
|
|
83
|
-
process.exit(1);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const lum = (hex) => {
|
|
87
|
-
const [r, g, b] = [1, 3, 5]
|
|
88
|
-
.map((i) => parseInt(hex.slice(i, i + 2), 16) / 255)
|
|
89
|
-
.map((c) => (c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4));
|
|
90
|
-
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
91
|
-
};
|
|
92
|
-
const ratio = (a, b) => {
|
|
93
|
-
const [x, y] = [lum(a), lum(b)];
|
|
94
|
-
return (Math.max(x, y) + 0.05) / (Math.min(x, y) + 0.05);
|
|
95
|
-
};
|
|
96
|
-
const verdict = (r, large) => (r >= 7 && !large ? "AAA" : r >= (large ? 3 : 4.5) ? "AA" : "FAIL");
|
|
97
|
-
const expand = (hex) => {
|
|
98
|
-
const h = hex.replace("#", "");
|
|
99
|
-
return `#${(h.length === 3 ? h.replace(/./g, (c) => c + c) : h).toLowerCase()}`;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
// Each hex keeps the words that follow it, so a role can say "night ground".
|
|
103
|
-
function swatches(line) {
|
|
104
|
-
const found = [];
|
|
105
|
-
const re = /#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})(?:\s*(?:→|->)\s*#([0-9a-fA-F]{6}|[0-9a-fA-F]{3}))?/g;
|
|
106
|
-
let m;
|
|
107
|
-
while ((m = re.exec(line))) found.push({ index: m.index, end: re.lastIndex, hex: expand(m[2] || m[1]) });
|
|
108
|
-
const out = [];
|
|
109
|
-
for (let i = 0; i < found.length; i++) {
|
|
110
|
-
const end = i + 1 < found.length ? found[i + 1].index : line.length;
|
|
111
|
-
const label = line
|
|
112
|
-
.slice(found[i].end, end)
|
|
113
|
-
.replace(/^[\s,;:–\-."']+|[\s,;:–\-."']+$/g, "")
|
|
114
|
-
.replace(/\s+/g, " ")
|
|
115
|
-
.trim();
|
|
116
|
-
if (!out.some((s) => s.hex === found[i].hex)) out.push({ hex: found[i].hex, label });
|
|
117
|
-
}
|
|
118
|
-
return out;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const colours = swatches(read.colour);
|
|
122
|
-
if (!colours.length) {
|
|
123
|
-
console.error("proof: no hexes on the colour line.");
|
|
124
|
-
process.exit(1);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
const nightish = (s) => /night|dark|dusk|lamp|evening/i.test(s.label);
|
|
128
|
-
const byLight = [...colours].sort((a, b) => lum(b.hex) - lum(a.hex));
|
|
129
|
-
const night = colours.filter(nightish);
|
|
130
|
-
const dayPool = colours.filter((s) => !nightish(s));
|
|
131
|
-
|
|
132
|
-
function theme(pool, dark) {
|
|
133
|
-
const list = (pool.length ? pool : colours).slice();
|
|
134
|
-
const sorted = [...list].sort((a, b) => lum(b.hex) - lum(a.hex));
|
|
135
|
-
const ground = dark ? sorted[sorted.length - 1] : sorted[0];
|
|
136
|
-
const text = dark ? sorted[0] : sorted[sorted.length - 1];
|
|
137
|
-
// The accent is the hex furthest from both, so a cream-and-ink pair falls
|
|
138
|
-
// back to the ink rather than inventing a colour.
|
|
139
|
-
const rest = list.filter((s) => s.hex !== ground.hex && s.hex !== text.hex);
|
|
140
|
-
const accent =
|
|
141
|
-
rest.sort((a, b) => Math.abs(lum(a.hex) - lum(ground.hex)) - Math.abs(lum(b.hex) - lum(ground.hex))).pop() || text;
|
|
142
|
-
return { ground, text, accent };
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
const day = theme(dayPool, false);
|
|
146
|
-
const dusk = theme(night.length ? night : byLight, true);
|
|
147
|
-
|
|
148
|
-
function isFaceName(name) {
|
|
149
|
-
const words = name.split(/\s+/);
|
|
150
|
-
return (
|
|
151
|
-
/^[\p{L}\p{N}][\p{L}\p{N} .'’&-]*$/u.test(name) &&
|
|
152
|
-
words.length <= 4 &&
|
|
153
|
-
!/^(body|headline|display|serif|sans|sans-serif|mono|monospace|text|titles?|labels?|small caps)$/i.test(name)
|
|
154
|
-
);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
const faces = (read.faces || read.type || "")
|
|
158
|
-
.split(/,|\s+and\s+|\s+&\s+|\s+\+\s+|\s+with\s+/i)
|
|
159
|
-
.map((s) => s.replace(/\s+for\s+.*/i, "").replace(/^(a pairing of|pairing of|the)\s+/i, "").trim())
|
|
160
|
-
.filter(isFaceName)
|
|
161
|
-
.slice(0, 3);
|
|
162
|
-
|
|
163
|
-
const serifFallback = "'Iowan Old Style', Palatino, 'Palatino Linotype', Georgia, serif";
|
|
164
|
-
const sansFallback = "'Helvetica Neue', Helvetica, Arial, sans-serif";
|
|
165
|
-
const isSans = (name) =>
|
|
166
|
-
/sans|grotesk|grotesque|gothic|america|aeonik|inter|helvetica|neue|haas|sohne|söhne|geist|satoshi|switzer|untitled|plex sans|mono/i.test(
|
|
167
|
-
name,
|
|
168
|
-
);
|
|
169
|
-
const family = (name) => (!name ? serifFallback : `'${name.replace(/['"\\<>;{}]/g, "")}', ${isSans(name) ? sansFallback : serifFallback}`);
|
|
170
|
-
const fontsHref = () => {
|
|
171
|
-
const list = faces
|
|
172
|
-
.filter((n) => /^[A-Za-z0-9][A-Za-z0-9 ]*$/.test(n))
|
|
173
|
-
.map((n) => `family=${n.trim().replace(/\s+/g, "+")}`);
|
|
174
|
-
return list.length ? `https://fonts.googleapis.com/css2?${list.join("&")}&display=swap` : "";
|
|
175
|
-
};
|
|
176
|
-
const bodyFace = family(faces.find((f) => !isSans(f)) || faces[0] || "");
|
|
177
|
-
const metaFace = family(faces.find((f) => isSans(f)) || faces[1] || faces[0] || "");
|
|
178
|
-
|
|
179
|
-
// The words are this project's, so the direction is judged on real text.
|
|
180
|
-
const projectName = nameArg || basename(root);
|
|
181
|
-
function sampleText() {
|
|
182
|
-
const files = sampleArg ? [sampleArg] : ["PRODUCT.md", "PROJECT.md", "README.md"];
|
|
183
|
-
for (const file of files) {
|
|
184
|
-
const path = resolvePath(file);
|
|
185
|
-
if (!existsSync(path)) continue;
|
|
186
|
-
const plain = readFileSync(path, "utf8")
|
|
187
|
-
.replace(/```[\s\S]*?```/g, "")
|
|
188
|
-
.split(/\r?\n/)
|
|
189
|
-
.filter((l) => l.trim() && !/^[#>\-*|!\[]/.test(l.trim()) && !/^\s*\d+\./.test(l))
|
|
190
|
-
.map((l) => l.trim());
|
|
191
|
-
const para = plain.find((l) => l.length > 120);
|
|
192
|
-
if (para) return { text: para.replace(/\[([^\]]+)\]\([^)]*\)/g, "$1").replace(/[*_`]/g, ""), from: file };
|
|
193
|
-
}
|
|
194
|
-
return {
|
|
195
|
-
text:
|
|
196
|
-
"No paragraph was found in this repository, so this placeholder stands in. Replace it with --sample <file> and look again: the direction is only proved by the project's own words at reading size.",
|
|
197
|
-
from: "placeholder",
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
const sample = sampleText();
|
|
201
|
-
const meta = metaArg || "Draft · 1,240 words · edited today";
|
|
202
|
-
const gaps = (read.gaps || "").trim();
|
|
203
|
-
const ownable = (read.ownable || "").trim();
|
|
204
|
-
const control = (read.control || "").trim();
|
|
205
|
-
|
|
206
|
-
function panel(name, t, large) {
|
|
207
|
-
const pairs = [
|
|
208
|
-
{ label: "body on ground", r: ratio(t.text.hex, t.ground.hex), large: false },
|
|
209
|
-
{ label: "accent on ground", r: ratio(t.accent.hex, t.ground.hex), large: true },
|
|
210
|
-
];
|
|
211
|
-
const checks = pairs
|
|
212
|
-
.map((p) => {
|
|
213
|
-
const v = verdict(p.r, p.large);
|
|
214
|
-
return `<li class="${v === "FAIL" ? "fail" : "pass"}">${esc(p.label)} ${p.r.toFixed(2)}:1 ${v}</li>`;
|
|
215
|
-
})
|
|
216
|
-
.join("");
|
|
217
|
-
return `<section class="panel${large ? " wide" : " phone"}" style="--ground:${esc(t.ground.hex)};--text:${esc(t.text.hex)};--accent:${esc(t.accent.hex)}">
|
|
218
|
-
<header class="panel-head"><p class="kicker">${esc(name)}</p><ul class="checks">${checks}</ul></header>
|
|
219
|
-
<div class="page">
|
|
220
|
-
<p class="eyebrow">${esc(projectName)}</p>
|
|
221
|
-
<h2 class="piece">${esc(sample.from === "placeholder" ? projectName : `${projectName}, in its own words`)}</h2>
|
|
222
|
-
<p class="meta">${esc(meta)}</p>
|
|
223
|
-
<p class="body">${esc(sample.text)}</p>
|
|
224
|
-
<div class="row"><span class="row-title">An earlier draft</span><span class="row-meta">${esc(meta)}</span></div>
|
|
225
|
-
<div class="row"><span class="row-title">The first page</span><span class="row-meta">${esc(meta)}</span></div>
|
|
226
|
-
${control ? `<p class="control">${esc(control)}</p>` : ""}
|
|
227
|
-
</div>
|
|
228
|
-
</section>`;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
const fonts = fontsHref();
|
|
232
|
-
const html = `<!DOCTYPE html>
|
|
233
|
-
<html lang="en">
|
|
234
|
-
<head>
|
|
235
|
-
<meta charset="utf-8">
|
|
236
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
237
|
-
<title>Proof</title>
|
|
238
|
-
${fonts ? `<link rel="stylesheet" href="${esc(fonts)}">\n` : ""}<style>
|
|
239
|
-
:root {
|
|
240
|
-
--body: ${bodyFace};
|
|
241
|
-
--meta: ${metaFace};
|
|
242
|
-
--ui: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
243
|
-
--canvas: #e4e4e2;
|
|
244
|
-
--muted: #6f6f6a;
|
|
245
|
-
}
|
|
246
|
-
* { box-sizing: border-box; }
|
|
247
|
-
html { color-scheme: light; }
|
|
248
|
-
body { margin: 0; background: var(--canvas); color: #1c1c1a; font-family: var(--ui); -webkit-font-smoothing: antialiased; }
|
|
249
|
-
.sheet { max-width: 1200px; margin: 0 auto; padding: 52px 28px 80px; }
|
|
250
|
-
h1 { margin: 0 0 6px 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
|
|
251
|
-
.lead { margin: 0 0 24px 2px; max-width: 70ch; font-size: 14px; line-height: 1.5; color: var(--muted); }
|
|
252
|
-
.grid { display: grid; grid-template-columns: 1fr 390px; gap: 22px; align-items: start; }
|
|
253
|
-
.panel { border-radius: 22px; overflow: hidden; background: var(--ground); color: var(--text); }
|
|
254
|
-
.panel-head { display: flex; justify-content: space-between; gap: 16px; padding: 18px 24px; background: rgba(127, 127, 127, 0.14); }
|
|
255
|
-
.kicker { margin: 0; font-family: var(--ui); font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.7; }
|
|
256
|
-
.checks { display: flex; gap: 14px; margin: 0; padding: 0; list-style: none; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; opacity: 0.8; }
|
|
257
|
-
.checks .fail { font-weight: 700; text-decoration: underline; }
|
|
258
|
-
.page { padding: 34px 32px 38px; }
|
|
259
|
-
.eyebrow, .meta, .row-meta { font-family: var(--meta); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
|
|
260
|
-
.eyebrow { margin: 0 0 22px; }
|
|
261
|
-
.piece { margin: 0; font-family: var(--body); font-size: 34px; line-height: 1.12; letter-spacing: -0.02em; font-weight: 500; }
|
|
262
|
-
.meta { margin: 10px 0 24px; }
|
|
263
|
-
.body { margin: 0; max-width: 66ch; font-family: var(--body); font-size: 17px; line-height: 1.62; }
|
|
264
|
-
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 18px; padding-top: 14px; border-top: 1px solid currentColor; opacity: 0.85; }
|
|
265
|
-
.row:first-of-type { margin-top: 34px; }
|
|
266
|
-
.row-title { font-family: var(--body); font-size: 17px; }
|
|
267
|
-
.control { margin: 30px 0 0; font-family: var(--meta); font-size: 14px; color: var(--accent); }
|
|
268
|
-
.phone .page { padding: 26px 22px 30px; }
|
|
269
|
-
.phone .row { flex-direction: column; align-items: flex-start; gap: 4px; }
|
|
270
|
-
.phone .piece { font-size: 26px; }
|
|
271
|
-
.phone .body { font-size: 17px; }
|
|
272
|
-
.notes { margin-top: 26px; display: grid; gap: 10px; }
|
|
273
|
-
.note { margin: 0; max-width: 80ch; font-size: 14px; line-height: 1.5; color: #3a3a38; }
|
|
274
|
-
.note b { font-weight: 600; }
|
|
275
|
-
@media (max-width: 900px) {
|
|
276
|
-
.sheet { padding: 28px 16px 48px; }
|
|
277
|
-
.grid { grid-template-columns: 1fr; }
|
|
278
|
-
}
|
|
279
|
-
</style>
|
|
280
|
-
</head>
|
|
281
|
-
<body>
|
|
282
|
-
<main class="sheet">
|
|
283
|
-
<h1>Proof</h1>
|
|
284
|
-
<p class="lead">The adaptation with ${esc(projectName)}'s own words in it, at reading size. Paper on the left, night on the right, the phone column at 390px. Text from <code>${esc(sample.from)}</code>. This is not the product: no navigation, no feature, nothing invented here.</p>
|
|
285
|
-
<div class="grid">
|
|
286
|
-
${panel("Paper", day, true)}
|
|
287
|
-
${panel("Night", dusk, false)}
|
|
288
|
-
</div>
|
|
289
|
-
<div class="notes">
|
|
290
|
-
<p class="note"><b>Faces:</b> ${faces.length ? esc(faces.join(", ")) : "none named in Read this"}. ${faces.length > 2 ? "Three families. Can this be done with fewer?" : "Can this be done with fewer?"}</p>
|
|
291
|
-
${ownable ? `<p class="note"><b>Ownable:</b> ${esc(ownable)}</p>` : ""}
|
|
292
|
-
${gaps ? `<p class="note"><b>Not covered by a reference:</b> ${esc(gaps)}</p>` : ""}
|
|
293
|
-
</div>
|
|
294
|
-
</main>
|
|
295
|
-
</body>
|
|
296
|
-
</html>
|
|
297
|
-
`;
|
|
298
|
-
|
|
299
|
-
mkdirSync(dirname(outPath), { recursive: true });
|
|
300
|
-
writeFileSync(outPath, html);
|
|
301
|
-
console.log(outArg);
|