@jonandev/longbeard 0.12.2 → 0.14.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 +5 -6
- package/CHANGELOG.md +51 -0
- package/README.md +3 -4
- package/beard.json +6 -20
- package/bin/long-beard.js +2 -2
- package/package.json +2 -2
- package/skills/design/SKILL.md +21 -37
- package/skills/design-brief/SKILL.md +7 -5
- package/skills/design-check/SKILL.md +1 -1
- package/skills/design-check/references/design-rules.md +28 -5
- package/skills/design-check/scripts/rules.mjs +143 -9
- package/skills/design-content/SKILL.md +2 -0
- package/skills/design-direction/SKILL.md +87 -95
- package/skills/design-direction/references/design-floor.md +118 -0
- package/skills/design-direction/references/graphic.md +5 -10
- package/skills/design-direction/references/library.md +8 -6
- package/skills/design-direction/references/screen-template.html +3 -3
- package/skills/design-direction/references/subject.md +2 -2
- package/skills/design-direction/references/variants.js +43 -0
- package/skills/design-direction/scripts/canvas.mjs +311 -0
- package/skills/design-direction/scripts/colours.mjs +247 -0
- package/skills/design-direction/scripts/moodboard.mjs +233 -93
- package/skills/design-direction/scripts/rules.mjs +747 -0
- package/skills/design-direction/scripts/sheet.mjs +3 -1
- package/skills/design-figma/SKILL.md +3 -1
- package/skills/design-identity/SKILL.md +17 -8
- package/skills/{design-direction → design-identity}/references/controls.md +10 -10
- package/skills/design-identity/references/design-floor.md +118 -0
- package/skills/design-identity/references/identity-board.html +2 -2
- package/skills/design-identity/scripts/colours.mjs +35 -1
- package/skills/design-identity/scripts/sheet.mjs +3 -1
- package/skills/design-moodboard/SKILL.md +44 -76
- package/skills/design-moodboard/references/graphic.md +1 -1
- package/skills/design-moodboard/references/sources.md +12 -1
- package/skills/design-moodboard/scripts/group.mjs +1 -1
- package/skills/design-moodboard/scripts/moodboard.mjs +233 -93
- package/skills/design-prototype/SKILL.md +66 -82
- package/skills/design-prototype/references/design-floor.md +118 -0
- package/skills/design-prototype/references/design-md-template.md +3 -0
- package/skills/design-prototype/references/graphic.md +6 -5
- package/skills/design-prototype/references/variants.js +43 -0
- package/skills/design-prototype/scripts/drift.mjs +273 -0
- package/skills/design-prototype/scripts/links.mjs +5 -4
- package/skills/design-prototype/scripts/rules.mjs +143 -9
- package/skills/design-prototype/scripts/sheet.mjs +3 -1
- package/skills/design-wordmark/SKILL.md +8 -2
- package/skills/design-wordmark/scripts/sheet.mjs +3 -1
- package/skills/idea/SKILL.md +3 -3
- package/skills/design-direction/references/design-rules.md +0 -203
- package/skills/design-direction/references/five-second.md +0 -47
- package/skills/design-direction/references/full-build.md +0 -19
- package/skills/design-direction/references/grid.md +0 -114
- package/skills/design-direction/scripts/layout-diff.mjs +0 -118
- package/skills/design-families/SKILL.md +0 -138
- package/skills/design-families/scripts/contact-sheet.mjs +0 -259
- package/skills/design-families/scripts/families.mjs +0 -607
- package/skills/design-families/scripts/measure.mjs +0 -1728
- package/skills/design-families/scripts/moodboard.mjs +0 -469
- package/skills/design-families/scripts/tag.mjs +0 -289
- package/skills/design-prototype/references/design-rules.md +0 -203
- package/skills/design-prototype/references/five-second.md +0 -47
|
@@ -1,24 +1,39 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// A moodboard of the references, built to be marked: every card with a shot
|
|
3
3
|
// or recorded frames, grouped by its topic (the family it looks like, or the
|
|
4
|
-
// one piece it is for), with Lead, Like and No, a note per tile,
|
|
5
|
-
// copy-out for the chat. The
|
|
4
|
+
// one piece it is for), with Lead, Like and No, a note per tile, a "leave out"
|
|
5
|
+
// per tile, and a copy-out for the chat. The
|
|
6
6
|
// layout is this file. It shows what we saw. It does not paint a brand.
|
|
7
7
|
//
|
|
8
8
|
// A card's fields in board.md: link, shot, frames (a folder that
|
|
9
9
|
// capture.mjs --frames wrote, played on hover), topic (or part), pattern (or move), measured
|
|
10
10
|
// (its traits from measure.mjs, shown small under the pattern), why, like (the
|
|
11
11
|
// person's own words from the picker: what they like in it, and why; shown on
|
|
12
|
-
// the card
|
|
12
|
+
// the card, put in its note until they change it, and the card starts liked),
|
|
13
|
+
// avoid (their words: what they do not want from a reference they otherwise
|
|
14
|
+
// like; shown on the card and put in its leave-out box), also (one line per
|
|
15
|
+
// other screen of the same product, "<part>: <shot>", shown with the card).
|
|
16
|
+
//
|
|
17
|
+
// The pictures are the page: a masonry of shots at their own proportions, a
|
|
18
|
+
// small badge for a mark, and the notes of only the card they open, in a side
|
|
19
|
+
// panel. Keys: L lead, K like, N no, arrows to move, Esc to close.
|
|
20
|
+
//
|
|
21
|
+
// --topics .longbeard/design/families/board.md: each card takes its family from
|
|
22
|
+
// that board, matched by name, so the moodboard's own cards (with their like,
|
|
23
|
+
// avoid and move lines) are shown under the families that board names.
|
|
24
|
+
// A card in no family keeps its part. Every card stays.
|
|
25
|
+
//
|
|
26
|
+
// --one-lead: one Lead on the whole board, not one per group. The direction's
|
|
27
|
+
// board is grouped by family, and its lead is one reference across them all.
|
|
13
28
|
//
|
|
14
29
|
// node moodboard.mjs .longbeard/design/moodboard/board.md --out .longbeard/design/moodboard/moodboard.html
|
|
15
30
|
// node moodboard.mjs .longbeard/design/pricing/board.md --out .longbeard/design/pricing/moodboard.html
|
|
16
31
|
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
32
|
+
// --overview 6 shows each family as its first six tiles (families.mjs writes
|
|
33
|
+
// the most typical first), how many more it has, and its measured ranges from a
|
|
34
|
+
// "Families:" header line, with a note per family (two looks in one, belongs
|
|
35
|
+
// with another). It checks the sorting; it never chooses: every family stays on
|
|
36
|
+
// the board that is marked next.
|
|
22
37
|
// node moodboard.mjs .longbeard/design/moodboard/board.md --overview 6 --out .longbeard/design/families/families.html
|
|
23
38
|
import { execSync } from "node:child_process";
|
|
24
39
|
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -33,6 +48,11 @@ if (overAt !== -1 && !(Number.isInteger(overview) && overview >= 1 && overview <
|
|
|
33
48
|
console.error("moodboard: --overview takes how many tiles to show per family, 1 to 24");
|
|
34
49
|
process.exit(2);
|
|
35
50
|
}
|
|
51
|
+
const topicsAt = args.indexOf("--topics");
|
|
52
|
+
const topicsArg = topicsAt === -1 ? "" : (args.splice(topicsAt, 2)[1] ?? "");
|
|
53
|
+
const leadAt = args.indexOf("--one-lead");
|
|
54
|
+
const oneLead = leadAt !== -1;
|
|
55
|
+
if (oneLead) args.splice(leadAt, 1);
|
|
36
56
|
const boardArg = args[0];
|
|
37
57
|
if (!boardArg || !outArg || args.length !== 1) {
|
|
38
58
|
console.error("usage: node moodboard.mjs .longbeard/design/<step>/board.md --out .longbeard/design/<step>/moodboard.html");
|
|
@@ -78,7 +98,10 @@ function fieldsOf(text) {
|
|
|
78
98
|
const fields = {};
|
|
79
99
|
for (const line of text.split(/\r?\n/)) {
|
|
80
100
|
const m = line.match(/^- ([a-z][a-z /-]*):\s*(.*)$/i);
|
|
81
|
-
if (m)
|
|
101
|
+
if (!m) continue;
|
|
102
|
+
const k = m[1].toLowerCase();
|
|
103
|
+
if (k === "also") (fields.also ||= []).push(m[2].trim());
|
|
104
|
+
else fields[k] = m[2].trim();
|
|
82
105
|
}
|
|
83
106
|
return fields;
|
|
84
107
|
}
|
|
@@ -116,9 +139,22 @@ function framesOf(folder) {
|
|
|
116
139
|
}
|
|
117
140
|
|
|
118
141
|
const md = readFileSync(boardPath, "utf8");
|
|
142
|
+
const topicsMd = topicsArg ? (existsSync(resolvePath(topicsArg)) ? readFileSync(resolvePath(topicsArg), "utf8") : null) : "";
|
|
143
|
+
if (topicsMd === null) {
|
|
144
|
+
console.error(`moodboard: no board at ${topicsArg}`);
|
|
145
|
+
process.exit(1);
|
|
146
|
+
}
|
|
147
|
+
// name → family, from the sorted board.
|
|
148
|
+
const familyOf = new Map();
|
|
149
|
+
for (const chunk of topicsMd.split(/^### /m).slice(1)) {
|
|
150
|
+
const nl = chunk.indexOf("\n");
|
|
151
|
+
const name = (nl === -1 ? chunk : chunk.slice(0, nl)).trim();
|
|
152
|
+
const topic = fieldsOf(nl === -1 ? "" : chunk.slice(nl + 1)).topic;
|
|
153
|
+
if (topic && !familyOf.has(name)) familyOf.set(name, topic);
|
|
154
|
+
}
|
|
119
155
|
// Ranges per family, from board.md's header: "Families: f1 (light · empty 55–70%) — 42; f2 (…) — 18".
|
|
120
156
|
const ranges = new Map();
|
|
121
|
-
const familiesLine = md.match(/^Families:\s*(.*)$/m)?.[1] || "";
|
|
157
|
+
const familiesLine = (topicsMd || md).match(/^Families:\s*(.*)$/m)?.[1] || "";
|
|
122
158
|
for (const part of familiesLine.split(";")) {
|
|
123
159
|
const m = part.trim().match(/^(.+?)\s*\((.+)\)/);
|
|
124
160
|
if (m) ranges.set(m[1].trim().toLowerCase(), m[2].trim());
|
|
@@ -154,29 +190,44 @@ for (const card of cards) {
|
|
|
154
190
|
const seenName = (names.get(card.name) ?? 0) + 1;
|
|
155
191
|
names.set(card.name, seenName);
|
|
156
192
|
const markKey = seenName > 1 ? `${card.name} #${seenName}` : card.name;
|
|
157
|
-
const topic = topicOf(card.topic || card.part);
|
|
193
|
+
const topic = topicOf(familyOf.get(card.name) || card.topic || card.part);
|
|
158
194
|
// A seed shared in chat has no URL, so its name is not a link.
|
|
159
195
|
const url = (card.link || "").trim().split(/\s+/)[0];
|
|
160
196
|
const name = /^https?:\/\//i.test(url)
|
|
161
197
|
? `<a class="name" href="${esc(url)}" target="_blank" rel="noopener noreferrer">${esc(card.name)}</a>`
|
|
162
198
|
: `<span class="name">${esc(card.name)}</span>`;
|
|
163
199
|
const like = (card.like || "").trim();
|
|
164
|
-
const
|
|
200
|
+
const avoid = (card.avoid || "").trim();
|
|
201
|
+
const line = ((card.pattern || card.move) ? `<p class="line">${esc(card.pattern || card.move)}</p>` : "") + (card.measured ? `<p class="measured">${esc(card.measured)}</p>` : "") + (like ? `<p class="liked">You liked: ${esc(like)}</p>` : "") + (avoid ? `<p class="avoided">Leave out: ${esc(avoid)}</p>` : "");
|
|
202
|
+
// Other screens of the same product: "<part>: <shot>", each shown small with the card.
|
|
203
|
+
const also = (card.also || [])
|
|
204
|
+
.map((line) => {
|
|
205
|
+
const m = line.match(/^(.*?):\s*(\S.*)$/);
|
|
206
|
+
const [part, shot] = m ? [m[1].trim(), m[2].trim()] : ["", line.trim()];
|
|
207
|
+
const src = /^https?:\/\//i.test(shot) ? shot : existsSync(resolvePath(shot)) ? href(resolvePath(shot)) : "";
|
|
208
|
+
if (!src) console.error(`moodboard: missing shot ${shot} (also, on ${card.name})`);
|
|
209
|
+
return src ? `<a class="sib" href="${esc(src)}" target="_blank" rel="noopener"><img src="${esc(src)}" alt="${esc(card.name)}: ${esc(part || "another screen")}" loading="lazy"><span>${esc(part || "screen")}</span></a>` : "";
|
|
210
|
+
})
|
|
211
|
+
.join("");
|
|
165
212
|
const play = frames
|
|
166
213
|
? `<button type="button" class="play" aria-label="Play ${esc(card.name)}">Play</button><span class="clock"></span>`
|
|
167
214
|
: "";
|
|
168
|
-
const tile = `<figure class="tile" data-id="${id}" data-title="${esc(card.name)}" data-topic="${esc(topic.label)}" data-key="${esc(markKey)}"${like ? ` data-like="${esc(like)}"` : ""}${
|
|
215
|
+
const tile = `<figure class="tile" data-id="${id}" data-title="${esc(card.name)}" data-topic="${esc(topic.label)}" data-key="${esc(markKey)}"${like ? ` data-like="${esc(like)}"` : ""}${avoid ? ` data-avoid="${esc(avoid)}"` : ""}${
|
|
169
216
|
frames ? ` data-frames="${esc(JSON.stringify(frames))}"` : ""
|
|
170
217
|
}>
|
|
171
|
-
<div class="frame"
|
|
218
|
+
<div class="frame" tabindex="0" role="button" aria-label="Open ${esc(card.name)}"><img src="${esc(poster)}" alt="${esc(card.name)}" loading="lazy"><span class="id">${id}</span><span class="badge" aria-hidden="true"></span>${play}</div>
|
|
172
219
|
<figcaption>
|
|
220
|
+
<button type="button" class="close" aria-label="Close">Close</button>
|
|
221
|
+
<a class="big" href="${esc(poster)}" target="_blank" rel="noopener" aria-label="Open the shot of ${esc(card.name)} at full size"><img data-src="${esc(poster)}" alt=""></a>
|
|
222
|
+
${also ? `<div class="also" aria-label="Other screens of the same product">${also}</div>` : ""}
|
|
173
223
|
${name}${line}
|
|
174
224
|
<div class="marks" role="group" aria-label="Mark ${esc(card.name)}">
|
|
175
225
|
<button type="button" data-mark="lead" aria-pressed="false">Lead</button>
|
|
176
226
|
<button type="button" data-mark="like" aria-pressed="false">Like</button>
|
|
177
227
|
<button type="button" data-mark="no" aria-pressed="false">No</button>
|
|
178
228
|
</div>
|
|
179
|
-
<input class="why" type="text" placeholder="
|
|
229
|
+
<input class="why" type="text" placeholder="What you like in it, and why (optional)" aria-label="What you like in ${esc(card.name)}, and why">
|
|
230
|
+
<input class="avoid" type="text" placeholder="Leave out: what you don't want from it (optional)" aria-label="What to leave out of ${esc(card.name)}">
|
|
180
231
|
</figcaption>
|
|
181
232
|
</figure>`;
|
|
182
233
|
// In the overview each family is its own section, named by its id as written (f1, not F1), so the
|
|
@@ -204,7 +255,7 @@ const body = ordered
|
|
|
204
255
|
const head = overview
|
|
205
256
|
? `<h2>${esc(label)} <span>${s.tiles.length}</span></h2>
|
|
206
257
|
${ranges.has(key) ? `<p class="ranges">${esc(ranges.get(key))}</p>` : ""}
|
|
207
|
-
<div class="take"><
|
|
258
|
+
<div class="take"><input class="fam-note" type="text" data-family="${esc(key || label)}" placeholder="Note (optional): two looks in one, belongs with another…" aria-label="Note on ${esc(label)}">${more ? `<span class="more">+${more} more not shown</span>` : ""}</div>`
|
|
208
259
|
: `<h2>${esc(label)} <span>${s.tiles.length}</span></h2>`;
|
|
209
260
|
return `<section id="${slug(at)}">
|
|
210
261
|
${head}
|
|
@@ -215,6 +266,9 @@ const body = ordered
|
|
|
215
266
|
})
|
|
216
267
|
.join("\n ");
|
|
217
268
|
|
|
269
|
+
// The Long Beard beard, small and one ink: it marks the page as the tool's and adds no colour.
|
|
270
|
+
const LOGO = "iVBORw0KGgoAAAANSUhEUgAAACoAAABYBAMAAABxB3iiAAAAMFBMVEWfn59ubm7Z2dn+/v7+/v7////+/v4AAAACAgIXFxcnJyfp6enX19c3NzdXV1dGRkbPaZsJAAAAEHRSTlP///AgWZ/+AP////7/////SdcINAAABTtJREFUeNpdlWtUVFUUx3/3zB1AZhhu4AO1hVOCj8yYKLKHyaiEq5eOS9DoQ2IFPj6UtSyVamm1AC2ttFUIZo6GikU6mrrMVTFoargsxzFTU2kkKN/OyENgHrcPd5jBzrfzW/+77/7vc/Y+0kLCK1Cf2jfgSwNAjkB35vPjEzeWWgFED90/fFfDtktd5tu0P415O+uDxwZ7tZ1ubPj7uhGHUp8/uUITh+nxiv5/UNCQ/9clcyTuD8FBv26GDUXfb7iTHhpsbap5JnftXse4u5fNdPZQdyB+cckqtcm0ZMh6773hHAKDdo9eesRUDHvGLRhjfsOq/W3ajfsfeGoaoDv4Ys399SmgG4uzPKBL0hINfv/gAedlMzIoV84fbg6biUlvnhDSvA1OapzfY/zLiSfr+1llwP+6swfiLzndMRVBcFBthyNCeWStoiCz/8TWa/Oj1NBefAsRGFauKlFI90yxHyElT/dFA8RUMXCizynqq1o2Odi7CQD9tpXsmOJUhNRS0aTf9/YxO+ipOxCsnGo4qYj0jSHa5yUOOA15RYesZZdlQ7pLbjcA04ZeGCrtmrJT4XKFMyU+oOt88nxSZanx95yJY7aNGJtzzGANxJyRx9v2heo2Fbda/l1+rGqhKv3pi/UiwCgNCS1yGd6Mrbz1UtJsz1ZLBgIPsXaJOR+1SqXMaLArSsnmNlG3b5u0yIsv9Io0S3rVZc5+vTPXqHs6eVJocJ/WB4suX2gZuMA2uWlv17m/xK3OE+/J9zDLOMVMKOtgYHZheuo62TQst92+sfGPornzJ/VfYunz68qOoCxL5LW7PqwuP2yqJFixTO813jQEdN6RCbNaLq5+y/vV1h9S+pU5qUzJdki5a5Z1391McRXfVV9yAqOOZ7jJHHH1xaXDYopTj8ZdNBoMhcZ34/6ZIS24+nDS3wvaT6Wb6lz32pKq6+LiTrp1j5/1VWYdqE1f935trX/UECXO23g9UzD65mTdqZwsvg7s2anf/I5VBNPQjRWJvuSjqyosB48MzHk0w53S5otHgBSvCneD3VPyAfHPTvDGTQUB0gs205ZHEIvzXi0cdbDPxxr90TrBp3rMvLzL6TE36b1BJwJk5R8T+63Jc5f6vPZrenNfrQM8h9bTwuoLw3Z9vmE7n3hABmVHwgMmNeBuwd8unZ38aaqCAL3PgR9VBTV2PVbJBQLuaEVVpS2DIca2RHLgBQFtAuj65C3AQqxd67eA6yZGBa8CFOgfQo1Mgm4rMVZAP86OTQEB49VushatBGBtPokWkCGBbwsKeq719PzC63chQMIVbYAuPFdBIIWk+ihVbcoBKwKCRm+UpjlW3QABU/ytUZqtb9sOAlR6N5Z0U8tXzOL/S6DuXNhbrYYAgXzmdl2CFuE+J1ATafreEzExok3UTpPxAo5HaEYvrS5CzQ6NJsRDMEK9No1KQHKEWqRohHmaMzugRKkfAFPEW3RVfxboTTu0QfJV6czwCJOj0lsnpk6eBOH7EC3lmdcAVzjf1tAmAHlkYxngUzXqxKe56rQBP4f/pkrVMB2yy4CYsFbONAH5/FJeiN7RFj4huuKvQx0l5dA+TxLhHK5kB2x6J2k2wPRcWptGA5aQzb+CKkDqzi4MayfuQOEpAIxJq7eH34Dg0Zr3WzQfdd8c98drjmXPE2GI87fa5r7h12nAud2HLfuGQvf5BtejPTWTMzaWcNEONfk3cqL1Dc1JKXEt/2Jr6bnmXpWU+w6v6VxTxvKEvN71fbziSEzeYkOB+7aqy42Z7jNFaqNV2/4HUzT8HOE538sAAAAASUVORK5CYII=";
|
|
271
|
+
|
|
218
272
|
const html = `<!DOCTYPE html>
|
|
219
273
|
<html lang="en">
|
|
220
274
|
<head>
|
|
@@ -222,83 +276,108 @@ const html = `<!DOCTYPE html>
|
|
|
222
276
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
223
277
|
<title>Moodboard</title>
|
|
224
278
|
<style>
|
|
225
|
-
|
|
279
|
+
/* Quiet chrome: the references are the only colour on the page. */
|
|
280
|
+
:root { --canvas: #f3f2ef; --paper: #ffffff; --ink: #1c1c1a; --muted: #6f6c65; --line: #dedbd4; --soft: #e9e7e2; --panel: 380px; }
|
|
226
281
|
* { box-sizing: border-box; }
|
|
227
|
-
html { color-scheme: light; scroll-padding-top:
|
|
228
|
-
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
|
|
229
|
-
main { max-width:
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
.
|
|
233
|
-
|
|
234
|
-
|
|
282
|
+
html { color-scheme: light; scroll-padding-top: 76px; }
|
|
283
|
+
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
|
|
284
|
+
main { max-width: 1680px; margin: 0 auto; padding: 0 28px 160px; }
|
|
285
|
+
body[data-open] main { margin-right: calc(var(--panel) + 28px); }
|
|
286
|
+
header { padding: 22px 2px 2px; }
|
|
287
|
+
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
|
|
288
|
+
.brand img { height: 44px; width: auto; display: block; }
|
|
289
|
+
.brand span { font-size: 16px; font-weight: 600; }
|
|
290
|
+
h1 { margin: 0; font-size: 16px; font-weight: 400; color: var(--muted); }
|
|
291
|
+
h1::before { content: "/"; margin-right: 10px; color: var(--line); }
|
|
292
|
+
.how { margin: 0 0 6px; max-width: 900px; font-size: 13px; line-height: 1.5; color: var(--muted); }
|
|
293
|
+
.keys { white-space: nowrap; margin-left: 4px; }
|
|
294
|
+
kbd { font: 11px ui-monospace, Menlo, monospace; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--paper); color: var(--ink); }
|
|
295
|
+
/* Only the jump bar sticks, on one line that scrolls sideways, so thirty families never eat the screen. */
|
|
296
|
+
.sticky { position: sticky; top: 0; z-index: 2; background: var(--canvas); display: flex; align-items: center; gap: 12px; padding: 10px 2px; margin: 0 -2px; }
|
|
297
|
+
nav { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; flex: 1 1 auto; min-width: 0; scrollbar-width: thin; padding-bottom: 2px; }
|
|
298
|
+
nav a { white-space: nowrap; flex: none; }
|
|
299
|
+
nav a, .filters button { font-size: 13px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); text-decoration: none; cursor: pointer; font-family: inherit; }
|
|
235
300
|
nav a span, h2 span { color: var(--muted); }
|
|
236
|
-
.filters { display: flex; gap:
|
|
301
|
+
.filters { display: flex; gap: 6px; flex: none; }
|
|
237
302
|
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
|
|
238
|
-
section { margin-top:
|
|
303
|
+
section { margin-top: 26px; }
|
|
239
304
|
section[hidden] { display: none; }
|
|
240
|
-
h2 { margin: 0 0 12px 2px; font-size:
|
|
241
|
-
|
|
242
|
-
.
|
|
305
|
+
h2 { margin: 0 0 12px 2px; font-size: 15px; font-weight: 600; }
|
|
306
|
+
/* A masonry: every shot at its own proportions, a tall page cut at its top. */
|
|
307
|
+
.grid { columns: 4 260px; column-gap: 14px; }
|
|
308
|
+
.tile { margin: 0 0 14px; break-inside: avoid; display: block; }
|
|
243
309
|
.tile[hidden] { display: none; }
|
|
244
|
-
.
|
|
245
|
-
.
|
|
246
|
-
.tile[
|
|
247
|
-
|
|
248
|
-
.
|
|
249
|
-
.
|
|
250
|
-
.
|
|
251
|
-
.
|
|
252
|
-
.
|
|
253
|
-
.
|
|
254
|
-
.
|
|
310
|
+
.frame { position: relative; border-radius: 6px; overflow: hidden; background: var(--soft); cursor: zoom-in; outline: 2px solid transparent; outline-offset: 2px; }
|
|
311
|
+
.frame img { width: 100%; height: auto; max-height: 640px; object-fit: cover; object-position: top center; display: block; }
|
|
312
|
+
.tile[aria-current="true"] .frame { outline-color: var(--ink); }
|
|
313
|
+
.tile[data-state="no"] .frame img { opacity: 0.25; filter: grayscale(1); }
|
|
314
|
+
.id, .clock, .play, .badge { position: absolute; font-size: 11px; line-height: 1.5; padding: 1px 7px; border-radius: 4px; }
|
|
315
|
+
.id { top: 8px; left: 8px; font-family: ui-monospace, Menlo, monospace; background: rgba(255,255,255,0.88); color: var(--ink); pointer-events: none; }
|
|
316
|
+
.badge { top: 8px; right: 8px; font-weight: 600; border-radius: 999px; pointer-events: none; }
|
|
317
|
+
.badge:empty { display: none; }
|
|
318
|
+
.tile[data-state="lead"] .badge { background: var(--ink); color: var(--paper); }
|
|
319
|
+
.tile[data-state="like"] .badge { background: var(--paper); color: var(--ink); }
|
|
320
|
+
.tile[data-state="no"] .badge { background: var(--soft); color: var(--muted); }
|
|
321
|
+
.play { bottom: 8px; left: 8px; border: 0; cursor: pointer; font-family: inherit; font-weight: 600; background: rgba(0,0,0,0.65); color: #fff; }
|
|
322
|
+
.clock { bottom: 8px; right: 8px; pointer-events: none; background: rgba(0,0,0,0.65); color: #fff; }
|
|
255
323
|
.clock:empty { display: none; }
|
|
256
|
-
|
|
257
|
-
|
|
324
|
+
/* The notes of the open card only, in a side panel. */
|
|
325
|
+
figcaption { display: none; }
|
|
326
|
+
.tile[aria-current="true"] figcaption { display: flex; flex-direction: column; gap: 10px; position: fixed; z-index: 4; top: 16px; right: 16px; bottom: 96px; width: var(--panel); overflow-y: auto; padding: 16px; background: var(--paper); border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 8px 32px rgba(0,0,0,0.08); }
|
|
327
|
+
.big { display: block; border-radius: 4px; overflow: hidden; background: var(--soft); cursor: zoom-in; }
|
|
328
|
+
.big img { width: 100%; max-height: 52vh; object-fit: contain; display: block; }
|
|
329
|
+
.close { align-self: flex-end; font: inherit; font-size: 12px; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; margin-bottom: -4px; }
|
|
330
|
+
.also { display: flex; gap: 6px; overflow-x: auto; }
|
|
331
|
+
.sib { flex: none; width: 76px; text-decoration: none; color: var(--muted); font-size: 11px; }
|
|
332
|
+
.sib img { width: 76px; height: 54px; object-fit: cover; object-position: top; border-radius: 3px; display: block; border: 1px solid var(--line); }
|
|
333
|
+
.name { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
|
|
258
334
|
a.name:hover { text-decoration: underline; }
|
|
259
|
-
.line { margin: -4px 0 0; font-size: 13px; line-height: 1.
|
|
335
|
+
.line { margin: -4px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
|
|
260
336
|
.measured { margin: -6px 0 0; font-size: 11px; line-height: 1.4; color: var(--muted); font-variant-numeric: tabular-nums; }
|
|
261
|
-
.liked { margin: -4px 0 0; font-size: 13px; line-height: 1.
|
|
262
|
-
[data-overview] .liked { display: none; }
|
|
263
|
-
.marks { display: flex; gap: 6px;
|
|
264
|
-
.marks button { flex: 1; font: inherit; font-size: 13px; font-weight:
|
|
265
|
-
.marks button[
|
|
266
|
-
|
|
267
|
-
.
|
|
268
|
-
|
|
269
|
-
.
|
|
270
|
-
.bar {
|
|
271
|
-
.bar
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
#
|
|
276
|
-
.
|
|
277
|
-
#count { font-size: 13px; color: var(--muted); }
|
|
278
|
-
[data-overview] .marks, [data-overview] .why, [data-overview] .filters { display: none; }
|
|
337
|
+
.liked, .avoided { margin: -4px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink); }
|
|
338
|
+
[data-overview] .liked, [data-overview] .avoided { display: none; }
|
|
339
|
+
.marks { display: flex; gap: 6px; }
|
|
340
|
+
.marks button { flex: 1; font: inherit; font-size: 13px; font-weight: 500; padding: 7px 0; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
|
|
341
|
+
.marks button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
|
|
342
|
+
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, .frame:focus-visible { outline: 2px solid #2f6fdb; outline-offset: 2px; }
|
|
343
|
+
.why, .avoid { font: inherit; font-size: 13px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 6px; width: 100%; }
|
|
344
|
+
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; background: var(--paper); border-top: 1px solid var(--line); }
|
|
345
|
+
.bar-in { max-width: 1680px; margin: 0 auto; padding: 10px 28px; display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 12px; align-items: end; }
|
|
346
|
+
.bar label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
|
|
347
|
+
.bar textarea { width: 100%; font: 12px/1.4 ui-monospace, Menlo, monospace; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; resize: vertical; height: 46px; }
|
|
348
|
+
#note { font-family: inherit; font-size: 13px; }
|
|
349
|
+
#out { background: var(--canvas); }
|
|
350
|
+
.side { display: flex; align-items: center; gap: 12px; }
|
|
351
|
+
#count { font-size: 13px; color: var(--muted); white-space: nowrap; }
|
|
352
|
+
[data-overview] .marks, [data-overview] .why, [data-overview] .avoid, [data-overview] .filters { display: none; }
|
|
279
353
|
.ranges { margin: -6px 0 10px 2px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
|
|
280
354
|
.take { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px 2px; }
|
|
281
|
-
.fam {
|
|
282
|
-
.fam[aria-pressed="true"] { background: var(--like); border-color: var(--like); color: #fff; }
|
|
283
|
-
.fam-note { flex: 1 1 260px; font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
|
|
355
|
+
.fam-note { flex: 1 1 260px; font: inherit; font-size: 13px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; }
|
|
284
356
|
.more { font-size: 13px; color: var(--muted); }
|
|
285
|
-
#copy { font: inherit; font-size:
|
|
286
|
-
@media (max-width:
|
|
357
|
+
#copy { font: inherit; font-size: 13px; font-weight: 600; padding: 9px 16px; border-radius: 6px; border: 0; background: var(--ink); color: var(--paper); cursor: pointer; white-space: nowrap; }
|
|
358
|
+
@media (max-width: 900px) {
|
|
359
|
+
body[data-open] main { margin-right: auto; }
|
|
360
|
+
main { padding: 0 16px 220px; }
|
|
361
|
+
.tile[aria-current="true"] figcaption { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 72vh; border-radius: 12px 12px 0 0; }
|
|
362
|
+
.bar-in { grid-template-columns: 1fr; padding: 10px 16px; } .sticky { flex-wrap: wrap; } nav { flex-basis: 100%; }
|
|
363
|
+
}
|
|
287
364
|
</style>
|
|
288
365
|
</head>
|
|
289
366
|
<body${overview ? " data-overview" : ""}>
|
|
290
367
|
<main>
|
|
291
368
|
<header>
|
|
292
|
-
<h1>${overview ? "Families" : "Moodboard"}</h1>
|
|
293
|
-
${overview ? `<p class="how">Each family shows its most typical ${overview}.
|
|
294
|
-
<p class="how"${overview ? " hidden" : ""}>Lead what should set the tone
|
|
369
|
+
<div class="brand"><img src="data:image/png;base64,${LOGO}" alt="" width="21" height="44"><span>Long Beard</span><h1>${overview ? "Families" : "Moodboard"}</h1></div>
|
|
370
|
+
${overview ? `<p class="how">Each family shows its most typical ${overview}. Every family stays on your board; this only checks the sorting. Note a family that looks like two, or that belongs with another.</p>` : ""}
|
|
371
|
+
<p class="how"${overview ? " hidden" : ""}>Open a picture to mark it: Lead what should set the tone (${oneLead ? "one on the whole board" : "one per group: a part, or a direction"}), Like what belongs, No what feels wrong. In each like, say what you like and why, and what to leave out of it. A tile in the wrong group gets the note "move to" and the group's name. <span class="keys"><kbd>L</kbd> lead <kbd>K</kbd> like <kbd>N</kbd> no <kbd>←</kbd><kbd>→</kbd> move <kbd>Esc</kbd> close</span></p>
|
|
372
|
+
</header>
|
|
373
|
+
<div class="sticky">
|
|
295
374
|
<nav aria-label="Parts">${jump}</nav>
|
|
296
375
|
<div class="filters" role="group" aria-label="Show">
|
|
297
376
|
<button type="button" data-show="all" aria-pressed="true">All</button>
|
|
298
377
|
<button type="button" data-show="open" aria-pressed="false">Not marked</button>
|
|
299
378
|
<button type="button" data-show="marked" aria-pressed="false">Marked</button>
|
|
300
379
|
</div>
|
|
301
|
-
</
|
|
380
|
+
</div>
|
|
302
381
|
${body}
|
|
303
382
|
</main>
|
|
304
383
|
<div class="bar">
|
|
@@ -324,66 +403,73 @@ const html = `<!DOCTYPE html>
|
|
|
324
403
|
const old = (t) => t.dataset.id + "|" + t.dataset.title;
|
|
325
404
|
const marks = saved.marks || {};
|
|
326
405
|
const notes = saved.notes || {};
|
|
406
|
+
const avoids = saved.avoids || {};
|
|
407
|
+
const oneLead = ${oneLead};
|
|
327
408
|
const read = (from, t) => (tag(t) in from ? from[tag(t)] : from[old(t)]) || "";
|
|
328
409
|
note.value = saved.note || "";
|
|
410
|
+
const has = (from, t) => tag(t) in from || old(t) in from;
|
|
329
411
|
for (const t of tiles) {
|
|
330
412
|
const mark = read(marks, t);
|
|
413
|
+
// A like from the picker is already a like: it starts marked, until they change it.
|
|
331
414
|
if (mark) t.dataset.state = mark;
|
|
415
|
+
else if (t.dataset.like && !has(marks, t)) t.dataset.state = "like";
|
|
332
416
|
// Their words from the picker fill the note until they change it; a note they cleared stays cleared.
|
|
333
|
-
t.querySelector(".why").value =
|
|
417
|
+
t.querySelector(".why").value = has(notes, t) ? read(notes, t) : t.dataset.like || "";
|
|
418
|
+
t.querySelector(".avoid").value = has(avoids, t) ? read(avoids, t) : t.dataset.avoid || "";
|
|
334
419
|
}
|
|
335
420
|
let show = "all";
|
|
336
421
|
const short = (s) => (s.length > 48 ? s.slice(0, 47) + "…" : s);
|
|
337
422
|
const label = (t) => t.dataset.id + " " + short(t.dataset.title) + " (" + t.dataset.topic + ")";
|
|
338
423
|
const list = (state) => tiles.filter((t) => t.dataset.state === state).map(label);
|
|
339
|
-
const fams = [...document.querySelectorAll(".fam")];
|
|
340
424
|
const famNotes = [...document.querySelectorAll(".fam-note")];
|
|
341
|
-
|
|
342
|
-
const taken = new Set(saved.taken || []);
|
|
343
|
-
for (const b of fams) if (taken.has(b.dataset.family)) b.setAttribute("aria-pressed", "true");
|
|
344
|
-
for (const i of famNotes) i.value = (saved.famNotes || {})[i.dataset.family] || "";
|
|
345
|
-
}
|
|
425
|
+
for (const i of famNotes) i.value = (saved.famNotes || {})[i.dataset.family] || "";
|
|
346
426
|
function renderFamilies() {
|
|
347
|
-
const
|
|
348
|
-
const lines = ["Family picks", "take: " + (taken.join("; ") || "none")];
|
|
427
|
+
const lines = ["Family notes"];
|
|
349
428
|
const written = famNotes.filter((i) => i.value.trim());
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
for (const i of written) lines.push("- " + i.dataset.family + ": " + i.value.trim().replace(/\\s+/g, " "));
|
|
353
|
-
}
|
|
429
|
+
for (const i of written) lines.push("- " + i.dataset.family + ": " + i.value.trim().replace(/\\s+/g, " "));
|
|
430
|
+
if (!written.length) lines.push("none: the sorting holds");
|
|
354
431
|
if (note.value.trim()) lines.push("note: " + note.value.trim().replace(/\\s+/g, " "));
|
|
355
432
|
out.value = lines.join("\\n");
|
|
356
|
-
count.textContent =
|
|
433
|
+
count.textContent = famNotes.length + " families · " + written.length + " noted";
|
|
357
434
|
const keep = {};
|
|
358
435
|
for (const i of written) keep[i.dataset.family] = i.value;
|
|
359
|
-
try { localStorage.setItem(key, JSON.stringify({
|
|
436
|
+
try { localStorage.setItem(key, JSON.stringify({ famNotes: keep, note: note.value })); } catch (e) {}
|
|
360
437
|
}
|
|
361
|
-
for (const b of fams) b.addEventListener("click", () => { b.setAttribute("aria-pressed", b.getAttribute("aria-pressed") === "true" ? "false" : "true"); render(); });
|
|
362
438
|
for (const i of famNotes) i.addEventListener("input", () => render());
|
|
363
439
|
function render() {
|
|
364
|
-
if (
|
|
440
|
+
if (famNotes.length) return renderFamilies();
|
|
365
441
|
const lines = ["Moodboard picks", "lead: " + (list("lead").join("; ") || "none"), "like: " + (list("like").join("; ") || "none"), "no: " + (list("no").join("; ") || "none")];
|
|
366
442
|
const written = tiles.filter((t) => t.querySelector(".why").value.trim());
|
|
367
443
|
if (written.length) {
|
|
368
444
|
lines.push("notes:");
|
|
369
445
|
for (const t of written) lines.push("- " + t.dataset.id + " " + short(t.dataset.title) + ": " + t.querySelector(".why").value.trim().replace(/\\s+/g, " "));
|
|
370
446
|
}
|
|
447
|
+
const left = tiles.filter((t) => t.querySelector(".avoid").value.trim());
|
|
448
|
+
if (left.length) {
|
|
449
|
+
lines.push("leave out:");
|
|
450
|
+
for (const t of left) lines.push("- " + t.dataset.id + " " + short(t.dataset.title) + ": " + t.querySelector(".avoid").value.trim().replace(/\\s+/g, " "));
|
|
451
|
+
}
|
|
371
452
|
if (note.value.trim()) lines.push("note: " + note.value.trim().replace(/\\s+/g, " "));
|
|
372
453
|
out.value = lines.join("\\n");
|
|
373
454
|
const marked = tiles.filter((t) => t.dataset.state).length;
|
|
374
455
|
count.textContent = list("lead").length + " lead · " + list("like").length + " like · " + list("no").length + " no · " + (tiles.length - marked) + " open";
|
|
375
456
|
const keepMarks = {};
|
|
376
457
|
const keepNotes = {};
|
|
458
|
+
const keepAvoids = {};
|
|
377
459
|
for (const t of tiles) {
|
|
378
460
|
const s = t.dataset.state || "";
|
|
379
461
|
for (const b of t.querySelectorAll(".marks button")) b.setAttribute("aria-pressed", b.dataset.mark === s ? "true" : "false");
|
|
462
|
+
t.querySelector(".badge").textContent = s ? s.charAt(0).toUpperCase() + s.slice(1) : "";
|
|
380
463
|
t.hidden = !(show === "all" || (show === "open" ? !s : !!s));
|
|
381
|
-
|
|
464
|
+
// A like from the picker that they unmarked is saved as unmarked, so it does not come back.
|
|
465
|
+
if (s || t.dataset.like) keepMarks[tag(t)] = s;
|
|
382
466
|
const w = t.querySelector(".why").value;
|
|
383
467
|
if (w.trim() || t.dataset.like) keepNotes[tag(t)] = w;
|
|
468
|
+
const a = t.querySelector(".avoid").value;
|
|
469
|
+
if (a.trim() || t.dataset.avoid) keepAvoids[tag(t)] = a;
|
|
384
470
|
}
|
|
385
471
|
for (const sec of document.querySelectorAll("section")) sec.hidden = ![...sec.querySelectorAll(".tile")].some((t) => !t.hidden);
|
|
386
|
-
try { localStorage.setItem(key, JSON.stringify({ marks: keepMarks, notes: keepNotes, note: note.value })); } catch (e) {}
|
|
472
|
+
try { localStorage.setItem(key, JSON.stringify({ marks: keepMarks, notes: keepNotes, avoids: keepAvoids, note: note.value })); } catch (e) {}
|
|
387
473
|
}
|
|
388
474
|
for (const t of tiles) {
|
|
389
475
|
for (const b of t.querySelectorAll(".marks button")) {
|
|
@@ -391,14 +477,15 @@ const html = `<!DOCTYPE html>
|
|
|
391
477
|
const mark = b.dataset.mark;
|
|
392
478
|
if (t.dataset.state === mark) delete t.dataset.state;
|
|
393
479
|
else {
|
|
394
|
-
// One lead per group (a
|
|
395
|
-
if (mark === "lead") for (const o of tiles) if (o !== t && o.dataset.topic === t.dataset.topic && o.dataset.state === "lead") o.dataset.state = "like";
|
|
480
|
+
// One lead per group (a piece), or on the whole board with --one-lead: a new lead turns the old one into a like.
|
|
481
|
+
if (mark === "lead") for (const o of tiles) if (o !== t && (oneLead || o.dataset.topic === t.dataset.topic) && o.dataset.state === "lead") o.dataset.state = "like";
|
|
396
482
|
t.dataset.state = mark;
|
|
397
483
|
}
|
|
398
484
|
render();
|
|
399
485
|
});
|
|
400
486
|
}
|
|
401
487
|
t.querySelector(".why").addEventListener("input", render);
|
|
488
|
+
t.querySelector(".avoid").addEventListener("input", render);
|
|
402
489
|
}
|
|
403
490
|
for (const b of document.querySelectorAll(".filters button")) {
|
|
404
491
|
b.addEventListener("click", () => {
|
|
@@ -446,6 +533,59 @@ const html = `<!DOCTYPE html>
|
|
|
446
533
|
t.querySelector(".frame").addEventListener("mouseleave", stop);
|
|
447
534
|
}
|
|
448
535
|
}
|
|
536
|
+
// One card open at a time: its notes in the side panel, its shot loaded large only then.
|
|
537
|
+
let current = null;
|
|
538
|
+
const body = document.body;
|
|
539
|
+
function open(t) {
|
|
540
|
+
if (current) current.setAttribute("aria-current", "false");
|
|
541
|
+
current = t || null;
|
|
542
|
+
if (!current) {
|
|
543
|
+
if (body) delete body.dataset.open;
|
|
544
|
+
return;
|
|
545
|
+
}
|
|
546
|
+
current.setAttribute("aria-current", "true");
|
|
547
|
+
const big = current.querySelector(".big img");
|
|
548
|
+
if (big && big.dataset && big.dataset.src && !big.getAttribute("src")) big.setAttribute("src", big.dataset.src);
|
|
549
|
+
if (body) body.dataset.open = "";
|
|
550
|
+
if (current.scrollIntoView) current.scrollIntoView({ block: "nearest" });
|
|
551
|
+
}
|
|
552
|
+
for (const t of tiles) {
|
|
553
|
+
t.querySelector(".frame").addEventListener("click", (e) => {
|
|
554
|
+
if (e && e.target && e.target.closest && e.target.closest(".play")) return;
|
|
555
|
+
open(current === t ? null : t);
|
|
556
|
+
});
|
|
557
|
+
t.querySelector(".close").addEventListener("click", () => open(null));
|
|
558
|
+
}
|
|
559
|
+
if (document.addEventListener) {
|
|
560
|
+
document.addEventListener("keydown", (e) => {
|
|
561
|
+
const typing = e.target && /^(INPUT|TEXTAREA)$/.test(e.target.tagName);
|
|
562
|
+
if (e.key === "Escape") {
|
|
563
|
+
if (typing) e.target.blur();
|
|
564
|
+
open(null);
|
|
565
|
+
return;
|
|
566
|
+
}
|
|
567
|
+
if (typing || e.metaKey || e.ctrlKey || e.altKey) return;
|
|
568
|
+
const k = e.key.toLowerCase();
|
|
569
|
+
if ((k === "enter" || k === " ") && e.target && e.target.classList && e.target.classList.contains("frame")) {
|
|
570
|
+
e.preventDefault();
|
|
571
|
+
e.target.click();
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
if (k === "arrowright" || k === "arrowleft") {
|
|
575
|
+
const shown = tiles.filter((t) => !t.hidden);
|
|
576
|
+
if (!shown.length) return;
|
|
577
|
+
const at = shown.indexOf(current);
|
|
578
|
+
e.preventDefault();
|
|
579
|
+
open(shown[at === -1 ? 0 : (at + (k === "arrowright" ? 1 : -1) + shown.length) % shown.length]);
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
const mark = { l: "lead", k: "like", n: "no" }[k];
|
|
583
|
+
if (mark && current && body && !body.hasAttribute("data-overview")) {
|
|
584
|
+
e.preventDefault();
|
|
585
|
+
current.querySelector('.marks [data-mark="' + mark + '"]').click();
|
|
586
|
+
}
|
|
587
|
+
});
|
|
588
|
+
}
|
|
449
589
|
// The text box is the real path: the clipboard API can be refused on a file:// page.
|
|
450
590
|
document.getElementById("copy").addEventListener("click", async (e) => {
|
|
451
591
|
out.focus();
|
|
@@ -465,5 +605,5 @@ const html = `<!DOCTYPE html>
|
|
|
465
605
|
|
|
466
606
|
mkdirSync(dirname(outPath), { recursive: true });
|
|
467
607
|
writeFileSync(outPath, html);
|
|
468
|
-
console.error(`moodboard: ${n} tiles in ${ordered.length} parts`);
|
|
608
|
+
console.error(`moodboard: ${n} tiles in ${ordered.length} parts${cards.length > n ? `, ${cards.length - n} of ${cards.length} cards left out for a missing shot` : ""}`);
|
|
469
609
|
console.log(outArg);
|