@jonandev/longbeard 0.5.2 → 0.8.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.
@@ -1,44 +1,35 @@
1
1
  #!/usr/bin/env node
2
- // A moodboard of the references that lead. The layout is this file.
3
- // It shows what we saw. It does not paint a brand, a logo, a line, or a stat.
2
+ // A moodboard of the references: every card with a shot, its name, its
3
+ // tagline, and a link to its source. The layout is this file. It shows what
4
+ // we saw. It does not paint a brand, a logo, a line, or a stat.
4
5
  //
5
- // node moodboard.mjs .design/board.md --out .design/moodboard.html --leads "North Room" --also "Margin"
6
+ // node moodboard.mjs .design/board.md --out .design/moodboard.html
7
+ // node moodboard.mjs .design/hunts/pricing/board.md --out .design/hunts/pricing/moodboard.html
8
+ //
9
+ // A card with `slot: product` stays off: a product page cropped into a tile is noise.
6
10
  import { execSync } from "node:child_process";
7
11
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
8
12
  import { dirname, isAbsolute, relative, resolve } from "node:path";
9
13
 
10
14
  const args = process.argv.slice(2);
11
- const flag = (name) => {
12
- const i = args.indexOf(`--${name}`);
13
- if (i === -1) return "";
14
- const v = args[i + 1] ?? "";
15
- args.splice(i, 2);
16
- return v;
17
- };
18
-
19
- const outArg = flag("out");
20
- const leadsArg = flag("leads");
21
- const alsoArg = flag("also");
15
+ const outAt = args.indexOf("--out");
16
+ const outArg = outAt === -1 ? "" : (args.splice(outAt, 2)[1] ?? "");
22
17
  const boardArg = args[0];
23
18
  if (!boardArg || !outArg || args.length !== 1) {
24
- console.error('usage: node moodboard.mjs .design/board.md --out .design/moodboard.html --leads "Name" [--also "Name"]');
19
+ console.error("usage: node moodboard.mjs .design/board.md --out .design/moodboard.html");
25
20
  process.exit(2);
26
21
  }
27
22
 
