@logomarks/lookbook 0.4.0 → 0.6.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/CHANGELOG.md +66 -0
- package/README.md +3 -3
- package/package.json +3 -3
- package/src/fields.d.ts +3 -1
- package/src/fields.js +86 -5
- package/src/fit.js +118 -0
- package/src/glass.d.ts +32 -0
- package/src/glass.js +154 -0
- package/src/index.d.ts +2 -0
- package/src/index.js +2 -0
- package/src/live.d.ts +25 -1
- package/src/live.js +36 -3
- package/src/looks/index.d.ts +5 -2
- package/src/looks/index.js +32 -20
- package/src/looks/kit.d.ts +8 -0
- package/src/looks/kit.js +16 -0
- package/src/looks/stark.d.ts +19 -0
- package/src/looks/stark.js +106 -0
- package/src/styles/wall-looks.css +188 -0
- package/src/styles/wall.css +34 -3
- package/src/wall.d.ts +2 -0
- package/src/wall.js +14 -2
package/src/live.js
CHANGED
|
@@ -26,10 +26,29 @@ const FIELD_EFFECTS = {
|
|
|
26
26
|
'truchet-field': () => import('@arraypress/effects-astro/runtime/truchet-field').then((m) => m.truchetField),
|
|
27
27
|
'pixel-horizon': () => import('@arraypress/effects-astro/runtime/pixel-horizon').then((m) => m.pixelHorizon),
|
|
28
28
|
'fluted-glow': () => import('@arraypress/effects-astro/runtime/fluted-glow').then((m) => m.flutedGlow),
|
|
29
|
+
'fluid-folds': () => import('@arraypress/effects-astro/runtime/fluid-folds').then((m) => m.fluidFolds),
|
|
30
|
+
'fluted-bokeh': () => import('@arraypress/effects-astro/runtime/fluted-bokeh').then((m) => m.flutedBokeh),
|
|
31
|
+
// the glass cards (./glass.js): the mark itself in glass
|
|
32
|
+
'glass-drop': () => import('@arraypress/effects-astro/runtime/glass-drop').then((m) => m.glassDrop),
|
|
33
|
+
'glass-stack': () => import('@arraypress/effects-astro/runtime/glass-stack').then((m) => m.glassStack),
|
|
29
34
|
};
|
|
30
35
|
|
|
31
36
|
/**
|
|
32
|
-
*
|
|
37
|
+
* The mark a glass card's effect draws, read from its still (./glass.js): the still's `data-m` group as a white SVG,
|
|
38
|
+
* as a data URL, so the mark's paths are in the page once.
|
|
39
|
+
*
|
|
40
|
+
* @param card The card.
|
|
41
|
+
* @returns The data URL, or null when the card has no still mark (a field card).
|
|
42
|
+
*/
|
|
43
|
+
export function markSource(card) {
|
|
44
|
+
const g = card.querySelector('.wc-gm [data-m]');
|
|
45
|
+
if (!g) return null;
|
|
46
|
+
const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><g fill="#fff">${g.innerHTML}</g></svg>`;
|
|
47
|
+
return `data:image/svg+xml,${encodeURIComponent(svg)}`;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Starts a field or glass card's effect once its module has loaded (a glass card's with its mark).
|
|
33
52
|
*
|
|
34
53
|
* @param card The card.
|
|
35
54
|
* @param config Its `data-shader` config (`effect` names the field).
|
|
@@ -38,9 +57,10 @@ const FIELD_EFFECTS = {
|
|
|
38
57
|
function field(card, config) {
|
|
39
58
|
let stop = () => {};
|
|
40
59
|
let gone = false;
|
|
60
|
+
const src = markSource(card);
|
|
41
61
|
FIELD_EFFECTS[config.effect]?.()
|
|
42
62
|
.then((start) => {
|
|
43
|
-
if (!gone) stop = start(card, config);
|
|
63
|
+
if (!gone) stop = start(card, src ? { ...config, src } : config);
|
|
44
64
|
})
|
|
45
65
|
.catch(() => {}); // it can't run here: the card keeps its still
|
|
46
66
|
return () => {
|
|
@@ -49,6 +69,10 @@ function field(card, config) {
|
|
|
49
69
|
};
|
|
50
70
|
}
|
|
51
71
|
import { whenNear } from '@arraypress/effects-astro/runtime/near';
|
|
72
|
+
import { fitNames, fitWatch } from './fit.js';
|
|
73
|
+
|
|
74
|
+
/** Every card's name fitted to its card (./fit.js): `fitName`, `fitNames`, `fitWatch`. */
|
|
75
|
+
export { fitName, fitNames, fitWatch } from './fit.js';
|
|
52
76
|
import { budget } from '@arraypress/effects-astro/runtime/budget';
|
|
53
77
|
|
|
54
78
|
/** The smoke's greys: pale on a dark ground, dark on white (Ink's `dark`). */
|
|
@@ -180,7 +204,16 @@ export function liveCards(options = {}) {
|
|
|
180
204
|
};
|
|
181
205
|
for (const el of options.observe ?? []) new MutationObserver(watch).observe(el, { childList: true, subtree: true });
|
|
182
206
|
watch();
|
|
183
|
-
|
|
207
|
+
// every name fitted to its card, as cards come and change size and when the fonts load (`fit: false` leaves them)
|
|
208
|
+
if (options.fit !== false) fitWatch(scope, { observe: options.observe ?? [] });
|
|
209
|
+
return {
|
|
210
|
+
watch: () => {
|
|
211
|
+
watch();
|
|
212
|
+
// a style change (Plain on or off, a name typed) shows names that were hidden: fit those too
|
|
213
|
+
if (options.fit !== false) fitNames(scope);
|
|
214
|
+
},
|
|
215
|
+
restart,
|
|
216
|
+
};
|
|
184
217
|
}
|
|
185
218
|
|
|
186
219
|
/**
|
package/src/looks/index.d.ts
CHANGED
|
@@ -71,6 +71,8 @@ export declare const LOOK_KINDS: readonly [
|
|
|
71
71
|
'editorial',
|
|
72
72
|
'brandsheet',
|
|
73
73
|
'overprint',
|
|
74
|
+
'brutal',
|
|
75
|
+
'sortglitch',
|
|
74
76
|
];
|
|
75
77
|
/** A drawn look's kind. */
|
|
76
78
|
export type LookKind = (typeof LOOK_KINDS)[number];
|
|
@@ -165,8 +167,9 @@ export declare const ACID: {
|
|
|
165
167
|
*/
|
|
166
168
|
export declare function wideEms(name: string): number;
|
|
167
169
|
/**
|
|
168
|
-
* Refits a name
|
|
169
|
-
*
|
|
170
|
+
* Refits a name after its text changes (a name typed in the Lookbook's toolbar): one sized from its width (`data-fit`:
|
|
171
|
+
* the terminal's, the editorial's, the brutal poster's) is sized again, the glitch card's slices are cut again, and every
|
|
172
|
+
* name is fitted to its card.
|
|
170
173
|
*
|
|
171
174
|
* @param el The name's element.
|
|
172
175
|
*/
|
package/src/looks/index.js
CHANGED
|
@@ -18,12 +18,17 @@
|
|
|
18
18
|
import { escapeHtml } from '@arraypress/text';
|
|
19
19
|
import { hash, rng } from '@arraypress/og-image/palette';
|
|
20
20
|
import { markBox, markCells, heatField } from '../marks.js';
|
|
21
|
-
import { f1, pad2, withLength, def, use, mk, meta, nameB, art, around, framed, pickOf, markUrl } from './kit.js';
|
|
21
|
+
import { f1, pad2, withLength, def, use, mk, meta, nameB, art, around, framed, pickOf, markUrl, wideEms } from './kit.js';
|
|
22
22
|
import { MODERN, retargetModern } from './modern.js';
|
|
23
23
|
import { BLOOM } from './bloom.js';
|
|
24
24
|
import { STREET, retargetStreet } from './street.js';
|
|
25
25
|
import { CLUB } from './club.js';
|
|
26
26
|
import { STUDIO, sansEms } from './studio.js';
|
|
27
|
+
import { STARK, slices } from './stark.js';
|
|
28
|
+
import { fitName } from '../fit.js';
|
|
29
|
+
|
|
30
|
+
/** A name's width in Michroma capitals, in ems (./kit.js): the terminal's and the brutal poster's names are sized from it. */
|
|
31
|
+
export { wideEms };
|
|
27
32
|
|
|
28
33
|
/** The mark as a CSS background image (./kit.js). */
|
|
29
34
|
export { markUrl };
|
|
@@ -85,6 +90,9 @@ export const LOOK_KINDS = [
|
|
|
85
90
|
'editorial',
|
|
86
91
|
'brandsheet',
|
|
87
92
|
'overprint',
|
|
93
|
+
// the stark set, on the 2026-11-28 photos (./stark.js)
|
|
94
|
+
'brutal',
|
|
95
|
+
'sortglitch',
|
|
88
96
|
];
|
|
89
97
|
|
|
90
98
|
/** The animated ones (marked `data-anim`, started on screen). */
|
|
@@ -118,6 +126,7 @@ const ANIMATED = new Set([
|
|
|
118
126
|
'clubpulse',
|
|
119
127
|
'frost',
|
|
120
128
|
'spectral',
|
|
129
|
+
'sortglitch',
|
|
121
130
|
]);
|
|
122
131
|
|
|
123
132
|
/**
|
|
@@ -155,6 +164,7 @@ export const LOOK_LOOP = {
|
|
|
155
164
|
clubpulse: { cycle: 8, speed: 1.4 }, // the mark fades up, four light pulses, it fades: 5.7 s
|
|
156
165
|
frost: { cycle: 12, speed: 2 }, // the three lights drift out and back: 6 s
|
|
157
166
|
spectral: { cycle: 10, speed: 2 }, // the spectrum slides one whole tile: 5 s
|
|
167
|
+
sortglitch: { cycle: 5, speed: 1 }, // the slices hold, jump twice, settle: 5 s
|
|
158
168
|
};
|
|
159
169
|
|
|
160
170
|
/** How often each look is dealt, against the older looks' weights (`WEIGHTS`: photo 3, gradient 3, mono 2 … crop 1, 23
|
|
@@ -207,6 +217,8 @@ export const LOOK_WEIGHTS = {
|
|
|
207
217
|
editorial: 0.4,
|
|
208
218
|
brandsheet: 0.4,
|
|
209
219
|
overprint: 0.4,
|
|
220
|
+
brutal: 0,
|
|
221
|
+
sortglitch: 0,
|
|
210
222
|
};
|
|
211
223
|
|
|
212
224
|
/** Each look's card shape (width / height). */
|
|
@@ -257,6 +269,8 @@ export const LOOK_RATIO = {
|
|
|
257
269
|
editorial: '4 / 5',
|
|
258
270
|
brandsheet: '4 / 5',
|
|
259
271
|
overprint: '1 / 1',
|
|
272
|
+
brutal: '4 / 5',
|
|
273
|
+
sortglitch: '4 / 5',
|
|
260
274
|
};
|
|
261
275
|
|
|
262
276
|
/** Names for the expanded view's background label. */
|
|
@@ -307,6 +321,8 @@ export const LOOK_LABEL = {
|
|
|
307
321
|
editorial: 'Editorial',
|
|
308
322
|
brandsheet: 'Brand sheet',
|
|
309
323
|
overprint: 'Overprint',
|
|
324
|
+
brutal: 'Brutalist poster',
|
|
325
|
+
sortglitch: 'Glitch card',
|
|
310
326
|
};
|
|
311
327
|
|
|
312
328
|
/* ---------- the looks ---------- */
|
|
@@ -817,7 +833,7 @@ function longshadow(c) {
|
|
|
817
833
|
/** The acid set's colours: lime, teal, near-black. */
|
|
818
834
|
export const ACID = { lime: '#c6f432', teal: '#0f8b8d', black: '#0b0f0c' };
|
|
819
835
|
/** Portraits among the wall's photos (the rest are figures at a distance and helmets). */
|
|
820
|
-
const PORTRAITS = /\/(modern|y2k|red-bob|teal-shades|violet-shades|pink-holo|blue-braids)-?\d*\.webp$/;
|
|
836
|
+
const PORTRAITS = /\/(modern|y2k|red-bob|teal-shades|violet-shades|pink-holo|blue-braids|rimlight|dithered|offfocus)-?\d*\.webp$/;
|
|
821
837
|
|
|
822
838
|
/** acidmap: a portrait, black and white, gradient-mapped near-black → teal → lime (an SVG filter on the photo); the mark
|
|
823
839
|
* big in white or lime, the name small in wide-tracked capitals, one line of tight copy. */
|
|
@@ -890,30 +906,25 @@ function outlinewall(c) {
|
|
|
890
906
|
|
|
891
907
|
/* ---------- the terminal set: a crypto / HUD board in the accent (acid lime) on black ---------- */
|
|
892
908
|
|
|
893
|
-
/** Michroma's capitals, in ems (measured): most are about 1, M and W far wider, I a sliver. */
|
|
894
|
-
const WIDE = { M: 1.37, W: 1.63, N: 1.13, I: 0.28, ' ': 0.28, E: 0.88, F: 0.84, J: 0.84, L: 0.81, T: 0.94, '&': 1.19, '-': 0.5 };
|
|
895
|
-
|
|
896
|
-
/**
|
|
897
|
-
* A name's width in ems, set in Michroma capitals (the terminal's name is sized to its measure from this; a count of
|
|
898
|
-
* letters cut MANSARD off at the card's edge).
|
|
899
|
-
*
|
|
900
|
-
* @param name The name.
|
|
901
|
-
*/
|
|
902
|
-
export function wideEms(name) {
|
|
903
|
-
let w = 0;
|
|
904
|
-
for (const ch of name.toUpperCase()) w += WIDE[ch] ?? 1.04;
|
|
905
|
-
return Math.max(4, +w.toFixed(2));
|
|
906
|
-
}
|
|
907
|
-
|
|
908
909
|
/**
|
|
909
|
-
* Refits a name
|
|
910
|
-
*
|
|
910
|
+
* Refits a name after its text changes (a name typed in the Lookbook's toolbar): one sized from its width (`data-fit`:
|
|
911
|
+
* the terminal's, the editorial's, the brutal poster's) is sized again, the glitch card's slices are cut again, and every
|
|
912
|
+
* name is fitted to its card (../fit.js).
|
|
911
913
|
*
|
|
912
914
|
* @param el The name's element.
|
|
913
915
|
*/
|
|
914
916
|
export function refit(el) {
|
|
917
|
+
const text = el.dataset.slices ? (el.firstChild?.nodeType === 3 ? el.firstChild.textContent : el.textContent) ?? '' : (el.textContent ?? '');
|
|
915
918
|
const fit = el.dataset.fit;
|
|
916
|
-
if (fit) el.style.setProperty('--chars', String((fit === 'wide' ? wideEms : sansEms)(
|
|
919
|
+
if (fit) el.style.setProperty('--chars', String((fit === 'wide' ? wideEms : sansEms)(text)));
|
|
920
|
+
// the glitch card's slices, cut again for the new name (setting the name's text took them away)
|
|
921
|
+
if (el.dataset.slices) {
|
|
922
|
+
el.textContent = text;
|
|
923
|
+
el.insertAdjacentHTML('beforeend', slices(el.dataset.slices, text));
|
|
924
|
+
el.style.setProperty('--chars', String(sansEms(text.toUpperCase())));
|
|
925
|
+
}
|
|
926
|
+
// and fitted to its card
|
|
927
|
+
if (typeof window !== 'undefined') fitName(el);
|
|
917
928
|
}
|
|
918
929
|
|
|
919
930
|
/** terminal: a HUD on black: status lines typing in one by one in lime mono, a lime panel with chamfered corners,
|
|
@@ -1008,6 +1019,7 @@ const LOOKS = {
|
|
|
1008
1019
|
...STREET,
|
|
1009
1020
|
...CLUB,
|
|
1010
1021
|
...STUDIO,
|
|
1022
|
+
...STARK,
|
|
1011
1023
|
};
|
|
1012
1024
|
|
|
1013
1025
|
/** Whether a kind is one of the drawn looks. */
|
package/src/looks/kit.d.ts
CHANGED
|
@@ -70,3 +70,11 @@ export declare const pickOf: (c: LookCtx) => <T>(xs: readonly T[]) => T;
|
|
|
70
70
|
* its optical size, capped here (a background can't read `--mk-scale`): no taller than the 448 fit, so it stays clear of
|
|
71
71
|
* the name under it. */
|
|
72
72
|
export declare function markUrl(paths: string, fill: string): string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* A name's width in ems, set in Michroma capitals (the terminal's and the brutal poster's names are sized to their
|
|
76
|
+
* measure from this).
|
|
77
|
+
*
|
|
78
|
+
* @param name The name.
|
|
79
|
+
*/
|
|
80
|
+
export declare function wideEms(name: string): number;
|
package/src/looks/kit.js
CHANGED
|
@@ -52,3 +52,19 @@ export function markUrl(paths, fill) {
|
|
|
52
52
|
const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 500" preserveAspectRatio="none"><g fill="${fill}" transform="translate(200 250) scale(${(0.4844 * k).toFixed(4)}) translate(-256 -256)">${paths}</g></svg>`;
|
|
53
53
|
return `url('data:image/svg+xml,${encodeURIComponent(svg)}')`;
|
|
54
54
|
}
|
|
55
|
+
|
|
56
|
+
/** Michroma's capitals, in ems (measured): most are about 1, M and W far wider, I a sliver. */
|
|
57
|
+
const WIDE = { M: 1.37, W: 1.63, N: 1.13, I: 0.28, ' ': 0.28, E: 0.88, F: 0.84, J: 0.84, L: 0.81, T: 0.94, '&': 1.19, '-': 0.5 };
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* A name's width in ems, set in Michroma capitals (the terminal's name is sized to its measure from this; a count of
|
|
61
|
+
* letters cut MANSARD off at the card's edge).
|
|
62
|
+
*
|
|
63
|
+
* @param name The name.
|
|
64
|
+
*/
|
|
65
|
+
export function wideEms(name) {
|
|
66
|
+
let w = 0;
|
|
67
|
+
for (const ch of name.toUpperCase()) w += WIDE[ch] ?? 1.04;
|
|
68
|
+
return Math.max(4, +w.toFixed(2));
|
|
69
|
+
}
|
|
70
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module @logomarks/lookbook/looks/stark
|
|
3
|
+
*
|
|
4
|
+
* The Lookbook's stark set (2026-11-28): brutal (a Swiss poster on the brutalist concrete photos, the name in wide
|
|
5
|
+
* capitals the full measure) and sortglitch (a pixel-sorted portrait, the name cut into level slices pushed aside).
|
|
6
|
+
*/
|
|
7
|
+
import { type LookCtx, type LookOut } from './kit.js';
|
|
8
|
+
/**
|
|
9
|
+
* A name's slices for the glitch card, as `<i>` copies drawn from `data-t` by CSS.
|
|
10
|
+
*
|
|
11
|
+
* @param spec `y0,y1,dx,ink;…` (percent, percent, hundredths of an em, 1 for the accent).
|
|
12
|
+
* @param text The name.
|
|
13
|
+
*/
|
|
14
|
+
export declare function slices(spec: string, text: string): string;
|
|
15
|
+
/** The stark set's looks. */
|
|
16
|
+
export declare const STARK: {
|
|
17
|
+
brutal: (c: LookCtx) => LookOut;
|
|
18
|
+
sortglitch: (c: LookCtx) => LookOut;
|
|
19
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module @logomarks/lookbook/looks/stark
|
|
3
|
+
*
|
|
4
|
+
* The Lookbook's stark set (2026-11-28; the owner's new Dropbox graphics, "all three"): brutal and sortglitch, each on
|
|
5
|
+
* one of the new photo series. Same rules as ./index.js (pure HTML strings from the card's seeded random, per-card values
|
|
6
|
+
* as custom properties in `style`, ids under the card's uid, motion in CSS only and only while `is-live`, the still
|
|
7
|
+
* styles the final frame); each look's styles are a block at the end of wall-looks.css.
|
|
8
|
+
*
|
|
9
|
+
* - brutal: a Swiss poster on the brutalist concrete photos (`brutal-*`, the glass set): the photo dark and grey, the
|
|
10
|
+
* mark big in white top left, the name the full measure in a wide face (Michroma, sized from its width like the
|
|
11
|
+
* terminal's), hairlines and small words. Still.
|
|
12
|
+
* - sortglitch: a pixel-sorted portrait (`pixelsort-*`, the photos), the mark clean in white, the name under it cut into
|
|
13
|
+
* level slices pushed sideways like the photo's sort bands; while live the slices jump now and then and settle back.
|
|
14
|
+
* The slices are copies of the name drawn by `::before` from `data-t` (so the name's text is still one word, for the
|
|
15
|
+
* toolbar and screen readers); `slices()` draws them again for a name typed in the toolbar (`refit`).
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { escapeHtml } from '@arraypress/text';
|
|
19
|
+
import { def, meta, mk, pad2, pickOf, wideEms } from './kit.js';
|
|
20
|
+
import { sansEms } from './studio.js';
|
|
21
|
+
|
|
22
|
+
/** The brutalist concrete photos, among the glass backgrounds. */
|
|
23
|
+
const BRUTAL = /\/brutal-\d+\.webp$/;
|
|
24
|
+
/** The pixel-sorted portraits, among the photos. */
|
|
25
|
+
const PIXELSORT = /\/pixelsort-\d+\.webp$/;
|
|
26
|
+
|
|
27
|
+
/** The made-up brand's web address. */
|
|
28
|
+
const host = (c) => `www.${c.name.toLowerCase().replace(/[^a-z0-9]/g, '')}${c.tld}`;
|
|
29
|
+
|
|
30
|
+
/** brutal: the concrete photo in grey, darkened so white reads on it; the mark big top left; the name in wide capitals
|
|
31
|
+
* the full measure at the foot over a hairline, the trade and the address under it, two small words in the top corners. */
|
|
32
|
+
function brutal(c) {
|
|
33
|
+
const no = pad2(1 + Math.floor(c.r() * 48));
|
|
34
|
+
return {
|
|
35
|
+
style: ';--bg:#111;--fg:#fff',
|
|
36
|
+
attrs: '',
|
|
37
|
+
inner:
|
|
38
|
+
`<svg class="wx-def" aria-hidden="true"><defs>${def(c)}</defs></svg>` +
|
|
39
|
+
`<img src="${c.glass(BRUTAL)}" alt="" loading="lazy" decoding="async" />` +
|
|
40
|
+
`<svg class="wx-art wx-brmark" viewBox="0 0 512 512" aria-hidden="true">${mk(`<use href="#${c.uid}-m" />`)}</svg>` +
|
|
41
|
+
`<span class="wx-brname"><b class="wc-name" data-fit="wide" style="--chars:${wideEms(c.name)}">${escapeHtml(c.name)}</b></span>` +
|
|
42
|
+
`<span class="wx-brfoot"><i>${escapeHtml(c.line)}</i><i>${escapeHtml(host(c))}</i></span>` +
|
|
43
|
+
meta('tr', `Nº ${no}`),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* A name's slices for the glitch card: level bands down it, each pushed sideways (`--dx`, hundredths of an em), one now
|
|
49
|
+
* and then in the accent, as `<i>` copies drawn from `data-t` by CSS. The spec (`data-slices` on the name) keeps the cuts
|
|
50
|
+
* so the toolbar's name is cut the same way.
|
|
51
|
+
*
|
|
52
|
+
* @param spec `y0,y1,dx,ink;…` (percent, percent, hundredths of an em, 1 for the accent).
|
|
53
|
+
* @param text The name.
|
|
54
|
+
*/
|
|
55
|
+
export function slices(spec, text) {
|
|
56
|
+
const t = escapeHtml(text);
|
|
57
|
+
return spec
|
|
58
|
+
.split(';')
|
|
59
|
+
.filter(Boolean)
|
|
60
|
+
.map((s, k) => {
|
|
61
|
+
const [y0, y1, dx, ink] = s.split(',').map(Number);
|
|
62
|
+
return `<i class="wx-sgs${ink ? ' is-ink' : ''}" data-t="${t}" aria-hidden="true" style="--y0:${y0}%;--y1:${y1}%;--dx:${dx};--k:${k}"></i>`;
|
|
63
|
+
})
|
|
64
|
+
.join('');
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** A seeded cut of the name into four or five bands: one pushed well aside (a sort band), one or two nudged, the rest
|
|
68
|
+
* where they are, so the name still reads at a glance; one band in the accent. */
|
|
69
|
+
function cut(r) {
|
|
70
|
+
const n = 4 + Math.floor(r() * 2);
|
|
71
|
+
const ys = [0];
|
|
72
|
+
for (let k = 1; k < n; k++) ys.push(Math.round((k / n) * 100 + (r() - 0.5) * (50 / n)));
|
|
73
|
+
ys.push(100);
|
|
74
|
+
// the big push is never the top or bottom band (a cut through the middle of the letters reads as a glitch; a lip
|
|
75
|
+
// pushed off the top or the foot reads as a misprint)
|
|
76
|
+
const big = 1 + Math.floor(r() * (n - 2));
|
|
77
|
+
const ink = Math.floor(r() * n);
|
|
78
|
+
return ys
|
|
79
|
+
.slice(0, -1)
|
|
80
|
+
.map((y0, k) => {
|
|
81
|
+
const side = r() < 0.5 ? -1 : 1;
|
|
82
|
+
const dx = k === big ? side * (5 + Math.round(r() * 3)) : r() < 0.6 ? 0 : side * (1 + Math.round(r() * 1));
|
|
83
|
+
return `${y0},${ys[k + 1]},${dx},${k === ink ? 1 : 0}`;
|
|
84
|
+
})
|
|
85
|
+
.join(';');
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** sortglitch: a pixel-sorted portrait, a little darker at the foot; the mark clean in white; the name under it cut
|
|
89
|
+
* into level slices pushed aside (one in the accent), jumping now and then while live; a line of copy, a corner word. */
|
|
90
|
+
function sortglitch(c) {
|
|
91
|
+
const spec = cut(c.r);
|
|
92
|
+
const pick = pickOf(c);
|
|
93
|
+
const ink = pick([c.accent, '#ff2e88', '#5ce1ff', '#ff5a1f']);
|
|
94
|
+
return {
|
|
95
|
+
style: `;--bg:#0b0b0c;--fg:#fff;--gl:${ink};--d:-${(c.r() * 4).toFixed(2)}s`,
|
|
96
|
+
attrs: '',
|
|
97
|
+
inner:
|
|
98
|
+
`<svg class="wx-def" aria-hidden="true"><defs>${def(c)}</defs></svg>` +
|
|
99
|
+
`<img src="${c.photo(PIXELSORT)}" alt="" loading="lazy" decoding="async" />` +
|
|
100
|
+
`<svg class="wx-art wx-sgmark" viewBox="0 0 512 512" aria-hidden="true">${mk(`<use href="#${c.uid}-m" />`)}</svg>` +
|
|
101
|
+
`<span class="wx-sgword"><b class="wc-name" data-slices="${spec}" style="${c.type};--chars:${sansEms(c.name.toUpperCase())}">${escapeHtml(c.name)}${slices(spec, c.name)}</b><i>${escapeHtml(c.line)}</i></span>` +
|
|
102
|
+
meta('tl', `SORT/${pad2(1 + Math.floor(c.r() * 99))}`),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export const STARK = { brutal, sortglitch };
|
|
@@ -4898,3 +4898,191 @@
|
|
|
4898
4898
|
.has-ink .wc-overprint {
|
|
4899
4899
|
--b: var(--lb-ink) !important;
|
|
4900
4900
|
}
|
|
4901
|
+
|
|
4902
|
+
/* ---------- the stark set (../looks/stark.js), on the 2026-11-28 photos ---------- */
|
|
4903
|
+
|
|
4904
|
+
/* brutal: a Swiss poster on the brutalist concrete photos: the photo grey and dark, the mark big in white top left (it
|
|
4905
|
+
grows right and down, away from the edges), the name in wide capitals the full measure over a hairline (Michroma,
|
|
4906
|
+
sized from its width, `--chars`: wideEms), the trade and the address under it, an issue number top right. Still. */
|
|
4907
|
+
.wc-brutal {
|
|
4908
|
+
--mk-o: 32px 32px;
|
|
4909
|
+
--mk-max: 1.2;
|
|
4910
|
+
color: #fff;
|
|
4911
|
+
}
|
|
4912
|
+
|
|
4913
|
+
.wc-brutal > img {
|
|
4914
|
+
filter: grayscale(1) contrast(1.2) brightness(0.56);
|
|
4915
|
+
}
|
|
4916
|
+
|
|
4917
|
+
.wc-brutal::after {
|
|
4918
|
+
content: '';
|
|
4919
|
+
position: absolute;
|
|
4920
|
+
inset: 0;
|
|
4921
|
+
z-index: -1;
|
|
4922
|
+
background: linear-gradient(180deg, rgb(0 0 0 / 0.32), transparent 34%, transparent 52%, rgb(0 0 0 / 0.62));
|
|
4923
|
+
}
|
|
4924
|
+
|
|
4925
|
+
.wc-brutal .wx-brmark {
|
|
4926
|
+
inset: 9% auto auto 7%;
|
|
4927
|
+
width: 40%;
|
|
4928
|
+
height: auto;
|
|
4929
|
+
aspect-ratio: 1;
|
|
4930
|
+
fill: #fff;
|
|
4931
|
+
}
|
|
4932
|
+
|
|
4933
|
+
.wx-brname {
|
|
4934
|
+
position: absolute;
|
|
4935
|
+
right: 7%;
|
|
4936
|
+
bottom: 15%;
|
|
4937
|
+
left: 7%;
|
|
4938
|
+
z-index: 2;
|
|
4939
|
+
padding-top: 0.6em;
|
|
4940
|
+
border-top: 1px solid rgb(255 255 255 / 0.6);
|
|
4941
|
+
container-type: inline-size;
|
|
4942
|
+
}
|
|
4943
|
+
|
|
4944
|
+
.wx .wx-brname b {
|
|
4945
|
+
display: block;
|
|
4946
|
+
font-family: 'Michroma', sans-serif;
|
|
4947
|
+
font-size: min(3.4em, calc(100cqi / var(--chars) / 1.02));
|
|
4948
|
+
font-weight: 400;
|
|
4949
|
+
letter-spacing: 0;
|
|
4950
|
+
line-height: 1;
|
|
4951
|
+
text-transform: uppercase;
|
|
4952
|
+
}
|
|
4953
|
+
|
|
4954
|
+
.wx-brfoot {
|
|
4955
|
+
position: absolute;
|
|
4956
|
+
right: 7%;
|
|
4957
|
+
bottom: 7%;
|
|
4958
|
+
left: 7%;
|
|
4959
|
+
z-index: 2;
|
|
4960
|
+
display: flex;
|
|
4961
|
+
justify-content: space-between;
|
|
4962
|
+
gap: 1em;
|
|
4963
|
+
font-family: 'JetBrains Mono Variable', ui-monospace, monospace;
|
|
4964
|
+
font-size: 0.58em;
|
|
4965
|
+
font-weight: 500;
|
|
4966
|
+
letter-spacing: 0.06em;
|
|
4967
|
+
text-transform: uppercase;
|
|
4968
|
+
white-space: nowrap;
|
|
4969
|
+
opacity: 0.8;
|
|
4970
|
+
}
|
|
4971
|
+
|
|
4972
|
+
/* sortglitch: a pixel-sorted portrait, darker at the foot; the mark clean in white; the name cut into level slices
|
|
4973
|
+
pushed aside like the photo's sort bands (copies drawn from data-t by ::before, each clipped to its band; one in the
|
|
4974
|
+
accent), the name's own text clear under them for its measure and for screen readers. While live the slices jump
|
|
4975
|
+
twice and settle back to where the still shows them. */
|
|
4976
|
+
.wc-sortglitch {
|
|
4977
|
+
--mk-max: 1.2;
|
|
4978
|
+
color: #fff;
|
|
4979
|
+
}
|
|
4980
|
+
|
|
4981
|
+
.wc-sortglitch > img {
|
|
4982
|
+
filter: brightness(0.86) contrast(1.06);
|
|
4983
|
+
}
|
|
4984
|
+
|
|
4985
|
+
.wc-sortglitch::after {
|
|
4986
|
+
content: '';
|
|
4987
|
+
position: absolute;
|
|
4988
|
+
inset: 0;
|
|
4989
|
+
z-index: -1;
|
|
4990
|
+
background: linear-gradient(180deg, transparent 45%, rgb(0 0 0 / 0.66));
|
|
4991
|
+
}
|
|
4992
|
+
|
|
4993
|
+
.wc-sortglitch .wx-sgmark {
|
|
4994
|
+
inset: 11% auto auto 50%;
|
|
4995
|
+
width: 44%;
|
|
4996
|
+
height: auto;
|
|
4997
|
+
aspect-ratio: 1;
|
|
4998
|
+
fill: #fff;
|
|
4999
|
+
translate: -50% 0;
|
|
5000
|
+
filter: drop-shadow(0 6px 24px rgb(0 0 0 / 0.35));
|
|
5001
|
+
}
|
|
5002
|
+
|
|
5003
|
+
.wx-sgword {
|
|
5004
|
+
position: absolute;
|
|
5005
|
+
right: 6%;
|
|
5006
|
+
bottom: 8%;
|
|
5007
|
+
left: 6%;
|
|
5008
|
+
z-index: 2;
|
|
5009
|
+
display: grid;
|
|
5010
|
+
justify-items: center;
|
|
5011
|
+
gap: 0.55em;
|
|
5012
|
+
text-align: center;
|
|
5013
|
+
container-type: inline-size;
|
|
5014
|
+
}
|
|
5015
|
+
|
|
5016
|
+
.wx .wx-sgword b {
|
|
5017
|
+
position: relative;
|
|
5018
|
+
display: inline-block;
|
|
5019
|
+
font-size: min(4.2em, calc(88cqi / var(--chars)));
|
|
5020
|
+
line-height: 1;
|
|
5021
|
+
color: transparent;
|
|
5022
|
+
}
|
|
5023
|
+
|
|
5024
|
+
.wx-sgs {
|
|
5025
|
+
position: absolute;
|
|
5026
|
+
inset: 0;
|
|
5027
|
+
color: #fff;
|
|
5028
|
+
text-align: left;
|
|
5029
|
+
clip-path: inset(var(--y0) 0 calc(100% - var(--y1)) 0);
|
|
5030
|
+
transform: translateX(calc(var(--dx) * 0.01em));
|
|
5031
|
+
pointer-events: none;
|
|
5032
|
+
}
|
|
5033
|
+
|
|
5034
|
+
.wx-sgs::before {
|
|
5035
|
+
content: attr(data-t);
|
|
5036
|
+
}
|
|
5037
|
+
|
|
5038
|
+
.wx-sgs.is-ink {
|
|
5039
|
+
color: var(--gl);
|
|
5040
|
+
}
|
|
5041
|
+
|
|
5042
|
+
.wx-sgword > i {
|
|
5043
|
+
font-family: 'JetBrains Mono Variable', ui-monospace, monospace;
|
|
5044
|
+
font-size: 0.6em;
|
|
5045
|
+
font-weight: 500;
|
|
5046
|
+
letter-spacing: 0.08em;
|
|
5047
|
+
text-transform: uppercase;
|
|
5048
|
+
opacity: 0.8;
|
|
5049
|
+
}
|
|
5050
|
+
|
|
5051
|
+
.wc-sortglitch.is-live .wx-sgs {
|
|
5052
|
+
animation: wx-sg 5s steps(1) infinite;
|
|
5053
|
+
animation-delay: calc(var(--d, 0s) - var(--k) * 0.07s);
|
|
5054
|
+
}
|
|
5055
|
+
|
|
5056
|
+
@keyframes wx-sg {
|
|
5057
|
+
0%,
|
|
5058
|
+
60%,
|
|
5059
|
+
68%,
|
|
5060
|
+
80%,
|
|
5061
|
+
100% {
|
|
5062
|
+
transform: translateX(calc(var(--dx) * 0.01em));
|
|
5063
|
+
}
|
|
5064
|
+
62% {
|
|
5065
|
+
transform: translateX(calc(var(--dx) * -0.03em + 0.05em));
|
|
5066
|
+
}
|
|
5067
|
+
64% {
|
|
5068
|
+
transform: translateX(calc(var(--dx) * 0.025em - 0.04em));
|
|
5069
|
+
}
|
|
5070
|
+
66% {
|
|
5071
|
+
transform: translateX(calc(var(--dx) * 0.02em));
|
|
5072
|
+
}
|
|
5073
|
+
82% {
|
|
5074
|
+
transform: translateX(calc(var(--dx) * -0.02em - 0.02em));
|
|
5075
|
+
}
|
|
5076
|
+
84% {
|
|
5077
|
+
transform: translateX(calc(var(--dx) * 0.015em + 0.03em));
|
|
5078
|
+
}
|
|
5079
|
+
86% {
|
|
5080
|
+
transform: translateX(calc(var(--dx) * 0.01em));
|
|
5081
|
+
}
|
|
5082
|
+
}
|
|
5083
|
+
|
|
5084
|
+
@media (prefers-reduced-motion: reduce) {
|
|
5085
|
+
.wc-sortglitch .wx-sgs {
|
|
5086
|
+
animation: none !important;
|
|
5087
|
+
}
|
|
5088
|
+
}
|
package/src/styles/wall.css
CHANGED
|
@@ -513,7 +513,9 @@
|
|
|
513
513
|
right: 0.7rem;
|
|
514
514
|
padding: 0.3rem 0.65rem;
|
|
515
515
|
border-radius: 99px;
|
|
516
|
-
|
|
516
|
+
/* solid: a see-through pill let the card's own corner words show through it (the owner, 2026-11-26: "it bleeds") */
|
|
517
|
+
background: rgb(10 10 12);
|
|
518
|
+
box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08);
|
|
517
519
|
color: #fff;
|
|
518
520
|
font-size: 0.72rem;
|
|
519
521
|
font-weight: 600;
|
|
@@ -522,8 +524,17 @@
|
|
|
522
524
|
transition:
|
|
523
525
|
opacity 0.2s,
|
|
524
526
|
transform 0.2s;
|
|
525
|
-
|
|
526
|
-
|
|
527
|
+
z-index: 3;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/* the look's own top-right corner words step aside while the name is shown there */
|
|
531
|
+
.wx-meta.is-tr {
|
|
532
|
+
transition: opacity 0.2s;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.wc:hover .wx-meta.is-tr,
|
|
536
|
+
.wc:focus-visible .wx-meta.is-tr {
|
|
537
|
+
opacity: 0;
|
|
527
538
|
}
|
|
528
539
|
|
|
529
540
|
.wc-tag em {
|
|
@@ -542,6 +553,11 @@
|
|
|
542
553
|
opacity: 1;
|
|
543
554
|
transform: none;
|
|
544
555
|
}
|
|
556
|
+
|
|
557
|
+
/* on touch the name is always there, so the top-right corner words never show */
|
|
558
|
+
.wx-meta.is-tr {
|
|
559
|
+
display: none;
|
|
560
|
+
}
|
|
545
561
|
}
|
|
546
562
|
|
|
547
563
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -777,6 +793,21 @@
|
|
|
777
793
|
color: var(--fg);
|
|
778
794
|
}
|
|
779
795
|
|
|
796
|
+
/* glass cards (../glass.js): the mark itself drawn in glass by an effects-library effect, the name under it. The still
|
|
797
|
+
mark (.wc-gm) is laid exactly where the effect draws the mark, under the canvas, which fades in over it */
|
|
798
|
+
.wc-gm {
|
|
799
|
+
position: absolute;
|
|
800
|
+
z-index: -1;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
.wc-glass .wc-gfoot {
|
|
804
|
+
position: absolute;
|
|
805
|
+
right: 0;
|
|
806
|
+
bottom: 8%;
|
|
807
|
+
left: 0;
|
|
808
|
+
align-items: center;
|
|
809
|
+
}
|
|
810
|
+
|
|
780
811
|
/* smoke in the sponsor cards (the page's script): behind the words */
|
|
781
812
|
.wc-smoke {
|
|
782
813
|
position: absolute;
|
package/src/wall.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { type LookKind } from './looks/index.js';
|
|
10
10
|
import { type FieldKind } from './fields.js';
|
|
11
|
+
import { type GlassKind } from './glass.js';
|
|
11
12
|
/** The one accent: acid lime. Every lime the looks print is this, unless `lookbook({ accent })` says otherwise. */
|
|
12
13
|
export declare const ACCENT = '#C8FF00';
|
|
13
14
|
/** A mark as the wall needs it: its outline (its paths' markup on the 512 canvas), what the brand picker reads (subject,
|
|
@@ -48,6 +49,7 @@ export type Kind =
|
|
|
48
49
|
| 'gradient'
|
|
49
50
|
| 'shader'
|
|
50
51
|
| FieldKind
|
|
52
|
+
| GlassKind
|
|
51
53
|
| LookKind;
|
|
52
54
|
/** A card's made-up brand: its name, its line ("Coffee Co."), a tagline and a web address ending, from one sector. */
|
|
53
55
|
export type Brand = {
|