@jonandev/longbeard 0.13.0 → 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 -5
- package/CHANGELOG.md +27 -0
- package/README.md +3 -4
- package/beard.json +6 -17
- package/bin/long-beard.js +2 -2
- package/package.json +1 -1
- package/skills/design/SKILL.md +4 -6
- package/skills/design-brief/SKILL.md +5 -5
- package/skills/design-check/SKILL.md +1 -1
- package/skills/design-check/references/design-rules.md +26 -4
- package/skills/design-check/scripts/rules.mjs +143 -9
- package/skills/design-direction/SKILL.md +70 -52
- package/skills/design-direction/references/design-floor.md +118 -0
- package/skills/design-direction/references/graphic.md +5 -6
- package/skills/design-direction/references/library.md +6 -6
- package/skills/design-direction/references/screen-template.html +2 -2
- 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 +12 -9
- package/skills/design-direction/scripts/colours.mjs +247 -0
- package/skills/design-direction/scripts/moodboard.mjs +1 -1
- package/skills/design-direction/scripts/rules.mjs +747 -0
- package/skills/design-direction/scripts/sheet.mjs +3 -1
- package/skills/design-figma/SKILL.md +1 -1
- package/skills/design-identity/SKILL.md +9 -7
- package/skills/design-identity/references/design-floor.md +118 -0
- package/skills/design-identity/scripts/colours.mjs +35 -1
- package/skills/design-identity/scripts/sheet.mjs +3 -1
- package/skills/design-moodboard/SKILL.md +6 -2
- package/skills/design-moodboard/references/graphic.md +1 -1
- package/skills/design-moodboard/scripts/group.mjs +1 -1
- package/skills/design-moodboard/scripts/moodboard.mjs +1 -1
- package/skills/design-prototype/SKILL.md +51 -48
- package/skills/design-prototype/references/design-floor.md +118 -0
- package/skills/design-prototype/references/design-md-template.md +3 -1
- package/skills/design-prototype/references/graphic.md +6 -5
- package/skills/design-prototype/references/variants.js +43 -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 +6 -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 -204
- package/skills/design-direction/references/full-build.md +0 -20
- package/skills/design-direction/references/grid.md +0 -97
- package/skills/design-direction/scripts/layout-diff.mjs +0 -118
- package/skills/design-families/SKILL.md +0 -139
- 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 -609
- package/skills/design-families/scripts/tag.mjs +0 -289
- package/skills/design-prototype/references/design-rules.md +0 -204
- package/skills/design-prototype/references/five-second.md +0 -46
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: design-direction
|
|
3
3
|
description: >
|
|
4
|
-
Find the direction:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
Find the direction: eight first screens. Six adapt one of their references
|
|
5
|
+
to this product as a designer would (its essence kept, never a copy), with
|
|
6
|
+
one or two things borrowed from their other references; two develop a liked
|
|
7
|
+
reference's concept further, redrawn for this product. Nothing on a screen
|
|
8
|
+
that is not on their board. One agent builds them, scripts check
|
|
9
|
+
contrast and clipped text, and they pick on a rendered canvas, or ask for
|
|
10
|
+
more or a mix. Writes docs/design/design-direction.md. Runs after
|
|
11
|
+
design-brief and design-moodboard; design-identity then refines its type
|
|
12
|
+
and colour.
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
# Design direction
|
|
16
16
|
|
|
17
17
|
**Needs:** `docs/design/design-brief.md`, `docs/design/design-moodboard.md`
|
|
18
|
-
**Uses if there:** `docs/design/design-
|
|
18
|
+
**Uses if there:** `docs/design/design-content.md`
|
|
19
19
|
**Writes:** `docs/design/design-direction.md`
|
|
20
20
|
|
|
21
|
-
**
|
|
21
|
+
**They are the designer; you do the craft.** Everything on a screen comes from their board. Understand what they like in each reference and why, and carry that concept onto this product. Make the craft decisions it leaves open, and add no taste of your own.
|
|
22
|
+
|
|
23
|
+
**Style is theirs; structure can be yours.** Faces, colours, finishes, devices and how pictures are treated come only from their board. How this product's content is arranged (composition, hierarchy, pacing) may be your design, as long as it carries a concept they liked: what you know about design serves their taste, never replaces it.
|
|
22
24
|
|
|
23
25
|
Writes `docs/design/design-direction.md` (committed) and works in `.longbeard/design/direction/` (gitignored): `library.json`, `screens/<n>.html`, `screens.json`, `prototype/first.html`, captures and the canvas.
|
|
24
26
|
|
|
@@ -31,22 +33,20 @@ Writes `docs/design/design-direction.md` (committed) and works in `.longbeard/de
|
|
|
31
33
|
|
|
32
34
|
A graphic (the brief's surface): read [graphic.md](references/graphic.md) first.
|
|
33
35
|
|
|
34
|
-
**At `pace: quick`:** one round of eight; more only when they ask.
|
|
35
|
-
|
|
36
36
|
## 0. Pictures of the subject
|
|
37
37
|
|
|
38
38
|
Three or four pictures of what the product is about, not other designs: theirs, or a few licensed stand-ins from `pictures.mjs`, one query per picture. Every screen uses them, and their colours are one more palette. How: [subject.md](references/subject.md). Show them on a contact sheet with step 1's message; do not stop to ask.
|
|
39
39
|
|
|
40
40
|
## 1. The content and the references, in one message
|
|
41
41
|
|
|
42
|
-
**What a screen carries.**
|
|
42
|
+
**What a screen carries.** Only as much text as its base carries (its reading's `slots`), filled in this order until they run out: the headline (the takeaway), the primary action, the status (open now, in stock), the thing the product shows. What does not fit waits for `design-prototype`, never squeezed in as one more line.
|
|
43
43
|
|
|
44
44
|
**Headlines and the ownable.** Three or four headlines that say the takeaway outright, in the voice, and the ownable: one thing only this product would show (a stamp, a live count, a mark).
|
|
45
45
|
|
|
46
|
-
**Their board, every reference on it.** Copy the moodboard's `board.md` to `.longbeard/design/direction/board.md`, every card, plus the subject as a card (its contact sheet as the shot, `part: subject`, `screen: no`).
|
|
46
|
+
**Their board, every reference on it.** Copy the moodboard's `board.md` to `.longbeard/design/direction/board.md`, every card, plus the subject as a card (its contact sheet as the shot, `part: subject`, `screen: no`). Cards with a `topic:` line show under their group: a heading, never a filter.
|
|
47
47
|
|
|
48
48
|
```
|
|
49
|
-
node <skill>/scripts/moodboard.mjs .longbeard/design/direction/board.md --one-lead
|
|
49
|
+
node <skill>/scripts/moodboard.mjs .longbeard/design/direction/board.md --one-lead --out .longbeard/design/direction/board.html
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
It says how many cards it left out for a missing shot: capture those again first. **Likes are asked once:** a card with a `like:` line starts liked, with their words.
|
|
@@ -55,60 +55,77 @@ It says how many cards it left out for a missing shot: capture those again first
|
|
|
55
55
|
> Then open the board (your likes are marked): **Lead** the one whose composition sets the tone, Like any more, and for each new like say what you like and why ("the orange dot: the only contrast on a quiet page"). Anything you don't want from a reference goes in its **Leave out** box. Paste the copy-out.
|
|
56
56
|
|
|
57
57
|
- **What they like** is what is borrowed; **why** is where it may go. A like without a why: ask once.
|
|
58
|
-
- **What they leave out is never on a screen:** dropped, or its role filled from another of their references
|
|
59
|
-
-
|
|
60
|
-
- **A like the design brief rules out** ("gold on deep green", brief: light only): the brief wins, the like is carried by its role. Say it once before building; a change goes under **Changes** in the design brief.
|
|
58
|
+
- **What they leave out is never on a screen:** dropped, or its role filled from another of their references.
|
|
59
|
+
- With fewer than 6 references, say once that the eight will look alike.
|
|
60
|
+
- **A like the design brief rules out** ("gold on deep green", brief: light only): the brief wins, and the like is carried by its role. Say it once before building; a change goes under **Changes** in the design brief.
|
|
61
61
|
|
|
62
62
|
## 2. Read the references
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
Read the lead and every like closely: its grid, the share of the screen each block takes, type sizes against the width, spacing, colours, faces (the closest Google Font), and what they like in it and why. A live page is measured (`measure.mjs <link>`): its numbers are the page's own. A picture is read by eye at full size; `measure.mjs <picture> --lines` only for a number you cannot read, and the face through `fonts.mjs --shape`. Write it to `library.json`, with the subject and its palette from `subject-colours.mjs`: [library.md](references/library.md).
|
|
65
|
+
|
|
66
|
+
**Never invent a key part.** Once the readings show what each reference has: if none shows a hero or a header and menu, or their picks leave one unclear, ask once, in one message: the cards that show it, to pick from, or a search for that one part (`design-moodboard`'s one piece). **Never block on it:** build on with that part from the closest system on the board, marked `data-standin`, and put their answer in when it comes, in the next round or the prototype.
|
|
65
67
|
|
|
66
|
-
|
|
68
|
+
**The accent** ([rule 6](references/design-floor.md#6-colour)): unless the board clearly shows one or they named it, add the options as swatches to that message, or send them alone, never waiting: `colours.mjs --harmony --primary <#> --ground <#> --family "<board's colours>" --level <AA|AAA>`, plus the subject's accent. Never pick or rank.
|
|
67
69
|
|
|
68
|
-
|
|
70
|
+
## 3. Eight first screens
|
|
69
71
|
|
|
70
|
-
|
|
72
|
+
Read [Before you build](references/design-floor.md#before-you-build) first, and apply it to each screen while you draw it. Build them yourself, one after another, each `screens/<n>.html` from [screen-template.html](references/screen-template.html) at 1440 by 900 (an app, or `first seen on: phone`: 390 by 844).
|
|
71
73
|
|
|
72
|
-
**
|
|
74
|
+
- **Every screen does a first screen's job:** what this is, for whom, the one action. A reference that is not a first screen (a section from mid-page, an inner page, a poster) lends its system and its moves; what only works in its own role is left out.
|
|
75
|
+
- **Every screen adapts its base, as a designer would, never copies it.** First its essence (the reading's `concept`: what it is, why it works). Keep that essence and its scene: the composition's logic, the proportions that make it work, the character of its type and colour. Then adapt the specifics to this client: their content and pictures, only the text its `slots` allow, and where the brief or the subject asks, a colour or face of the same character (another vibrant for a vibrant, a near cousin of the face from `fonts.mjs`). Sizes are scaled to this screen, at [rule 5](references/design-floor.md#5-typography)'s size floor. Two questions for every screen: would a designer call it the same idea (it must be yes), and would they call it a copy (it must be no)? A copy fails, and so does a screen that drifts from the idea.
|
|
76
|
+
- **Then one or two moves** borrowed from their other liked references. A move is what they said they like, placed where their why says it belongs, and it changes only what it names. A why that would not be true on this base sends the move to another base.
|
|
77
|
+
- **Never a collage.** A screen is its base and at most two moves, nothing more. The lead may set the round's tone, but its devices are moves like any other's: a device sits on its own reference's screens and on at most two others, so the eight stay eight different screens.
|
|
78
|
+
- **Spread:** the lead is the base of two screens; four stand on one of their liked references each; two are **concepts**, each from a liked reference no other screen stands on. Eight screens, seven references: only with fewer than six likes does a reference take a second screen, the lead first, then the likes. Accent options still unanswered: about two screens each. Only the lead and their likes are used, never a card they did not pick. No main picture on more than two screens.
|
|
79
|
+
- **What they like is taken whole.** A liked reference's scene, and any device borrowed from it (a ring of text, a block of colour, prints laid on a table), keeps the form, the job and the space around it that it has there. It is never taken apart, restyled or given another job: a block of colour that is a ground does not become a button, a ring of text gets no extra line, pictures laid over each other stay far enough apart to read as separate pictures. A move changes where things sit, never what they are.
|
|
80
|
+
- **A concept** goes further: it develops one liked reference that no other screen is built on (the like with the clearest why first) and redraws its arrangement. First write its `concept` in the reading as a designer would defend it: what it is, and why it works (the tension, the hierarchy, what does the work). Then redraw the arrangement for this product's content so that idea still does the work, with that reference's devices, type, colour and picture treatment. Before you check it, two questions: would a designer call it the same concept (it must be yes), and would they call it a copy (it must be no)? Either answer wrong: redraw. A screen with no concept behind it is not a concept: it is generic, and goes.
|
|
81
|
+
- **Nothing off their board's character:** no face, colour, gradient, shadow, radius, button style or effect their references do not show in kind. An adapted colour or face keeps the role and energy of the one it replaces and comes from the board, the subject or the accent options. `PROVENANCE` names the reference for each, and what was adapted; before the checks, go through the screen's CSS, and anything it cannot name goes.
|
|
82
|
+
- **Where the board shows nothing for a part** (a field, a price, a badge), take it from the base's own system; if the base has none, from another of their references. The name is set in the base's type; a mark is `design-wordmark`'s.
|
|
83
|
+
- **Marked, not hidden:** anything the product does not really have yet carries `data-standin="picture"` or `"fact"`, with `data-standin-note`.
|
|
84
|
+
|
|
85
|
+
Record each in `.longbeard/design/direction/screens.json`:
|
|
73
86
|
|
|
74
87
|
```
|
|
75
|
-
|
|
88
|
+
[{ "n": 1, "base": "<card name>", "moves": [{ "what": "<the move>", "from": "<card name>", "like": "<their words, or null>" }], "accent": "<#hex from the options, or null>", "state": "built" }]
|
|
76
89
|
```
|
|
77
90
|
|
|
78
|
-
|
|
91
|
+
A concept also has `"kind": "concept"` and `"idea": "<the concept it keeps, in one line>"`; its `base` is the reference it develops.
|
|
79
92
|
|
|
80
|
-
|
|
93
|
+
`state` is `built`, or `failed` with `"failure": "<why>"`. Optional: `round` (1 when left out), `fault` (one line), `shot`.
|
|
81
94
|
|
|
82
|
-
|
|
95
|
+
**Check each screen by script:**
|
|
83
96
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
-
|
|
97
|
+
```
|
|
98
|
+
node <skill>/scripts/capture.mjs "file://$PWD/.longbeard/design/direction/screens/1.html" --out .longbeard/design/direction/grid/1.png --clip 0,0,1440,900
|
|
99
|
+
node <skill>/scripts/screen-contrast.mjs "file://$PWD/.longbeard/design/direction/screens/1.html" --wait-title ready
|
|
100
|
+
node <skill>/scripts/rules.mjs "file://$PWD/.longbeard/design/direction/screens/1.html" --screen direction-1 --widths 1440
|
|
101
|
+
```
|
|
87
102
|
|
|
88
|
-
|
|
103
|
+
Act here on `rules.mjs`'s clipped text, text size and placeholder copy; targets, focus and labels are the prototype's. Fix clipped text by setting it smaller within its role or cutting words. Look at each capture yourself, beside the pictures of what it is made from (its base, each move's reference): as a designer would, check that every borrowed scene and device still reads as it does there, whole, with its job and its spacing. Fix what broke before you show it.
|
|
89
104
|
|
|
90
|
-
**
|
|
105
|
+
**The floor, inside the concept** ([how they split](references/design-floor.md#how-to-use-this)). Text a person acts on must pass contrast and size, fixed with the screen's own colours or another crop, never by moving it off the picture. Display type over a picture, overlaps, crops and wide empty space are the look when a reference does them: never tidied away. A liked colour or size stays, its measure in `fault`. A finding left is theirs to decide: `fault` says it as a choice (what it costs, and what would fix it: keep, or change?), and that line goes in your message with the canvas.
|
|
91
106
|
|
|
92
|
-
|
|
93
|
-
- **The hardest screen.** One more screen in the favourite's look: the brief's key screen that is hardest for it (the densest list, a form, a table), its layout from the base's `also` shot of that kind if it has one, else from a reference that shows that kind, built in full, in `screens.json` as `"of": <n>, "test": true`. It tests the look; it is not designed here. Show it beside the favourite on the canvas, and if the look breaks on it, say where in one line: they keep it, go back to another pick, or mix. A graphic skips it.
|
|
107
|
+
**Show the canvas:**
|
|
94
108
|
|
|
95
|
-
|
|
109
|
+
```
|
|
110
|
+
node <skill>/scripts/canvas.mjs .longbeard/design/direction/screens.json --board .longbeard/design/direction/board.md --shots .longbeard/design/direction/grid --out .longbeard/design/direction/canvas.html
|
|
111
|
+
```
|
|
96
112
|
|
|
97
|
-
|
|
113
|
+
It shows every screen in a strip and, for the one they open, what it is made from: its base and each move, with the reference and their words. Give its path, and one line per screen only for a fault or for what sits against the brief (its never, its words, its personality, or could be mistaken for what it must stand apart from). Then one recommendation, as a studio would give it: the screen that best does what the design brief asks, and why, naming the line it serves (the takeaway, the never, what it must stand apart from). Never a preference of your own: the brief's case, theirs to overrule.
|
|
98
114
|
|
|
99
|
-
|
|
115
|
+
> Which is closest? Or "more", "more of 3", "3 with 6's accent".
|
|
100
116
|
|
|
101
|
-
|
|
102
|
-
- **Contrast where text sits** (`screen-contrast.mjs`; at AAA `--min 7 --large 4.5`), never by moving text off the picture.
|
|
103
|
-
- **Something missing:** a slot's item or the primary action, inside its zone.
|
|
104
|
-
- **Something plainly off:** a clipped word, unreadable text, a dead control, a line twice.
|
|
105
|
-
- **Rank, only when inverted:** bring the smaller text down.
|
|
117
|
+
## 4. More, mix, choose
|
|
106
118
|
|
|
107
|
-
|
|
119
|
+
- **More of 3:** three more on 3's base with other moves, in round 2.
|
|
120
|
+
- **A mix** ("4 with 7's colours"): one screen.
|
|
121
|
+
- **More:** a fresh round of eight, new pairings. After two rounds with nothing taken, ask once what is missing (`design-moodboard`).
|
|
122
|
+
- **A part,** only when they ask ("other menus for 3"): three or four versions of that part on the real screen, everything else kept, each from a reference that shows that part. **Options live on the page:** each version is an element with `data-variant="<n>"` and `data-from="<card name>"`, and the page loads [variants.js](references/variants.js) (copy it beside the page): `?variant=<n>` shows one, a small bar names its reference, and ← → flip between them. Capture each with `?variant=<n>&bar=0`, and record each in `screens.json` as `"of": <n>, "part": "<name>"`.
|
|
123
|
+
|
|
124
|
+
Every version stays theirs. A pick that breaks a why they gave: ask once whether the why still holds; never block it.
|
|
108
125
|
|
|
109
|
-
|
|
126
|
+
On their yes, read it back in one line, with three to five **principles**: what this design does on every screen, drawn from their whys and the chosen screen, in their words where they gave some ("one loud thing per screen", "pictures always run to the edge", "type does the decorating"). Each is specific enough that a page could break it. A correction rewrites a principle. Then read its base's motion unless the brief's is none ([library.md](references/library.md)), copy it to `prototype/first.html`, and set `"chosen": n` in `screens.json`. When the brief's `decides` names someone else, they confirm it first.
|
|
110
127
|
|
|
111
|
-
|
|
128
|
+
**In context, before the identity.** A studio shows a chosen concept where it will live before it is signed off. Build two more pages from the chosen screen: its phone view (390 wide), and the brief's key screen that is hardest for this look (the densest list, a form), in the chosen screen's frame and principles, each page opening with its own job. Check them like the eight, and show them beside the chosen screen with the direction. If the look breaks on real content, say where in one line: going back to another pick is still cheap. The prototype starts from these pages.
|
|
112
129
|
|
|
113
130
|
## Write `docs/design/design-direction.md`
|
|
114
131
|
|
|
@@ -131,6 +148,9 @@ Record it in `first.html` itself (`LOOK` and CSS), never a query string. The fiv
|
|
|
131
148
|
- motion: <what moves, trigger, ms, easing, within the brief's pick; or "none">
|
|
132
149
|
- finish: <a pasteable recipe; or "none">
|
|
133
150
|
|
|
151
|
+
## Principles
|
|
152
|
+
- <three to five, as confirmed: what every screen of this design does>
|
|
153
|
+
|
|
134
154
|
## Hierarchy
|
|
135
155
|
1. <first read> 2. <second> 3. <the rest>. Primary action: <what, where>.
|
|
136
156
|
|
|
@@ -149,11 +169,9 @@ No reference names, links or paths. Then the direction in up to five lines:
|
|
|
149
169
|
|
|
150
170
|
## Do not
|
|
151
171
|
|
|
152
|
-
- Rank the screens, or
|
|
172
|
+
- Rank the screens, or recommend from taste: the one recommendation names the design brief line it serves.
|
|
153
173
|
- Add anything their board does not have, or anything they wrote to leave out.
|
|
154
|
-
-
|
|
155
|
-
- Fit more
|
|
156
|
-
-
|
|
157
|
-
- Open a part they did not ask to open.
|
|
158
|
-
- In the touch-up: move a zone, change the layout, add a section, or tidy what the references do on purpose.
|
|
174
|
+
- Show a concept that drops the idea it develops, or copies its reference's layout.
|
|
175
|
+
- Fit more text on a screen than its base carries.
|
|
176
|
+
- Undo what they like because a check flagged it.
|
|
159
177
|
- Take a reference's content, pictures or words.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Design floor
|
|
2
|
+
|
|
3
|
+
Generated from `rules/design-rules.md` by `npm run share`: its opening sections and every hard check. The soft checks and the tells are `design-check`'s.
|
|
4
|
+
|
|
5
|
+
How a screen is checked. `design-check` reads all of it on every frame and build. The skills that build read only the floor (`design-floor.md`: these opening sections and every hard check), so a better model's craft is never held to a textbook while drawing.
|
|
6
|
+
|
|
7
|
+
These rules decide execution, never the look. The direction and `DESIGN.md` decide the look. A rule that seems to ask for a colour, a typeface or a style is misread. It asks only that whatever was chosen is used with intent.
|
|
8
|
+
|
|
9
|
+
## Before you build
|
|
10
|
+
|
|
11
|
+
A studio applies these while drawing each screen, not as a check after. Each is the numbered rule's, said there.
|
|
12
|
+
|
|
13
|
+
- One most prominent element and one primary action (rule 1).
|
|
14
|
+
- Contrast where the text sits, over pictures too (rules 6 and 12).
|
|
15
|
+
- One picture leads; pictures that share the screen never compete (rule 12).
|
|
16
|
+
- Text size at its floor (rule 5).
|
|
17
|
+
- One grouping device per group (rule 2).
|
|
18
|
+
- Every screen follows the direction's principles (before the pick, their whys), and reads as the same product as the first.
|
|
19
|
+
|
|
20
|
+
## How to use this
|
|
21
|
+
|
|
22
|
+
- Check from a screenshot. Every check below can be passed or failed by looking at a rendered screen at its real size. When a check needs a state you cannot see (focus, error, empty), it needs that state's frame, and a missing frame fails rule 8.
|
|
23
|
+
- Go in order: **Idea** first, then every **hard** check, then **soft**.
|
|
24
|
+
- **Hard** is the floor: structure, contrast, text size, targets, focus and states. A hard failure blocks the screen. `DESIGN.md` cannot waive it, except for what the person liked or asked for (below).
|
|
25
|
+
- **When the floor meets a liked concept:**
|
|
26
|
+
- Text a person acts on (body, labels, prices, fields, navigation, buttons): the floor wins. The fix comes from inside the concept: its own ink, another crop, a device the board already has. Never by moving the text off the concept or dropping the concept.
|
|
27
|
+
- Display and composition (giant type over a picture, overlaps, crops): the concept wins, and the fault is written down.
|
|
28
|
+
- A colour or a small size the person liked or asked for: kept, reported as a warning with its measure, not a block. Marked `WARN liked, kept` in `DESIGN.md`; on a page, small text is marked `data-board-size`.
|
|
29
|
+
- **Soft** is a default. `DESIGN.md` may override a soft check on purpose, with a written reason. A soft finding with no reason in `DESIGN.md` is reported, not blocked.
|
|
30
|
+
- A finding is four things: the rule (number and check), hard or soft, where on the screen, and the fix.
|
|
31
|
+
- The shared core applies to everything, except where the Graphics list says it does not. Then add the site, app or graphics list, whichever the brief's surface says.
|
|
32
|
+
|
|
33
|
+
## 1. Hierarchy
|
|
34
|
+
|
|
35
|
+
**Principle:** the eye lands first on what matters most, then moves in the order the task needs.
|
|
36
|
+
- [hard] Exactly one element is the most prominent on the screen. Squint or blur the shot: one thing still stands out.
|
|
37
|
+
- [hard] The primary action is easier to find than any secondary action. If two actions look equally important, only one of them should be.
|
|
38
|
+
|
|
39
|
+
## 2. Grouping
|
|
40
|
+
|
|
41
|
+
**Principle:** things that belong together look together, and things that do not are kept apart.
|
|
42
|
+
- [hard] The space between related items is clearly smaller than the space between groups. A label sits closer to its field than to the field above.
|
|
43
|
+
|
|
44
|
+
## 3. Alignment and grid
|
|
45
|
+
|
|
46
|
+
**Principle:** every element sits on a line shared with something else.
|
|
47
|
+
- [hard] Left edges of text blocks in one column line up. No block is nudged a few pixels off its neighbours.
|
|
48
|
+
|
|
49
|
+
## 5. Typography
|
|
50
|
+
|
|
51
|
+
**Principle:** a few sizes, far apart, set for reading.
|
|
52
|
+
- [hard] At the screen's real size, nothing is under 12px, text a person acts on (links, buttons, labels, fields, prices, navigation) is at least 14px, and body is 16px at every width. Where a reference sets smaller, keep its proportions and scale the step up.
|
|
53
|
+
- [hard] No text is clipped, overlapped, or cut mid-word by its container, in any language the product ships.
|
|
54
|
+
|
|
55
|
+
## 6. Colour
|
|
56
|
+
|
|
57
|
+
**Principle:** colour carries meaning, and the meaning stays the same everywhere.
|
|
58
|
+
- [hard] Body text has a contrast ratio of at least 4.5:1 against its background. Large text (24px, or 18.66px bold, and up) and the visible parts of controls and icons have at least 3:1. When `DESIGN.md` or the design brief sets the level to AAA: 7:1 for body text and 4.5:1 for large text.
|
|
59
|
+
- [hard] Colour is never the only signal. An error, a selected item or a required field also changes shape, weight, an icon or text.
|
|
60
|
+
- [hard] A product with more than one theme has one set of colour tokens, with a value for each theme, and passes every check here in each theme. A colour that stays the same when the theme changes, and should not, fails.
|
|
61
|
+
|
|
62
|
+
## 7. Consistency
|
|
63
|
+
|
|
64
|
+
**Principle:** the same thing looks and behaves the same everywhere.
|
|
65
|
+
- [hard] One action has one look. Two primary buttons on different screens are the same component, same size and same label case.
|
|
66
|
+
|
|
67
|
+
## 8. States
|
|
68
|
+
|
|
69
|
+
**Principle:** every screen is shown in every state a person will meet.
|
|
70
|
+
- [hard] The screen has a frame for each of empty, loading and error that a person can reach, next to the default. A state nobody can reach is recorded as not needed, with the reason. A reachable state with no frame is a failure, not a later task.
|
|
71
|
+
- [hard] Empty says what goes here and gives the one action that fills it. Error says what went wrong in plain words and how to recover.
|
|
72
|
+
- [hard] Interactive components show hover (pointer surfaces), focus, pressed, disabled, and selected where they apply. Each state is visibly different from default.
|
|
73
|
+
|
|
74
|
+
## 9. Affordance and feedback
|
|
75
|
+
|
|
76
|
+
**Principle:** what can be acted on looks like it, and every action visibly answers.
|
|
77
|
+
- [hard] Every interactive element looks interactive without hovering. Text links are distinct from body text by more than colour alone, unless their position makes them obvious (a nav bar).
|
|
78
|
+
- [hard] Nothing that looks interactive is not. A card that looks clickable is clickable, or loses the look.
|
|
79
|
+
|
|
80
|
+
## 10. Accessibility
|
|
81
|
+
|
|
82
|
+
**Principle:** the screen works for people who see, move and read differently.
|
|
83
|
+
- [hard] The focused state of every interactive element shows a visible indicator with at least 3:1 contrast against what is around it. Check it in the focus frame.
|
|
84
|
+
- [hard] Targets are at least 24×24 CSS pixels, or have that much space around them (WCAG 2.2 AA). The app list raises this for touch.
|
|
85
|
+
- [hard] Every input has a visible label. A placeholder alone is not a label.
|
|
86
|
+
- [hard] Text is real text, not text in an image, except in logos.
|
|
87
|
+
|
|
88
|
+
## 11. Copy
|
|
89
|
+
|
|
90
|
+
**Principle:** words do the job of the screen in the product's own voice, made from facts it has.
|
|
91
|
+
- [hard] No placeholder copy: no lorem ipsum, no "Title", no "Button", no "User Name".
|
|
92
|
+
|
|
93
|
+
## 12. Imagery
|
|
94
|
+
|
|
95
|
+
**Principle:** pictures show the real thing, or there are none.
|
|
96
|
+
- [hard] Text over an image meets the contrast floor in rule 6 across the whole text area, not only on the darkest part.
|
|
97
|
+
|
|
98
|
+
## 13. Responsive
|
|
99
|
+
|
|
100
|
+
**Principle:** each size is designed, not squeezed.
|
|
101
|
+
- [hard] At mobile width (360–390px) nothing scrolls sideways, nothing is clipped, and nothing overlaps.
|
|
102
|
+
- [hard] The primary action is reachable at every size without hunting: visible, or one obvious step away.
|
|
103
|
+
|
|
104
|
+
## Sites
|
|
105
|
+
|
|
106
|
+
- [hard] The first screen at mobile and desktop says what this is and who it is for, without scrolling.
|
|
107
|
+
|
|
108
|
+
## Apps
|
|
109
|
+
|
|
110
|
+
- [hard] Touch targets on touch platforms are at least 44×44 pt (Apple) or 48×48 dp (Material), whichever platform it ships on. The web floor in rule 10 still applies.
|
|
111
|
+
- [hard] The person always knows where they are: the current place in navigation is marked, and the screen title matches the nav item.
|
|
112
|
+
|
|
113
|
+
## Graphics
|
|
114
|
+
|
|
115
|
+
- **Applies:** rules 0 to 3, 5, 6, 11, 12 and 14. Rule 4 holds for the margin and the gaps between groups. Rule 7 holds across the pieces of a set.
|
|
116
|
+
- **Does not apply:** rule 8 (states), rule 9 (affordance), the targets, focus and label checks of rule 10, and rule 13 (responsive). A missing state frame is not a finding.
|
|
117
|
+
- [hard] Readable at its distance. Scale the shot to how the piece is seen (a poster read across a street, about 400 px on its long side; a feed post at phone width). The headline and every fact the brief gives still read.
|
|
118
|
+
- [hard] Nothing important in the trim. On a print piece, no word, fact or logo sits in the trim or the safe margin. A picture or a crop that runs off the edge on purpose is not a finding.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Direction for a graphic
|
|
2
2
|
|
|
3
|
-
Read when the product brief's surface is a graphic. Everything in `SKILL.md`
|
|
3
|
+
Read when the product brief's surface is a graphic. Everything in `SKILL.md` holds except what is said here. A piece counts as a screen wherever a skill says screen, and the eight screens are eight pieces.
|
|
4
4
|
|
|
5
5
|
## The size
|
|
6
6
|
|
|
@@ -8,8 +8,8 @@ The size is the format in `docs/brief.md`, never phone or desktop. The design br
|
|
|
8
8
|
|
|
9
9
|
- **On screen:** the pixels the format gives.
|
|
10
10
|
- **In print:** the paper's ratio, at a working width of 1200 px (A3 portrait is 1200 × 1697). Figma carries the real size later.
|
|
11
|
-
- **Build at it:** each screen is built at `?size=<width>x<height>`, and the page's own default size is set to the format, so every later capture is the whole piece.
|
|
12
|
-
- **Capture at it.** Every `--clip 0,0,1440,900`
|
|
11
|
+
- **Build at it:** each screen is built at `?size=<width>x<height>`, and the page's own default size is set to the format, so every later capture is the whole piece. "1440 by 900" means this working size, and every measure stays a share of the piece's width and height.
|
|
12
|
+
- **Capture at it.** Every `--clip 0,0,1440,900` is `--width <w> --clip 0,0,<w>,<h>` at this size, whole piece, never its top half. On the canvas a tall piece shows whole, at its own proportions; look at it before showing it.
|
|
13
13
|
- **A reference of another proportion** (a wide poster for a tall brief) is a base only if its layout survives at the format's ratio, with each measure kept as a share of its own sides. Otherwise it lends moves and is never a base.
|
|
14
14
|
|
|
15
15
|
## What the pieces carry
|
|
@@ -20,10 +20,9 @@ The size is the format in `docs/brief.md`, never phone or desktop. The design br
|
|
|
20
20
|
- **No navigation.** The direction doc says `navigation: none`.
|
|
21
21
|
- **The rest** (the second language, the small print, other sizes of a set) is written down for `design-prototype`.
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Checks and the trim
|
|
24
24
|
|
|
25
|
-
- **
|
|
26
|
-
- **Touch-up:** the same rule, repair and never tidy. Contrast where text sits is fixed; so is a fact the brief gives that is not on the piece, added where the facts sit. Text over a picture, giant type, crops, overlaps and collisions are never faults here, and type cropped by the edge on purpose carries `data-crop`.
|
|
25
|
+
- **Checks:** the same rule, a check reports and the concept wins. Contrast where text sits is fixed; so is a fact the brief gives that is not on the piece, added where the facts sit. Text over a picture, giant type, crops, overlaps and collisions are never faults here, and type cropped by the edge on purpose carries `data-crop`.
|
|
27
26
|
- **Nothing important in the trim:** on a print piece, mark where the trim and a safe margin fall at the working size (3 mm each by default, theirs if they give one). A word or a fact in the trim is a fault. A crop or a picture that runs off the edge on purpose is not.
|
|
28
27
|
|
|
29
28
|
## The doc
|
|
@@ -22,18 +22,18 @@ Write `.longbeard/design/direction/library.json`, one reading per reference (the
|
|
|
22
22
|
"motion": { "what": "…", "trigger": "…", "ms": 600, "easing": "…", "character": "…", "by": "page | frames | not seen" },
|
|
23
23
|
"finish": { "css": "…", "by": "page | eye" },
|
|
24
24
|
"picture_kind": "photo | illustration | 3d | mixed",
|
|
25
|
-
"slots": { "headline": { "words": 3, "lines": 2 }, "small": 3, "pictures": 1 },
|
|
25
|
+
"slots": { "headline": { "words": 3, "lines": 2 }, "small": 3, "blocks": 5, "pictures": 1 },
|
|
26
26
|
"devices": ["<each element that is not content: a disc, a ruled line, a word band, a ring of text>"],
|
|
27
27
|
"measured": { "empty": 62, "pictures": 28, "radius": 12 }
|
|
28
28
|
}]
|
|
29
29
|
}
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
## Measure
|
|
32
|
+
## Measure a page, read a picture
|
|
33
33
|
|
|
34
34
|
**A live page:** `measure.mjs <link>` lists its fonts, sizes, weights, colours and gradients (`by: page`). It also lists the page's motion (each transition and animation with its property, time, easing and trigger) and its finish (shadows, filters, blends and textures with the share of the screen they cover), read before anything is judged by eye.
|
|
35
35
|
|
|
36
|
-
**A reference that is only a picture** (a shot, a poster, a presentation frame):
|
|
36
|
+
**A reference that is only a picture** (a shot, a poster, a presentation frame): read it yourself, at full size: the layout as shares of the screen, the type sizes at 1440 wide, the colours, how much is empty. Its reading says `by: eye`. Scripts guess at pictures; your eye is the better reader, and gets better with every model. For a number you cannot read (a size on a busy shot, the exact ground), measure it:
|
|
37
37
|
|
|
38
38
|
```
|
|
39
39
|
node <skill>/scripts/measure.mjs .longbeard/design/moodboard/refs/<name>.jpg --lines
|
|
@@ -41,7 +41,7 @@ node <skill>/scripts/measure.mjs .longbeard/design/moodboard/refs/<name>.jpg --l
|
|
|
41
41
|
|
|
42
42
|
It reads inside a presentation frame, and gives the ground, the `ink`, the palette (`common`, `loud`), how much is `empty` and how much is `pictures`, and the type: the display line's `px1440`, `weight`, `case`, `box`, the body size, the `scale`, the headline's words and lines, the text `blocks`. `--lines` lists every line it read, with its box: that is the layout's measurements. Sizes are given as px at 1440 wide, which is the size to build at.
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
A number that disagrees with what you plainly see is a misread: use your reading, and say so.
|
|
45
45
|
|
|
46
46
|
**The face, from a picture:** the nearest free face by its measured shape, of the kind you see:
|
|
47
47
|
|
|
@@ -55,11 +55,11 @@ Give it every measure the picture gave (`width`, `xheight`, `dark`, `contrast`).
|
|
|
55
55
|
|
|
56
56
|
- **`likes`:** their words from the board's note (or the card's `like:`). What they like is what the designs borrow; why is how it is used, and where it would be wrong.
|
|
57
57
|
- **`avoid`:** their words from the board's Leave out box (or the card's `avoid:`). Never on a screen built on it, never borrowed from it; the reading still records it (in `devices`, `palette`, wherever it sits), so the rebuild knows what to drop. Empty when they wrote nothing.
|
|
58
|
-
- **`concept` and `move`:** what must survive every change;
|
|
58
|
+
- **`concept` and `move`:** what must survive every change; a screen built on it keeps them.
|
|
59
59
|
- **`layout`, `type`, `spacing`:** the system, in numbers, so the rebuild is measured, not approximated. Type sizes are the reference's against its screen: a 96 px headline on a 1440 screen stays 96 px.
|
|
60
60
|
- **`palette`:** the colours as they work together. A palette is borrowed whole, or one colour they did not name is swapped for another of the same role. Never one colour picked out of it by itself.
|
|
61
61
|
- **`pictures`:** the treatment the product's pictures get on a screen built from it.
|
|
62
|
-
- **`slots`:** how much text it carries; a screen built on it carries the same, and one small element more at most.
|
|
62
|
+
- **`slots`:** how much text it carries, with its text `blocks` as `measure.mjs` counts them (or by eye); a screen built on it carries the same, and one small element more at most.
|
|
63
63
|
- **`devices`:** every element that is not content, so each on a screen traces to one.
|
|
64
64
|
|
|
65
65
|
## Motion, finish and picture kind
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<!--
|
|
3
3
|
One direction screen, to copy to .longbeard/design/direction/screens/<n>.html.
|
|
4
4
|
A screen is one reference rebuilt faithfully with the product's content, then
|
|
5
|
-
changed by one or two moves borrowed from other references
|
|
5
|
+
changed by one or two moves borrowed from other references. Write
|
|
6
6
|
it as a designer would write a static page: plain HTML and CSS, measured
|
|
7
7
|
sizes in px at the screen's width. The template only does what is the same
|
|
8
8
|
every time: the look as variables, overrides in the URL, the faces loaded,
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
- PROVENANCE: for every face, colour, element and effect on the screen, the
|
|
20
20
|
reference it comes from. Anything that cannot name one does not belong.
|
|
21
21
|
|
|
22
|
-
URL overrides (design-identity
|
|
22
|
+
URL overrides (design-identity): ?face= &body= &weight=
|
|
23
23
|
&ground=%23… &ink=%23… &accent=%23… (accent=none hides it) &size=390x844.
|
|
24
24
|
|
|
25
25
|
CONTROLS: empty in a built screen. When the screen is chosen, first.html gets
|
|
@@ -4,7 +4,7 @@ Read by `design-direction`, step 0 and step 2.
|
|
|
4
4
|
|
|
5
5
|
## Pictures
|
|
6
6
|
|
|
7
|
-
Before the
|
|
7
|
+
Before the screens: three or four pictures of what the product is about (the bakery's bread and its bench, the climbing gym's wall, the app's real data on a desk). Not other designs, which is the moodboard's job: the product's own world. Every screen from here on uses them, so nothing is judged on grey boxes or on another product's pictures, and their colours become one more palette (step 2).
|
|
8
8
|
|
|
9
9
|
- **Theirs first.** The design brief says whether they have pictures. If they do, ask for three or four, and save them to `.longbeard/design/pictures/`.
|
|
10
10
|
- **None yet:** find stand-ins, a few, never a bulk search. Search the subject, not a mood: the brief's identity nouns, one query per picture you need.
|
|
@@ -30,4 +30,4 @@ node <skill>/scripts/subject-colours.mjs .longbeard/design/pictures --json
|
|
|
30
30
|
|
|
31
31
|
**Then look, and name every colour.** Open its sheet (`--sheet <scratch>/subject.html`, captured), which shows each proposed colour beside the pictures with the places it comes from lit up. Every colour must be something a person sees as the subject and can name: "the crust", "the flour", "the oven's black". A colour that lights up the backdrop, a cloth, a wall or a prop is not the subject's, even when it fills the photo: drop it (`--exclude "#hex"`) and run it again. The script already flags colours that sit mostly at the edges as background and never makes them the signature or the accent; the look is the check it cannot do. Write the name beside each colour wherever it is shown ("crust, lightened to carry white text").
|
|
32
32
|
|
|
33
|
-
Only then it goes in the library as `"subject"`. Never tune them stronger to make a screen livelier: a colour no reference would set a page on is not a direction they chose.
|
|
33
|
+
Its proposal is a start, not the answer: a colour you can name better from the pictures (the crust's real brown, not the averaged one) replaces it, contrast checked with `colours.mjs`. Only then it goes in the library as `"subject"`. Never tune them stronger to make a screen livelier: a colour no reference would set a page on is not a direction they chose.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Options on the real page. Each option is an element with data-variant="1", "2", …
|
|
2
|
+
// and data-from="<the reference it comes from>". The page shows one, chosen by
|
|
3
|
+
// ?variant=<n> (1 when absent), and a small bar at the bottom centre: the option's
|
|
4
|
+
// number, its reference, and arrows. ← and → flip between them and keep the URL in
|
|
5
|
+
// step, so a capture or a link opens the same option. ?bar=0 hides the bar for captures.
|
|
6
|
+
// Copy this file next to the page and load it last: <script src="variants.js"></script>
|
|
7
|
+
(() => {
|
|
8
|
+
const all = [...document.querySelectorAll("[data-variant]")];
|
|
9
|
+
const ns = [...new Set(all.map((el) => el.dataset.variant))].sort((a, b) => Number(a) - Number(b));
|
|
10
|
+
if (!ns.length) return;
|
|
11
|
+
const params = new URLSearchParams(location.search);
|
|
12
|
+
let at = Math.max(0, ns.indexOf(params.get("variant") || ns[0]));
|
|
13
|
+
const bar = document.createElement("div");
|
|
14
|
+
bar.setAttribute("role", "toolbar");
|
|
15
|
+
bar.setAttribute("aria-label", "Options");
|
|
16
|
+
bar.style.cssText = "position:fixed;left:50%;bottom:16px;transform:translateX(-50%);z-index:2147483647;display:flex;gap:12px;align-items:center;padding:8px 12px;border-radius:999px;background:#111;color:#fff;font:500 13px/1.2 system-ui,sans-serif;box-shadow:0 2px 12px rgba(0,0,0,.25)";
|
|
17
|
+
const button = (text, label, step) => {
|
|
18
|
+
const b = document.createElement("button");
|
|
19
|
+
b.type = "button";
|
|
20
|
+
b.textContent = text;
|
|
21
|
+
b.setAttribute("aria-label", label);
|
|
22
|
+
b.style.cssText = "all:unset;cursor:pointer;padding:4px 8px;min-width:24px;text-align:center";
|
|
23
|
+
b.onclick = () => show(at + step);
|
|
24
|
+
return b;
|
|
25
|
+
};
|
|
26
|
+
const label = document.createElement("span");
|
|
27
|
+
bar.append(button("←", "Previous option", -1), label, button("→", "Next option", 1));
|
|
28
|
+
function show(i) {
|
|
29
|
+
at = (i + ns.length) % ns.length;
|
|
30
|
+
for (const el of all) el.hidden = el.dataset.variant !== ns[at];
|
|
31
|
+
const from = all.find((el) => el.dataset.variant === ns[at])?.dataset.from || "";
|
|
32
|
+
label.textContent = `${at + 1} / ${ns.length}${from ? " \u00b7 from " + from : ""}`;
|
|
33
|
+
params.set("variant", ns[at]);
|
|
34
|
+
history.replaceState(null, "", "?" + params.toString() + location.hash);
|
|
35
|
+
}
|
|
36
|
+
addEventListener("keydown", (e) => {
|
|
37
|
+
if (e.target.closest?.("input, textarea, select, [contenteditable]")) return;
|
|
38
|
+
if (e.key === "ArrowLeft") show(at - 1);
|
|
39
|
+
if (e.key === "ArrowRight") show(at + 1);
|
|
40
|
+
});
|
|
41
|
+
if (params.get("bar") !== "0") document.body.append(bar);
|
|
42
|
+
show(at);
|
|
43
|
+
})();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// The direction's screens as one page to choose from: every screen in a strip
|
|
3
|
-
// (
|
|
3
|
+
// (each round, and a screen's parts, in a row), the one
|
|
4
4
|
// they open shown large, and beside it what it is made from: its base and each
|
|
5
5
|
// move, with the reference's picture and their own words. Actions write a
|
|
6
6
|
// line for the chat. No dependencies. It shows what was built; it adds no
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
//
|
|
9
9
|
// node canvas.mjs .longbeard/design/direction/screens.json --board .longbeard/design/direction/board.md --shots .longbeard/design/direction/grid --out .longbeard/design/direction/canvas.html
|
|
10
10
|
//
|
|
11
|
-
// screens.json entries (
|
|
11
|
+
// screens.json entries (the skill's step 3): n, base, moves [{ what, from, like }], state,
|
|
12
|
+
// kind ("concept", with idea: the concept it keeps, shown in place of "Base"),
|
|
12
13
|
// failure, and optionally round (1 when left out), of (the screen it belongs to),
|
|
13
|
-
// part (a part of that screen),
|
|
14
|
+
// part (a part of that screen), fault (one line), shot
|
|
14
15
|
// (a picture; else <shots>/<n>.png). board.md cards give each reference's shot and like.
|
|
15
16
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
16
17
|
import { dirname, isAbsolute, relative, resolve } from "node:path";
|
|
@@ -87,14 +88,14 @@ const shotOf = (s) => {
|
|
|
87
88
|
return "";
|
|
88
89
|
};
|
|
89
90
|
|
|
90
|
-
// Rows: each round, then each
|
|
91
|
+
// Rows: each round, then each screen's parts.
|
|
91
92
|
const rows = new Map();
|
|
92
93
|
for (const s of screens) {
|
|
93
|
-
const key = s.of != null ?
|
|
94
|
+
const key = s.of != null ? `${s.of} · ${s.part || "parts"}` : `Round ${s.round || 1}`;
|
|
94
95
|
if (!rows.has(key)) rows.set(key, []);
|
|
95
96
|
rows.get(key).push(s);
|
|
96
97
|
}
|
|
97
|
-
const label = (s) => (s.state === "failed" ? "failed" :
|
|
98
|
+
const label = (s) => (s.state === "failed" ? "failed" : "built");
|
|
98
99
|
const data = screens.map((s) => {
|
|
99
100
|
const base = cardOf(s.base);
|
|
100
101
|
return {
|
|
@@ -103,7 +104,7 @@ const data = screens.map((s) => {
|
|
|
103
104
|
label: label(s),
|
|
104
105
|
of: s.of != null ? String(s.of) : "",
|
|
105
106
|
part: s.part || "",
|
|
106
|
-
|
|
107
|
+
concept: s.kind === "concept" ? s.idea || "its concept" : "",
|
|
107
108
|
fault: s.state === "failed" ? `failed: ${s.failure || "no reason given"}` : s.fault || "",
|
|
108
109
|
base: { name: base.name, src: base.src, like: base.like, avoid: base.avoid },
|
|
109
110
|
moves: (s.moves || []).map((m) => {
|
|
@@ -246,11 +247,13 @@ const html = `<!DOCTYPE html>
|
|
|
246
247
|
$("baseimg").src = s.base.src || "";
|
|
247
248
|
$("basebox").href = s.base.src || "#";
|
|
248
249
|
$("basecap").textContent = "Base: " + s.base.name;
|
|
249
|
-
const kind = s.
|
|
250
|
+
const kind = s.part ? s.part + " of " + s.of : (s.concept ? "concept from " : "on ") + s.base.name;
|
|
250
251
|
$("title").textContent = s.n + " · " + kind;
|
|
251
252
|
$("fault").textContent = s.fault;
|
|
252
253
|
$("made").innerHTML =
|
|
253
|
-
|
|
254
|
+
(s.concept
|
|
255
|
+
? ing(s.base.src, "Concept · " + s.base.name, "its idea, redrawn for this product: " + s.concept, s.base.like, s.base.avoid)
|
|
256
|
+
: ing(s.base.src, "Base · " + s.base.name, "the layout, spacing and everything no move names", s.base.like, s.base.avoid)) +
|
|
254
257
|
s.moves.map((m) => ing(m.src, "+ " + m.from, m.what + (m.proposed ? " (proposed)" : ""), m.like, "")).join("");
|
|
255
258
|
try { localStorage.setItem(key, s.n); } catch (e) {}
|
|
256
259
|
}
|