28
23
  function projectRoot() {
29
24
  try {
30
- return execSync("git rev-parse --show-toplevel", { encoding: "utf8" }).trim();
25
+ return execSync("git rev-parse --show-toplevel", { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).trim();
31
26
  } catch {
32
27
  return process.cwd();
33
28
  }
34
29
  }
35
30
 
36
- function resolvePath(path) {
37
- if (!path) return "";
38
- if (isAbsolute(path)) return path;
39
- return resolve(projectRoot(), path);
40
- }
41
-
31
+ const root = projectRoot();
32
+ const resolvePath = (path) => (isAbsolute(path) ? path : resolve(root, path));
42
33
  const boardPath = resolvePath(boardArg);
43
34
  const outPath = resolvePath(outArg);
44
35
  if (!existsSync(boardPath)) {
@@ -53,214 +44,47 @@ const esc = (s) =>
53
44
  .replace(/>/g, ">")
54
45
  .replace(/"/g, """);
55
46
 
56
- const norm = (s) => s.trim().toLowerCase().replace(/\s+/g, " ").replace(/\.$/, "");
57
-
58
47
  function fieldsOf(text) {
59
48
  const fields = {};
60
- let key = null;
61
49
  for (const line of text.split(/\r?\n/)) {
62
- const m = line.match(/^- ([a-z][a-z /]*):\s*(.*)$/i);
63
- if (m) {
64
- key = m[1].toLowerCase();
65
- fields[key] = m[2].trim();
66
- continue;
67
- }
68
- if (key && /^\s+\S/.test(line)) fields[key] = `${fields[key]} ${line.trim()}`.trim();
50
+ const m = line.match(/^- ([a-z][a-z /-]*):\s*(.*)$/i);
51
+ if (m) fields[m[1].toLowerCase()] = m[2].trim();
69
52
  }
70
53
  return fields;
71
54
  }
72
55
 
73
- function lum(hex) {
74
- const [r, g, b] = [0, 2, 4]
75
- .map((i) => parseInt(hex.slice(i + 1, i + 3), 16) / 255)
76
- .map((c) => (c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4));
77
- return 0.2126 * r + 0.7152 * g + 0.0722 * b;
78
- }
79
-
80
- function expand(hex) {
81
- const h = hex.replace("#", "");
82
- const full = h.length === 3 ? h.replace(/./g, (c) => c + c) : h;
83
- return `#${full.toLowerCase()}`;
84
- }
85
-
86
- function swatches(colour) {
87
- const found = [];
88
- 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;
89
- let m;
90
- while ((m = re.exec(colour))) found.push({ index: m.index, end: re.lastIndex, hex: expand(m[2] || m[1]) });
91
- const out = [];
92
- for (let i = 0; i < found.length; i++) {
93
- const end = i + 1 < found.length ? found[i + 1].index : colour.length;
94
- const label = colour
95
- .slice(found[i].end, end)
96
- .replace(/^[\s,;:–\-."']+|[\s,;:–\-."']+$/g, "")
97
- .replace(/\s+/g, " ")
98
- .trim();
99
- if (!out.some((s) => s.hex === found[i].hex)) out.push({ hex: found[i].hex, label });
100
- }
101
- return out.slice(0, 8);
102
- }
103
-
104
- function facesOf(typeLine) {
105
- return typeLine
106
- .split(/,|\s+and\s+|\s+&\s+|\s+\+\s+/i)
107
- .map((s) => s.replace(/\s+for\s+.*/i, "").replace(/^(a pairing of|pairing of|the)\s+/i, "").trim())
108
- .filter(Boolean)
109
- .slice(0, 2);
110
- }
111
-
112
- function isSans(name) {
113
- return /sans|grotesk|grotesque|gothic|america|aeonik|inter|helvetica|neue|haas|sohne|söhne|geist|satoshi|switzer|untitled/i.test(
114
- name,
115
- );
116
- }
117
-
118
- function cssFamily(name) {
119
- if (!name) return '"Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif';
120
- const safe = name.replace(/["\\<>]/g, "").slice(0, 80);
121
- const fallback = isSans(name)
122
- ? '"Helvetica Neue", Helvetica, Arial, sans-serif'
123
- : '"Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif';
124
- return `"${safe}", ${fallback}`;
125
- }
126
-
127
- function webPath(fromFile, absTarget) {
128
- let rel = relative(dirname(fromFile), absTarget).split("\\").join("/");
129
- if (!rel.startsWith(".")) rel = `./${rel}`;
130
- return rel;
131
- }
132
-
133
- function shotSrc(shot) {
134
- if (!shot) return "";
135
- const abs = resolvePath(shot.trim());
136
- if (!existsSync(abs)) {
137
- console.error(`moodboard: missing shot ${shot.trim()}`);
138
- return "";
139
- }
140
- return webPath(outPath, abs);
141
- }
142
-
143
56
  const md = readFileSync(boardPath, "utf8");
144
- const readSlice = md.match(/## Read this\s*\n([\s\S]*?)(?=\n## |\n### |\n- kind:|$)/);
145
- const read = readSlice ? fieldsOf(readSlice[1]) : {};
146
- const leadsName = leadsArg || read.leads || read.primary || "";
147
- if (!leadsName) {
148
- console.error("moodboard: name the leading card with --leads");
149
- process.exit(1);
150
- }
151
-
152
- const cards = [];
153
- const chunks = md.split(/^### /m).slice(1);
154
- for (const chunk of chunks) {
155
- const nl = chunk.indexOf("\n");
156
- const name = (nl === -1 ? chunk : chunk.slice(0, nl)).trim();
157
- const body = nl === -1 ? "" : chunk.slice(nl + 1);
158
- const cut = body.search(/^- kind:/m);
159
- cards.push({ name, ...fieldsOf((cut === -1 ? body : body.slice(0, cut)).split(/^## /m)[0]) });
160
- }
161
-
162
- const primary = cards.find((c) => norm(c.name) === norm(leadsName));
163
- if (!primary) {
164
- console.error(`moodboard: no card named ${leadsName}`);
165
- process.exit(1);
166
- }
167
- const alsoName = alsoArg || (read.also && !/^none$/i.test(read.also.trim()) ? read.also : "");
168
- const also = alsoName ? cards.find((c) => norm(c.name) === norm(alsoName)) : null;
169
- if (alsoName && !also) console.error(`moodboard: no card named ${alsoName}`);
170
-
171
- const imagery = [];
172
- {
173
- let inCard = false;
174
- let cur = null;
175
- const push = () => {
176
- if (cur?.kind === "imagery" && cur.shot) imagery.push(cur);
177
- cur = null;
178
- };
179
- for (const line of md.split(/\r?\n/)) {
180
- if (line.startsWith("### ")) {
181
- inCard = true;
182
- push();
183
- continue;
184
- }
185
- if (line.startsWith("## ")) {
186
- inCard = false;
187
- push();
188
- continue;
189
- }
190
- const m = line.match(/^- ([a-z][a-z /]*):\s*(.*)$/i);
191
- if (m && m[1].toLowerCase() === "kind") {
192
- inCard = false;
193
- push();
194
- cur = { kind: m[2].trim().toLowerCase() };
195
- continue;
196
- }
197
- if (inCard) continue;
198
- if (cur && m) cur[m[1].toLowerCase()] = m[2].trim();
199
- else if (cur && line.trim() === "") push();
200
- }
201
- push();
202
- }
203
- if (imagery.length > 3) console.error(`moodboard: showing 3 of ${imagery.length} imagery`);
204
-
205
- const colours = swatches(primary.colour || "").slice(0, 6);
206
- const seenFaces = [];
207
- for (const line of [primary.type, also && also.fit !== "form" ? also.type : ""]) {
208
- for (const face of facesOf(line || "")) {
209
- if (!seenFaces.some((f) => norm(f) === norm(face))) seenFaces.push(face);
210
- }
211
- }
212
- const faces = seenFaces.slice(0, 3);
213
- const family = cssFamily(faces[0] || "");
214
- const ink = "#1c1c1a";
215
-
216
- const principle = (primary["worth taking"] || "").trim();
217
- const primarySrc = shotSrc(primary.shot);
218
- const alsoSrc = also ? shotSrc(also.shot) : "";
219
- const pictures = imagery.slice(0, 3).flatMap((item) => {
220
- const src = shotSrc(item.shot);
221
- return src ? [{ src, caption: (item.shows || "").trim() }] : [];
222
- });
57
+ const cards = md
58
+ .split(/^### /m)
59
+ .slice(1)
60
+ .map((chunk) => {
61
+ const nl = chunk.indexOf("\n");
62
+ const name = (nl === -1 ? chunk : chunk.slice(0, nl)).trim();
63
+ return { name, ...fieldsOf((nl === -1 ? "" : chunk.slice(nl + 1)).split(/^## /m)[0]) };
64
+ });
223
65
 
224
66
  const tiles = [];
225
- if (faces.length) {
226
- const names = faces
227
- .map((face) => `<p class="face" style="font-family:${cssFamily(face)}">${esc(face)}</p>`)
228
- .join("");
229
- tiles.push(`<article class="tile type span-${colours.length ? 2 : 6}">
230
- <p class="kicker">Type we saw</p>
231
- <p class="aa">Aa</p>
232
- <div class="faces">${names}</div>
233
- </article>`);
234
- }
235
- if (colours.length) {
236
- const span = faces.length ? 4 : 6;
237
- const chips = colours
238
- .map((s) => {
239
- const edge = lum(s.hex) > 0.86 ? " chip-edge" : "";
240
- return `<div class="swatch"><div class="chip${edge}" style="background:${s.hex}"></div><p class="hex">${esc(s.hex)}</p>${s.label ? `<p class="role">${esc(s.label)}</p>` : ""}</div>`;
241
- })
242
- .join("");
243
- tiles.push(`<article class="tile colour span-${span}"><p class="kicker">Colour we saw</p><div class="swatches">${chips}</div></article>`);
244
- }
245
- if (primarySrc || principle) {
246
- const span = also && (alsoSrc || also["worth taking"]) ? 3 : 6;
247
- const shot = primarySrc ? `<img src="${esc(primarySrc)}" alt="Leading reference, top of the shot">` : "";
248
- tiles.push(`<article class="tile primary span-${span}${primarySrc ? " shot" : " no-shot"}">${shot}<div class="caption"><p class="kicker">Leads</p>${principle ? `<p class="control">${esc(principle)}</p>` : ""}</div></article>`);
249
- }
250
- if (also && (alsoSrc || also["worth taking"])) {
251
- const span = primarySrc || principle ? 3 : 6;
252
- const shot = alsoSrc ? `<img src="${esc(alsoSrc)}" alt="Also reference, top of the shot">` : "";
253
- const line = (also["worth taking"] || "").trim();
254
- tiles.push(`<article class="tile also span-${span}${alsoSrc ? " shot" : ""}">${shot}<div class="caption"><p class="kicker">Also</p>${line ? `<p class="control">${esc(line)}</p>` : ""}</div></article>`);
255
- }
256
- const pictureSpan = pictures.length === 1 ? 6 : pictures.length === 2 ? 3 : 2;
257
- for (const pic of pictures) {
258
- const cap = pic.caption ? `<figcaption>${esc(pic.caption)}</figcaption>` : "";
259
- tiles.push(`<figure class="tile picture shot span-${pictureSpan}"><img src="${esc(pic.src)}" alt="${esc(pic.caption || "Imagery")}">${cap}</figure>`);
67
+ for (const card of cards) {
68
+ if (!card.shot || /product/i.test(card.slot || "")) continue;
69
+ const abs = resolvePath(card.shot.trim());
70
+ if (!existsSync(abs)) {
71
+ console.error(`moodboard: missing shot ${card.shot.trim()}`);
72
+ continue;
73
+ }
74
+ let src = relative(dirname(outPath), abs).split("\\").join("/");
75
+ if (!src.startsWith(".")) src = `./${src}`;
76
+ // A seed shared in chat has no URL, so its tile has no link.
77
+ const url = (card.url || "").trim().split(/\s+/)[0];
78
+ const img = `<img src="${esc(src)}" alt="${esc(card.name)}" loading="lazy">`;
79
+ const frame = /^https?:\/\//i.test(url)
80
+ ? `<a class="frame" href="${esc(url)}" target="_blank" rel="noopener noreferrer">${img}</a>`
81
+ : `<div class="frame">${img}</div>`;
82
+ const line = card.tagline ? `<p class="line">${esc(card.tagline)}</p>` : "";
83
+ tiles.push(`<figure class="tile">${frame}<figcaption><p class="name">${esc(card.name)}</p>${line}</figcaption></figure>`);
260
84
  }
261
85
 
262
86
  if (!tiles.length) {
263
- console.error("moodboard: nothing on the board to show");
87
+ console.error("moodboard: no card on the board has a shot");
264
88
  process.exit(1);
265
89
  }
266
90
 
@@ -271,168 +95,38 @@ const html = `<!DOCTYPE html>
271
95
  <meta name="viewport" content="width=device-width, initial-scale=1">
272
96
  <title>Moodboard</title>
273
97
  <style>
274
- :root {
275
- --display: ${family};
276
- --ink: ${ink};
277
- --paper: #ffffff;
278
- --canvas: #e4e4e2;
279
- --muted: #6f6f6a;
280
- --ui: "Helvetica Neue", Helvetica, Arial, sans-serif;
281
- }
98
+ :root { --canvas: #e4e4e2; --paper: #ffffff; --ink: #1c1c1a; --muted: #6f6f6a; }
282
99
  * { box-sizing: border-box; }
283
100
  html { color-scheme: light; }
284
101
  body {
285
102
  margin: 0;
286
- min-height: 100vh;
287
103
  background: var(--canvas);
288
104
  color: var(--ink);
289
- font-family: var(--ui);
105
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
290
106
  -webkit-font-smoothing: antialiased;
291
107
  }
292
- .sheet { max-width: 1080px; margin: 0 auto; padding: 52px 28px 80px; }
108
+ main { max-width: 1200px; margin: 0 auto; padding: 52px 28px 80px; }
293
109
  h1 {
294
- margin: 0 0 16px 2px;
295
- font-family: var(--ui);
110
+ margin: 0 0 20px 2px;
296
111
  font-size: 11px;
297
112
  font-weight: 600;
298
113
  letter-spacing: 0.18em;
299
114
  text-transform: uppercase;
300
115
  color: var(--muted);
301
116
  }
302
- .grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; align-items: stretch; }
303
- .tile { background: var(--paper); border-radius: 22px; overflow: hidden; min-width: 0; }
304
- .span-2 { grid-column: span 2; }
305
- .span-3 { grid-column: span 3; }
306
- .span-4 { grid-column: span 4; }
307
- .span-6 { grid-column: span 6; }
308
- .kicker {
309
- margin: 0;
310
- font-size: 11px;
311
- font-weight: 600;
312
- letter-spacing: 0.16em;
313
- text-transform: uppercase;
314
- color: var(--muted);
315
- }
316
- .type, .colour, .principle, .leave { padding: 22px 24px 20px; }
317
- .type {
318
- display: flex;
319
- flex-direction: column;
320
- min-height: 250px;
321
- background: #171717;
322
- color: #f6f5f2;
323
- }
324
- .type .kicker { color: rgba(255, 255, 255, 0.55); }
325
- .aa {
326
- margin: 22px 0 0;
327
- font-family: var(--display);
328
- font-size: 104px;
329
- line-height: 0.78;
330
- letter-spacing: -0.045em;
331
- font-weight: 500;
332
- color: #f6f5f2;
333
- }
334
- .faces { margin-top: 20px; }
335
- .face {
336
- margin: 0;
337
- font-family: var(--display);
338
- font-size: 22px;
339
- line-height: 1.2;
340
- letter-spacing: -0.03em;
341
- color: #f6f5f2;
342
- }
343
- .face + .face { margin-top: 2px; font-size: 16px; color: rgba(255, 255, 255, 0.62); }
344
- .colour { display: flex; flex-direction: column; min-height: 250px; }
345
- .swatches {
346
- margin-top: auto;
347
- padding-top: 22px;
348
- display: grid;
349
- grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
350
- gap: 10px 12px;
351
- }
352
- .chip { height: 92px; border-radius: 14px; }
353
- .chip-edge { box-shadow: inset 0 0 0 1px rgba(28, 28, 26, 0.14); }
354
- .hex {
355
- margin: 8px 0 0;
356
- font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
357
- font-size: 11px;
358
- letter-spacing: 0.02em;
359
- color: #3c3c39;
360
- }
361
- .role {
362
- margin: 2px 0 0;
363
- font-size: 12px;
364
- line-height: 1.3;
365
- color: var(--muted);
366
- display: -webkit-box;
367
- -webkit-line-clamp: 2;
368
- -webkit-box-orient: vertical;
369
- overflow: hidden;
370
- }
371
- .principle { display: flex; flex-direction: column; min-height: 320px; }
372
- .principle .kicker { color: color-mix(in srgb, currentColor 58%, transparent); }
373
- .statement {
374
- margin: auto 0 0;
375
- max-width: 16ch;
376
- font-family: var(--display);
377
- font-size: 40px;
378
- line-height: 1.05;
379
- letter-spacing: -0.035em;
380
- font-weight: 500;
381
- }
382
- .statement.long { font-size: 28px; line-height: 1.15; max-width: 22ch; }
383
- .shot { position: relative; background: #1a1a1a; }
384
- .shot img {
385
- display: block;
386
- width: 100%;
387
- height: 320px;
388
- object-fit: cover;
389
- object-position: top center;
390
- background: #eceae6;
391
- }
392
- .picture img { height: 250px; object-position: center; }
393
- .shot .caption, .picture figcaption {
394
- position: absolute;
395
- left: 0;
396
- right: 0;
397
- bottom: 0;
398
- margin: 0;
399
- padding: 64px 18px 16px;
400
- background: linear-gradient(to top, rgba(10, 10, 10, 0.78) 0%, rgba(10, 10, 10, 0.28) 52%, rgba(10, 10, 10, 0) 100%);
401
- color: #fff;
402
- }
403
- .shot .kicker { color: rgba(255, 255, 255, 0.72); }
404
- .shot .control { margin: 4px 0 0; font-size: 16px; line-height: 1.3; color: #fff; }
405
- .picture { margin: 0; }
406
- .picture figcaption {
407
- font-size: 14px;
408
- line-height: 1.3;
409
- display: -webkit-box;
410
- -webkit-line-clamp: 2;
411
- -webkit-box-orient: vertical;
412
- overflow: hidden;
413
- }
414
- .primary.no-shot { min-height: 220px; background: var(--paper); }
415
- .primary.no-shot .caption { position: static; padding: 22px 24px; background: none; color: inherit; }
416
- .primary.no-shot .kicker { color: var(--muted); }
417
- .primary.no-shot .control {
418
- font-family: var(--display);
419
- font-size: 28px;
420
- line-height: 1.15;
421
- letter-spacing: -0.03em;
422
- color: #2a2a28;
423
- }
424
- .leave { display: flex; flex-direction: column; justify-content: center; gap: 12px; min-height: 180px; }
425
- .quiet { margin: 0; max-width: 28em; font-size: 20px; line-height: 1.35; letter-spacing: -0.02em; color: #3a3a38; }
426
- @media (max-width: 800px) {
427
- .sheet { padding: 28px 16px 48px; }
428
- .tile, .span-2, .span-3, .span-4, .span-6 { grid-column: 1 / -1; }
429
- .aa { font-size: 84px; }
430
- .statement { font-size: 32px; }
431
- }
117
+ .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
118
+ .tile { margin: 0; display: flex; flex-direction: column; background: var(--paper); border-radius: 22px; overflow: hidden; }
119
+ /* The picture sits inside a square frame, so a tall shot cannot stretch its tile. */
120
+ .frame { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: #141414; }
121
+ .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
122
+ figcaption { flex: 1; padding: 16px 18px 18px; }
123
+ .name { margin: 0; font-size: 15px; line-height: 1.3; }
124
+ .line { margin: 4px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
125
+ @media (max-width: 600px) { main { padding: 28px 16px 48px; } .grid { gap: 16px; } }
432
126
  </style>
433
127
  </head>
434
128
  <body>
435
- <main class="sheet">
129
+ <main>
436
130
  <h1>Moodboard</h1>
437
131
  <div class="grid">
438
132
  ${tiles.join("\n ")}
@@ -1,79 +0,0 @@
1
- # Keep the strong ones
2
-
3
- A nominee is not a reference. Open the score (or the shot) and drop anything weak before it hits the board. The keep count is the board. Looking goes past it. A weak pass means fewer keeps, not a lower bar.
4
-
5
- ## Awwwards
6
-
7
- Look at the **Awwwards site page**, not the listing card.
8
-
9
- Keep:
10
-
11
- - Site of the Day, Site of the Month, Developer Award, or Site of the Year, **or**
12
- - Honorable Mention / Nominee only if **overall ≥ 7.5** and **Design ≥ 7.5** (scores are /10).
13
-
14
- Drop:
15
-
16
- - Overall or Design at **6 or below**, and anything with **4s** on Design, Usability, or Creativity.
17
- - Nominee-only with no SOTD/HM and a soft score.
18
- - Gates, password walls, or a hero you cannot actually see.
19
- - A high score whose offer only makes sense for another type of business. Keep that page only when a layout or a component still works once this topic’s pictures and words are in the frame. Do not take its type or its colours.
20
-
21
- Quote jury lines only from that page, and only for sites you kept.
22
-
23
- ## Godly, Land-book, siteinspire
24
-
25
- Curated, not scored. Keep a site if the **live page** has a clear idea (a crop, a component, one arrangement). From another business, that idea has to be a layout or a component that still works on this topic. Drop their type and their colours. Drop generic SaaS: centred headline, three icon cards, soft gradient, Inter.
26
-
27
- ## MaxiBestOf, Recent, Dark Mode Design
28
-
29
- Same test. The **live page** has a clear idea. Click through. The gallery card is not the shot. These galleries do not raise the keep. They are more places to open before you choose.
30
-
31
- - **MaxiBestOf** (maxibestof.one/websites). Prefer MaxiBestof Picks. Sections (maxibestof.one/sections) are pieces — a hero, a pricing block, a footer — not Sites. Fonts can be the type slot when you can name the pairing.
32
- - **Recent** (recent.design/websites). Open the source URL on the item. The poster, the icons, the OG images, and the tools are not sites.
33
- - **Dark Mode Design** (darkmodedesign.com). Open it only when the subject, the register, or the style they asked for is dark. A dark site kept so a light subject has a colour is the wrong card. Drop it.
34
-
35
- ## Supahero
36
-
37
- supahero.io is hero crops. A crop can be the shot for a hero piece when the control is in the frame. For a site, open the live page behind the crop. The grid is not a shot. A crop is never a Site.
38
-
39
- ## Muzli
40
-
41
- muz.li collects other people’s work. Open the original. That page still has to pass its own gate: Awwwards needs the score, Dribbble needs the votes, a live site needs a clear idea. Do not capture the Muzli card or the feed.
42
-
43
- ## Pinterest
44
-
45
- Pins on pinterest.com are pictures, never sites. Keep one when it is a single real page or screen and you can name what is worth taking. Prefer this year when the pin shows a date. A photograph of this subject can be imagery. Drop mood boards, collages, AI mush, and anything you would drop on Dribbble. Do not capture a board or a search grid.
46
-
47
- If Pinterest shows a login wall, write `Pinterest: login wall` under the board’s drops and continue. That counts as the pass.
48
-
49
- ## Dribbble / Behance
50
-
51
- Listing pages are client-rendered (WebFetch returns empty). Shot pages (`/shots/...`) often hit Human Verification in headless Chrome. Use `scripts/dribbble-cards.mjs` on a popular-search listing; take artwork from `cdn.dribbble.com`. Run queries one at a time; retry a 0-card query once after a pause.
52
-
53
- Sort this year by **popular** (`timeframe=year`). There is no “most saved/liked” sort on the listing; cards show **views**, not likes. Accept views as the vote signal when likes are hidden, and say so on the card: `score: 5.4k views (likes unavailable)`. `timeframe=year` is not strict — older shots appear; when the slug or shot ID reveals a year, record it on the card so an old shot is visible as old.
54
-
55
- A Pinterest pass does not replace this sort. Look through that sort, then the page type, the component, and the element, including other subjects. A whole-look board keeps up to 20 that pass this filter. On a website they lose to a kept live site. On an application they outweigh award sites. A piece hunt keeps 10 after it has opened at least 30. Open more than you keep. The keep does not rise because another gallery was added. If the pass is weak, the board stays short. Do not lower the filter to finish the count.
56
-
57
- Keep if you can name what is worth taking in one line (a crop, a type pairing, a palette, a component, a screen). The shot has to be one people actually saved (or viewed, when that is the only signal).
58
-
59
- Drop: AI mush, fake browser chrome around a 3-card landing, purple gradient on dark, Inter-everywhere, emoji icons, melted type, a shot whose only job is “bakery website mockup.”
60
-
61
- A Dribbble drawing is **imagery**, never a site.
62
-
63
- ## Unsplash / Wikimedia
64
-
65
- Search **this** subject, not a stock category name. Drop posed lifestyle and fake product. One real place or material beats a pile of similar ones. Download routes: see [shots.md](shots.md).
66
-
67
- A file counts when you can point at a crop where that principle is the subject. If the thing you would leave is what the frame is about, drop it or write the crop. Do not keep ten near-misses to fill a count. The page may use fewer.
68
-
69
- If a pass across these galleries cannot fill the count without lowering these gates, the board stays short. Do not fill it with 4s.
70
-
71
- ## Colour and contrast
72
-
73
- Hexes come from a kept shot, sampled from a **crop of the element** they name — never from a photograph, mockup frame, or presentation background unless that is the role. On the card: `#2c2824 body text`, `#b0563a active-tab dot`.
74
-
75
- Before the persist ask, run every adapted text/background pair through `scripts/contrast.mjs` (`"#fg on #bg"`, optional `:large` or `:mark` for 3:1). Body and small text need 4.5:1; large text and non-text marks need 3:1. List each pair with ratio and verdict under **Read this**. A failing colour is adjusted; keep both hexes as `sampled → used`. Card hexes stay what we saw. They are not the brand.
76
-
77
- ## Type licence
78
-
79
- A type pick needs a `licence:` line that covers how this project ships it (bundled in app, self-hosted web, default UI). If it does not cover that use, drop it and name it under drops.
@@ -1,57 +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 x,y,w,h` so the shot is the specimen area (name, large sample, text sample), or crop to that area after capture. 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
- ## Open the piece
39
-
40
- - 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.
41
- - Supahero: the live site behind a hero, or the hero crop itself when the piece is a hero. Not the grid.
42
- - Muzli: the original URL. Not the Muzli page.
43
- - 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`, 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 once after a pause.
44
- - Pinterest: the pin image only, not the board and not search. If a login wall appears, see [quality.md](quality.md).
45
- - Never capture a search grid, a home feed, or a listing of cards (contact sheets of listing thumbnails are fine; they are not refs).
46
-
47
- ## Dribbble / Behance / Unsplash / Pinterest — not sites
48
-
49
- 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.
50
-
51
- Unsplash and Wikimedia: search the **subject**, not stock category.
52
-
53
- **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:`.
54
-
55
- **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:`.
56
-
57
- A board entry whose `shot` is a gallery listing, a stitched repeat, or an illustration filed as a website does not count.