@brignano/design 0.4.0 → 0.5.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/DESIGN.md +23 -1
- package/package.json +1 -1
- package/product-page.css +16 -3
package/DESIGN.md
CHANGED
|
@@ -333,7 +333,16 @@ The order is fixed, because each band answers the question the last one raised:
|
|
|
333
333
|
four ruled columns) or a `.pp-figure`.
|
|
334
334
|
4. **Close** (`.pp-close`) — the primary action again, with the room a form needs
|
|
335
335
|
(`.pp-panel`).
|
|
336
|
-
5. **Footer** (`.pp-footer`)
|
|
336
|
+
5. **Footer** (`.pp-footer`) — the brand and a line about it, a few links, then
|
|
337
|
+
the **legal line** (`.pp-legal`): `© {year} Anthony Brignano. All rights
|
|
338
|
+
reserved.` and, if the product has them, its Privacy and Terms links
|
|
339
|
+
(`<nav aria-label="Legal">`). Leave out a link whose page doesn't exist.
|
|
340
|
+
|
|
341
|
+
The year is the current year **at build time**. This package is CSS and HTML,
|
|
342
|
+
so the consuming site's build fills it in (a template value from
|
|
343
|
+
`new Date().getFullYear()`, or a bundler `define`). Never type it by hand, where
|
|
344
|
+
it goes stale every January, and never write it from client script, where it
|
|
345
|
+
flashes or is missing without JavaScript.
|
|
337
346
|
|
|
338
347
|
Rules:
|
|
339
348
|
|
|
@@ -350,3 +359,16 @@ Rules:
|
|
|
350
359
|
|
|
351
360
|
Every class starts with `.pp-`, so the file sits beside a site's own stylesheet.
|
|
352
361
|
A page can change `--pp-width` (default 1160px) and `--pp-gutter` on `.pp`.
|
|
362
|
+
|
|
363
|
+
Before a product page ships, check it:
|
|
364
|
+
|
|
365
|
+
- [ ] Bands in order: header, hero, story, close, footer.
|
|
366
|
+
- [ ] One primary action, the same everywhere it appears.
|
|
367
|
+
- [ ] A status word with a dot, in the header and the hero.
|
|
368
|
+
- [ ] A one-line thesis; every headline is a sentence.
|
|
369
|
+
- [ ] The proof slot is the product (a live demo) or a real screenshot.
|
|
370
|
+
- [ ] Three or four story chapters, numbered by the list.
|
|
371
|
+
- [ ] Has a copyright footer: `© {year} Anthony Brignano. All rights reserved.`,
|
|
372
|
+
the year filled in at build time, plus Privacy and Terms links for the
|
|
373
|
+
pages the product has.
|
|
374
|
+
- [ ] No hex outside `tokens.css` (`npm run check`).
|
package/package.json
CHANGED
package/product-page.css
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* .pp-hero status, a one-line thesis, a subhead, two actions, a proof slot
|
|
11
11
|
* .pp-story 3–4 numbered chapters: problem, how it works, who it's for, why now
|
|
12
12
|
* .pp-close the primary action again, with whatever it needs (a form)
|
|
13
|
-
* .pp-footer
|
|
13
|
+
* .pp-footer brand and links, then the legal line: © year, owner, and
|
|
14
|
+
* the product's Privacy and Terms links if it has them
|
|
14
15
|
*
|
|
15
16
|
* The skeleton is previews/product-page.html: copy it, keep the order, replace
|
|
16
17
|
* the words. Rules (DESIGN.md §13):
|
|
@@ -34,6 +35,9 @@
|
|
|
34
35
|
font-variant-numeric: tabular-nums;
|
|
35
36
|
-webkit-font-smoothing: antialiased;
|
|
36
37
|
}
|
|
38
|
+
/* On <body>, drop the browser's 8px margin so the sticky header and every band
|
|
39
|
+
run to the screen edges. On a wrapper, the body is the site's business. */
|
|
40
|
+
body.pp { margin: 0; }
|
|
37
41
|
@media (max-width: 560px) { .pp { --pp-gutter: var(--s4); } }
|
|
38
42
|
|
|
39
43
|
/* The content column every band lines up on. */
|
|
@@ -62,7 +66,9 @@
|
|
|
62
66
|
.pp-header-actions { display: flex; align-items: center; gap: var(--s3); }
|
|
63
67
|
.pp-nav + .pp-header-actions { margin-left: 0; }
|
|
64
68
|
.pp-brand + .pp-header-actions { margin-left: auto; }
|
|
65
|
-
|
|
69
|
+
/* With the nav hidden, the actions go right. The selector repeats
|
|
70
|
+
.pp-nav + .pp-header-actions so it outranks the margin-left: 0 above. */
|
|
71
|
+
@media (max-width: 860px) { .pp-nav { display: none; } .pp-nav + .pp-header-actions { margin-left: auto; } }
|
|
66
72
|
@media (max-width: 480px) { .pp-header .pp-status { display: none; } }
|
|
67
73
|
|
|
68
74
|
/* ── Status ────────────────────────────────────────────────────────────
|
|
@@ -84,7 +90,7 @@
|
|
|
84
90
|
.pp-button is the page's one primary action. .is-secondary is everything
|
|
85
91
|
else. Works on <a> and <button>. */
|
|
86
92
|
.pp-button {
|
|
87
|
-
display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
|
|
93
|
+
display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); box-sizing: border-box;
|
|
88
94
|
font: 600 var(--text-base) / 1.2 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer;
|
|
89
95
|
padding: 13px 22px; border-radius: 8px; border: 1px solid var(--i);
|
|
90
96
|
background: var(--i); color: var(--on-i);
|
|
@@ -98,6 +104,8 @@
|
|
|
98
104
|
.pp-button.is-small { font-size: var(--text-sm); padding: 8px 14px; }
|
|
99
105
|
.pp-button:focus-visible { outline: 2px solid var(--i-ink); outline-offset: 2px; }
|
|
100
106
|
.pp-button:disabled { background: var(--i-disabled-bg); border-color: transparent; color: var(--i-disabled-ink); cursor: not-allowed; }
|
|
107
|
+
/* The 44px touch target includes padding and border (border-box above), so
|
|
108
|
+
a small header button stays 44px tall rather than growing to 62px. */
|
|
101
109
|
@media (pointer: coarse) { .pp-button { min-height: 44px; } }
|
|
102
110
|
|
|
103
111
|
.pp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin: 0; }
|
|
@@ -170,3 +178,8 @@
|
|
|
170
178
|
.pp-footer nav { display: flex; flex-wrap: wrap; gap: var(--s4); }
|
|
171
179
|
.pp-footer nav a { color: var(--ink-soft); text-decoration: none; }
|
|
172
180
|
.pp-footer nav a:hover { color: var(--ink); }
|
|
181
|
+
/* The legal line: the copyright, then Privacy / Terms when the product has
|
|
182
|
+
them. Full width under the brand row, quieter than it. The year is filled in
|
|
183
|
+
by the site's build, never typed and never written by client script. */
|
|
184
|
+
.pp-legal { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); font-size: var(--text-xs); }
|
|
185
|
+
.pp-legal small { font-size: inherit; }
|