@mccaskie-labs/workbench-site 0.15.3 → 0.16.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 +6 -0
- package/dist/hero-starts.d.ts +40 -0
- package/dist/hero-starts.js +986 -0
- package/dist/hero-styles.d.ts +473 -0
- package/dist/hero-styles.js +173 -0
- package/dist/hero.d.ts +220 -0
- package/dist/hero.js +173 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/samples.js +15 -0
- package/dist/sections.d.ts +3 -0
- package/dist/sections.js +3 -0
- package/dist/styles.d.ts +14 -0
- package/dist/styles.js +5 -1
- package/package.json +1 -1
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
interface Rule {
|
|
2
|
+
selector: string;
|
|
3
|
+
about: string;
|
|
4
|
+
css: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const HERO_VARIABLES: readonly [{
|
|
7
|
+
readonly name: "--wb-site-hero-height";
|
|
8
|
+
readonly value: "clamp(24rem, 72svh, 44rem)";
|
|
9
|
+
readonly about: "The hero's height (set by Height: short, medium, tall, full screen, or an exact height)";
|
|
10
|
+
}, {
|
|
11
|
+
readonly name: "--wb-site-hero-focal";
|
|
12
|
+
readonly value: "50% 50%";
|
|
13
|
+
readonly about: "The point of the picture that always shows (the focal point)";
|
|
14
|
+
}, {
|
|
15
|
+
readonly name: "--wb-site-hero-phone-focal";
|
|
16
|
+
readonly value: "50% 50%";
|
|
17
|
+
readonly about: "The point of the picture that always shows on phones";
|
|
18
|
+
}, {
|
|
19
|
+
readonly name: "--wb-site-hero-zoom";
|
|
20
|
+
readonly value: "1";
|
|
21
|
+
readonly about: "How far the picture is zoomed in, 1 to 1.5";
|
|
22
|
+
}, {
|
|
23
|
+
readonly name: "--wb-site-hero-shade";
|
|
24
|
+
readonly value: "rgb(0 0 0 / .45)";
|
|
25
|
+
readonly about: "The shade over the picture that makes words easier to read";
|
|
26
|
+
}, {
|
|
27
|
+
readonly name: "--wb-site-hero-ink";
|
|
28
|
+
readonly value: "var(--wb-site-text)";
|
|
29
|
+
readonly about: "The hero's words' colour (white over a dark shade)";
|
|
30
|
+
}, {
|
|
31
|
+
readonly name: "--wb-site-hero-on-picture";
|
|
32
|
+
readonly value: "#ffffff";
|
|
33
|
+
readonly about: "Words over a dark or brand-coloured shade";
|
|
34
|
+
}];
|
|
35
|
+
/** The hero section and its parts. */
|
|
36
|
+
export declare const HERO_CLASSES: readonly [{
|
|
37
|
+
readonly name: "wb-site-hero-designed";
|
|
38
|
+
readonly element: "section";
|
|
39
|
+
readonly about: "The top of a page in one of the hero designs (data-design and the other data-* settings)";
|
|
40
|
+
readonly css: `position:relative;isolation:isolate;box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);gap:calc(${string} * 1.5);margin:0 0 ${string};padding:calc(${string} * 2) 0;color:${string}`;
|
|
41
|
+
readonly states: readonly [Rule, Rule, Rule, Rule, {
|
|
42
|
+
readonly selector: `[data-width="edge"]`;
|
|
43
|
+
readonly about: "Edge to edge: the hero runs the screen's full width, its words still in line with the page";
|
|
44
|
+
readonly css: `width:100vw;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);padding-left:max(${string}, calc((100vw - ${string}) / 2));padding-right:max(${string}, calc((100vw - ${string}) / 2))`;
|
|
45
|
+
}, {
|
|
46
|
+
readonly selector: `[data-over="yes"]`;
|
|
47
|
+
readonly about: "Words over the picture";
|
|
48
|
+
readonly css: `min-height:${string};padding-top:calc(${string} * 2);padding-bottom:calc(${string} * 2);overflow:hidden;border-radius:${string}`;
|
|
49
|
+
}, {
|
|
50
|
+
readonly selector: `[data-over="yes"][data-width="page"]`;
|
|
51
|
+
readonly about: "Words over the picture, page width: space at the sides";
|
|
52
|
+
readonly css: `padding-left:calc(${string} * 1.5);padding-right:calc(${string} * 1.5)`;
|
|
53
|
+
}, {
|
|
54
|
+
readonly selector: `[data-over="yes"][data-width="edge"]`;
|
|
55
|
+
readonly about: "Edge to edge: square corners";
|
|
56
|
+
readonly css: "border-radius:0";
|
|
57
|
+
}, {
|
|
58
|
+
readonly selector: `[data-over="yes"] .wb-site-hero-media`;
|
|
59
|
+
readonly about: "The picture behind the words";
|
|
60
|
+
readonly css: "position:absolute;inset:0;z-index:-1;border-radius:0";
|
|
61
|
+
}, Rule, Rule, Rule, Rule, Rule, Rule, {
|
|
62
|
+
readonly selector: `[data-shade="none"] .wb-site-hero-shade`;
|
|
63
|
+
readonly about: "No shade";
|
|
64
|
+
readonly css: "display:none";
|
|
65
|
+
}, {
|
|
66
|
+
readonly selector: `[data-shade="panel"] .wb-site-hero-shade`;
|
|
67
|
+
readonly about: "A panel behind the words instead of a shade";
|
|
68
|
+
readonly css: "display:none";
|
|
69
|
+
}, {
|
|
70
|
+
readonly selector: `[data-shade-from="bottom"] .wb-site-hero-shade`;
|
|
71
|
+
readonly about: "Shade rising from the bottom";
|
|
72
|
+
readonly css: `background:linear-gradient(to top, ${string} 0%, ${string} 30%, transparent 90%)`;
|
|
73
|
+
}, {
|
|
74
|
+
readonly selector: `[data-shade-from="even"] .wb-site-hero-shade`;
|
|
75
|
+
readonly about: "An even shade over the whole picture";
|
|
76
|
+
readonly css: `background:${string}`;
|
|
77
|
+
}, {
|
|
78
|
+
readonly selector: `[data-over="yes"][data-panel="solid"]`;
|
|
79
|
+
readonly about: "Words on a solid panel: the page's own text colour";
|
|
80
|
+
readonly css: `--wb-site-hero-ink:${string}`;
|
|
81
|
+
}, {
|
|
82
|
+
readonly selector: `[data-over="yes"][data-panel="frosted"]`;
|
|
83
|
+
readonly about: "Words on a frosted panel: the page's own text colour";
|
|
84
|
+
readonly css: `--wb-site-hero-ink:${string}`;
|
|
85
|
+
}, {
|
|
86
|
+
readonly selector: `[data-over="yes"][data-phone-height="shorter"]`;
|
|
87
|
+
readonly about: "Phones: a shorter hero";
|
|
88
|
+
readonly css: `min-height:min(${string}, 60svh)`;
|
|
89
|
+
}, {
|
|
90
|
+
readonly selector: `[data-over="yes"][data-phone-height="fit"]`;
|
|
91
|
+
readonly about: "Phones: just tall enough for the words";
|
|
92
|
+
readonly css: "min-height:0";
|
|
93
|
+
}, {
|
|
94
|
+
readonly selector: `[data-over="yes"][data-phone-under="yes"]`;
|
|
95
|
+
readonly about: "Phones: the words under the picture";
|
|
96
|
+
readonly css: "min-height:0;padding-top:0;padding-bottom:0;overflow:visible;border-radius:0";
|
|
97
|
+
}, {
|
|
98
|
+
readonly selector: `[data-over="yes"][data-phone-under="yes"] .wb-site-hero-media`;
|
|
99
|
+
readonly about: "Phones: the picture above the words";
|
|
100
|
+
readonly css: `position:relative;z-index:0;height:clamp(14rem, 50svh, 24rem);border-radius:${string}`;
|
|
101
|
+
}, {
|
|
102
|
+
readonly selector: `[data-over="yes"][data-phone-under="yes"] .wb-site-hero-shade`;
|
|
103
|
+
readonly about: "Phones: no shade when the words are under the picture";
|
|
104
|
+
readonly css: "visibility:hidden";
|
|
105
|
+
}, {
|
|
106
|
+
readonly selector: `[data-over="yes"][data-phone-under="yes"] .wb-site-hero-words`;
|
|
107
|
+
readonly about: "Phones: the words in the page's own colour";
|
|
108
|
+
readonly css: `color:${string}`;
|
|
109
|
+
}, {
|
|
110
|
+
readonly selector: `[data-over="no"] .wb-site-hero-media`;
|
|
111
|
+
readonly about: "Phones: the picture above the words";
|
|
112
|
+
readonly css: "height:clamp(14rem, 50svh, 24rem)";
|
|
113
|
+
}, Rule, Rule, Rule, {
|
|
114
|
+
readonly selector: `[data-place$="-centre"] .wb-site-hero-words`;
|
|
115
|
+
readonly about: "Words in the centre";
|
|
116
|
+
readonly css: "justify-self:center;text-align:center";
|
|
117
|
+
}, {
|
|
118
|
+
readonly selector: `[data-place$="-right"] .wb-site-hero-words`;
|
|
119
|
+
readonly about: "Words on the right";
|
|
120
|
+
readonly css: "justify-self:end;text-align:right";
|
|
121
|
+
}, {
|
|
122
|
+
readonly selector: `[data-place$="-centre"] .wb-site-actions`;
|
|
123
|
+
readonly about: "Buttons in the centre";
|
|
124
|
+
readonly css: "justify-content:center";
|
|
125
|
+
}, {
|
|
126
|
+
readonly selector: `[data-place$="-right"] .wb-site-actions`;
|
|
127
|
+
readonly about: "Buttons on the right";
|
|
128
|
+
readonly css: "justify-content:flex-end";
|
|
129
|
+
}, {
|
|
130
|
+
readonly selector: ` .wb-site-hero-words`;
|
|
131
|
+
readonly about: "The hero's words in the hero's colour";
|
|
132
|
+
readonly css: `color:${string}`;
|
|
133
|
+
}, {
|
|
134
|
+
readonly selector: `[data-words-width="narrow"] .wb-site-hero-words`;
|
|
135
|
+
readonly about: "Words width: narrow";
|
|
136
|
+
readonly css: "max-width:26rem";
|
|
137
|
+
}, {
|
|
138
|
+
readonly selector: `[data-words-width="medium"] .wb-site-hero-words`;
|
|
139
|
+
readonly about: "Words width: medium";
|
|
140
|
+
readonly css: "max-width:36rem";
|
|
141
|
+
}, {
|
|
142
|
+
readonly selector: `[data-words-width="wide"] .wb-site-hero-words`;
|
|
143
|
+
readonly about: "Words width: wide";
|
|
144
|
+
readonly css: "max-width:50rem";
|
|
145
|
+
}, {
|
|
146
|
+
readonly selector: `[data-panel="solid"] .wb-site-hero-words`;
|
|
147
|
+
readonly about: "Words on a solid panel";
|
|
148
|
+
readonly css: `padding:calc(${string} * 1.5);border-radius:${string};background:${string};box-shadow:0 8px 28px rgb(0 0 0 / .14)`;
|
|
149
|
+
}, {
|
|
150
|
+
readonly selector: `[data-panel="frosted"] .wb-site-hero-words`;
|
|
151
|
+
readonly about: "Words on a frosted panel";
|
|
152
|
+
readonly css: `padding:calc(${string} * 1.5);border-radius:${string};background:color-mix(in srgb, ${string} 72%, transparent);backdrop-filter:blur(12px)`;
|
|
153
|
+
}, {
|
|
154
|
+
readonly selector: ` .wb-site-hero-heading`;
|
|
155
|
+
readonly about: "The heading, a little bigger than a plain hero's";
|
|
156
|
+
readonly css: "font-size:clamp(2.1rem, 7vw, 3.6rem);line-height:1.08";
|
|
157
|
+
}, {
|
|
158
|
+
readonly selector: ` .wb-site-lead`;
|
|
159
|
+
readonly about: "The line under the heading, in the hero's colour";
|
|
160
|
+
readonly css: "color:inherit;opacity:.88";
|
|
161
|
+
}, {
|
|
162
|
+
readonly selector: ` .wb-site-actions`;
|
|
163
|
+
readonly about: "The buttons, side by side, wrapping on a phone";
|
|
164
|
+
readonly css: "display:flex;flex-wrap:wrap;gap:.6rem";
|
|
165
|
+
}, {
|
|
166
|
+
readonly selector: ` .wb-site-button-quiet`;
|
|
167
|
+
readonly about: "The second button, in the words' colour";
|
|
168
|
+
readonly css: "color:inherit;box-shadow:inset 0 0 0 1px currentColor";
|
|
169
|
+
}, {
|
|
170
|
+
readonly selector: `[data-design="big-words"] .wb-site-hero-heading`;
|
|
171
|
+
readonly about: "Big words: a huge, tight heading";
|
|
172
|
+
readonly css: "font-size:clamp(3rem, 13vw, 7.5rem);line-height:.95;letter-spacing:-.01em";
|
|
173
|
+
}, {
|
|
174
|
+
readonly selector: `[data-design="card-over"]`;
|
|
175
|
+
readonly about: "Card over picture, phones: the picture, then the card over its lower edge";
|
|
176
|
+
readonly css: "min-height:0;padding:0;overflow:visible;border-radius:0";
|
|
177
|
+
}, {
|
|
178
|
+
readonly selector: `[data-design="card-over"] .wb-site-hero-media`;
|
|
179
|
+
readonly about: "Card over picture, phones: the picture";
|
|
180
|
+
readonly css: `position:relative;z-index:0;height:clamp(14rem, 50svh, 24rem);border-radius:${string}`;
|
|
181
|
+
}, {
|
|
182
|
+
readonly selector: `[data-design="card-over"] .wb-site-hero-words`;
|
|
183
|
+
readonly about: "Card over picture, phones: the card";
|
|
184
|
+
readonly css: `margin:calc(${string} * -4) ${string} 0;z-index:1`;
|
|
185
|
+
}, {
|
|
186
|
+
readonly selector: `[data-design="framed"] .wb-site-hero-media`;
|
|
187
|
+
readonly about: "Framed: a frame round the picture";
|
|
188
|
+
readonly css: `padding:calc(${string} * .75);background:${string};box-shadow:0 10px 30px rgb(0 0 0 / .12)`;
|
|
189
|
+
}, {
|
|
190
|
+
readonly selector: `[data-design="framed"] .wb-site-hero-img`;
|
|
191
|
+
readonly about: "Framed: the picture inside its frame";
|
|
192
|
+
readonly css: `border-radius:calc(${string} / 2)`;
|
|
193
|
+
}, {
|
|
194
|
+
readonly selector: `[data-design="shaped"][data-shape="arch"] .wb-site-hero-media`;
|
|
195
|
+
readonly about: "Shaped: an arch";
|
|
196
|
+
readonly css: `border-radius:999px 999px ${string} ${string}`;
|
|
197
|
+
}, {
|
|
198
|
+
readonly selector: `[data-design="shaped"][data-shape="circle"] .wb-site-hero-media`;
|
|
199
|
+
readonly about: "Shaped: a circle";
|
|
200
|
+
readonly css: "justify-self:center;width:min(100%, 24rem);height:auto;aspect-ratio:1;border-radius:50%";
|
|
201
|
+
}, {
|
|
202
|
+
readonly selector: `[data-design="shaped"][data-shape="soft"] .wb-site-hero-media`;
|
|
203
|
+
readonly about: "Shaped: a soft blob";
|
|
204
|
+
readonly css: "border-radius:42% 58% 52% 48% / 48% 42% 58% 52%";
|
|
205
|
+
}, {
|
|
206
|
+
readonly selector: `[data-design="shaped"][data-shape="slant"] .wb-site-hero-media`;
|
|
207
|
+
readonly about: "Shaped: a slanted edge";
|
|
208
|
+
readonly css: "border-radius:0;clip-path:polygon(14% 0, 100% 0, 100% 100%, 0 100%)";
|
|
209
|
+
}, {
|
|
210
|
+
readonly selector: `[data-design="collage"] .wb-site-hero-media`;
|
|
211
|
+
readonly about: "Collage: the photos in a loose grid";
|
|
212
|
+
readonly css: `height:auto;display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:calc(${string} * .75);padding:calc(${string} * .75);overflow:visible`;
|
|
213
|
+
}, {
|
|
214
|
+
readonly selector: `[data-design="collage"][data-pictures="1"] .wb-site-hero-media`;
|
|
215
|
+
readonly about: "Collage with one photo";
|
|
216
|
+
readonly css: "grid-template-columns:minmax(0, 1fr)";
|
|
217
|
+
}, {
|
|
218
|
+
readonly selector: `[data-design="collage"] .wb-site-hero-frame`;
|
|
219
|
+
readonly about: "Collage: each photo, tilted a little";
|
|
220
|
+
readonly css: `aspect-ratio:4 / 5;overflow:hidden;border-radius:${string};box-shadow:0 8px 24px rgb(0 0 0 / .16);transform:rotate(-2.5deg)`;
|
|
221
|
+
}, {
|
|
222
|
+
readonly selector: `[data-design="collage"] .wb-site-hero-frame:nth-child(2)`;
|
|
223
|
+
readonly about: "Collage: the second photo";
|
|
224
|
+
readonly css: "transform:rotate(2.5deg) translateY(1.25rem)";
|
|
225
|
+
}, {
|
|
226
|
+
readonly selector: `[data-design="collage"] .wb-site-hero-frame:nth-child(3)`;
|
|
227
|
+
readonly about: "Collage: the third photo";
|
|
228
|
+
readonly css: "transform:rotate(1.5deg)";
|
|
229
|
+
}, {
|
|
230
|
+
readonly selector: `[data-design="collage"] .wb-site-hero-frame:nth-child(4)`;
|
|
231
|
+
readonly about: "Collage: the fourth photo";
|
|
232
|
+
readonly css: "transform:rotate(-1.5deg) translateY(1.25rem)";
|
|
233
|
+
}, {
|
|
234
|
+
readonly selector: `[data-design="feature-card"] .wb-site-hero-media`;
|
|
235
|
+
readonly about: "Feature card: the picture as a card";
|
|
236
|
+
readonly css: `padding:calc(${string} * .6);background:${string};box-shadow:0 14px 40px rgb(0 0 0 / .16);transform:rotate(-1.5deg)`;
|
|
237
|
+
}, {
|
|
238
|
+
readonly selector: `[data-design="feature-card"] .wb-site-hero-img`;
|
|
239
|
+
readonly about: "Feature card: the picture inside the card";
|
|
240
|
+
readonly css: `border-radius:calc(${string} / 2)`;
|
|
241
|
+
}, {
|
|
242
|
+
readonly selector: `[data-design="overlap"] .wb-site-hero-heading`;
|
|
243
|
+
readonly about: "Overlap: very large words";
|
|
244
|
+
readonly css: "font-size:clamp(2.5rem, 8vw, 5rem);line-height:1";
|
|
245
|
+
}, {
|
|
246
|
+
readonly selector: `[data-design="panorama"] .wb-site-hero-words`;
|
|
247
|
+
readonly about: "Panorama: the words first, centred";
|
|
248
|
+
readonly css: "grid-row:1;justify-self:center;text-align:center";
|
|
249
|
+
}, {
|
|
250
|
+
readonly selector: `[data-design="panorama"] .wb-site-hero-media`;
|
|
251
|
+
readonly about: "Panorama: the long, thin picture under the words";
|
|
252
|
+
readonly css: "grid-row:2;height:clamp(9rem, 42vw, 16rem)";
|
|
253
|
+
}, {
|
|
254
|
+
readonly selector: `[data-design="words-only"]`;
|
|
255
|
+
readonly about: "Words only: the words on a band of colour";
|
|
256
|
+
readonly css: `min-height:${string};padding:calc(${string} * 3) ${string};border-radius:${string};background:${string}`;
|
|
257
|
+
}, {
|
|
258
|
+
readonly selector: `[data-design="words-only"][data-width="edge"]`;
|
|
259
|
+
readonly about: "Words only, edge to edge: square corners";
|
|
260
|
+
readonly css: "border-radius:0";
|
|
261
|
+
}];
|
|
262
|
+
readonly wide: readonly [{
|
|
263
|
+
readonly selector: `[data-over="yes"][data-phone-height]`;
|
|
264
|
+
readonly about: "From 600px: the chosen height, whatever phones use";
|
|
265
|
+
readonly css: `min-height:${string}`;
|
|
266
|
+
}, {
|
|
267
|
+
readonly selector: `[data-over="yes"][data-phone-under="yes"]`;
|
|
268
|
+
readonly about: "From 600px: words back over the picture";
|
|
269
|
+
readonly css: `padding-top:calc(${string} * 2);padding-bottom:calc(${string} * 2);overflow:hidden`;
|
|
270
|
+
}, {
|
|
271
|
+
readonly selector: `[data-over="yes"][data-phone-under="yes"] .wb-site-hero-media`;
|
|
272
|
+
readonly about: "From 600px: the picture back behind the words";
|
|
273
|
+
readonly css: "position:absolute;z-index:-1;height:auto;border-radius:0";
|
|
274
|
+
}, {
|
|
275
|
+
readonly selector: `[data-over="yes"][data-phone-under="yes"] .wb-site-hero-shade`;
|
|
276
|
+
readonly about: "From 600px: the shade back";
|
|
277
|
+
readonly css: "visibility:visible";
|
|
278
|
+
}, {
|
|
279
|
+
readonly selector: `[data-over="yes"][data-phone-under="yes"] .wb-site-hero-words`;
|
|
280
|
+
readonly about: "From 600px: the words in the hero's colour";
|
|
281
|
+
readonly css: `color:${string}`;
|
|
282
|
+
}, {
|
|
283
|
+
readonly selector: `[data-shade-from="side"] .wb-site-hero-shade`;
|
|
284
|
+
readonly about: "From 600px: shade from the words' side";
|
|
285
|
+
readonly css: `background:linear-gradient(to right, ${string} 0%, ${string} 30%, transparent 85%)`;
|
|
286
|
+
}, {
|
|
287
|
+
readonly selector: `[data-shade-from="side"][data-place$="-right"] .wb-site-hero-shade`;
|
|
288
|
+
readonly about: "From 600px: shade from the right, where the words are";
|
|
289
|
+
readonly css: `background:linear-gradient(to left, ${string} 0%, ${string} 30%, transparent 85%)`;
|
|
290
|
+
}, {
|
|
291
|
+
readonly selector: `[data-shade-from="side"][data-place$="-centre"] .wb-site-hero-shade`;
|
|
292
|
+
readonly about: "From 600px: an even shade behind centred words";
|
|
293
|
+
readonly css: `background:${string}`;
|
|
294
|
+
}, {
|
|
295
|
+
readonly selector: "[data-over=\"no\"]:not([data-design=\"panorama\"]):not([data-design=\"words-only\"])";
|
|
296
|
+
readonly about: "From 600px: words and picture side by side";
|
|
297
|
+
readonly css: `grid-template-columns:repeat(2, minmax(0, 1fr));column-gap:calc(${string} * 2.5);min-height:${string}`;
|
|
298
|
+
}, {
|
|
299
|
+
readonly selector: "[data-over=\"no\"]:not([data-design=\"panorama\"]):not([data-design=\"words-only\"]) .wb-site-hero-media";
|
|
300
|
+
readonly about: "From 600px: the picture as tall as the hero";
|
|
301
|
+
readonly css: "grid-row:1;height:auto;min-height:100%";
|
|
302
|
+
}, {
|
|
303
|
+
readonly selector: "[data-over=\"no\"]:not([data-design=\"panorama\"]):not([data-design=\"words-only\"]) .wb-site-hero-words";
|
|
304
|
+
readonly about: "From 600px: the words beside the picture";
|
|
305
|
+
readonly css: "grid-row:1";
|
|
306
|
+
}, {
|
|
307
|
+
readonly selector: "[data-over=\"no\"]:not([data-design=\"panorama\"]):not([data-design=\"words-only\"])[data-side=\"right\"] .wb-site-hero-media";
|
|
308
|
+
readonly about: "Picture on the right";
|
|
309
|
+
readonly css: "grid-column:2";
|
|
310
|
+
}, {
|
|
311
|
+
readonly selector: "[data-over=\"no\"]:not([data-design=\"panorama\"]):not([data-design=\"words-only\"])[data-side=\"right\"] .wb-site-hero-words";
|
|
312
|
+
readonly about: "Words on the left";
|
|
313
|
+
readonly css: "grid-column:1";
|
|
314
|
+
}, {
|
|
315
|
+
readonly selector: "[data-over=\"no\"]:not([data-design=\"panorama\"]):not([data-design=\"words-only\"])[data-side=\"left\"] .wb-site-hero-media";
|
|
316
|
+
readonly about: "Picture on the left";
|
|
317
|
+
readonly css: "grid-column:1";
|
|
318
|
+
}, {
|
|
319
|
+
readonly selector: "[data-over=\"no\"]:not([data-design=\"panorama\"]):not([data-design=\"words-only\"])[data-side=\"left\"] .wb-site-hero-words";
|
|
320
|
+
readonly about: "Words on the right";
|
|
321
|
+
readonly css: "grid-column:2";
|
|
322
|
+
}, {
|
|
323
|
+
readonly selector: "[data-over=\"no\"]:not([data-design=\"panorama\"]):not([data-design=\"words-only\"])[data-split=\"words\"][data-side=\"right\"]";
|
|
324
|
+
readonly about: "Words wider, picture on the right";
|
|
325
|
+
readonly css: "grid-template-columns:minmax(0, 3fr) minmax(0, 2fr)";
|
|
326
|
+
}, {
|
|
327
|
+
readonly selector: "[data-over=\"no\"]:not([data-design=\"panorama\"]):not([data-design=\"words-only\"])[data-split=\"words\"][data-side=\"left\"]";
|
|
328
|
+
readonly about: "Words wider, picture on the left";
|
|
329
|
+
readonly css: "grid-template-columns:minmax(0, 2fr) minmax(0, 3fr)";
|
|
330
|
+
}, {
|
|
331
|
+
readonly selector: "[data-over=\"no\"]:not([data-design=\"panorama\"]):not([data-design=\"words-only\"])[data-split=\"picture\"][data-side=\"right\"]";
|
|
332
|
+
readonly about: "Picture wider, on the right";
|
|
333
|
+
readonly css: "grid-template-columns:minmax(0, 2fr) minmax(0, 3fr)";
|
|
334
|
+
}, {
|
|
335
|
+
readonly selector: "[data-over=\"no\"]:not([data-design=\"panorama\"]):not([data-design=\"words-only\"])[data-split=\"picture\"][data-side=\"left\"]";
|
|
336
|
+
readonly about: "Picture wider, on the left";
|
|
337
|
+
readonly css: "grid-template-columns:minmax(0, 3fr) minmax(0, 2fr)";
|
|
338
|
+
}, {
|
|
339
|
+
readonly selector: "[data-over=\"no\"]:not([data-design=\"panorama\"]):not([data-design=\"words-only\"])[data-design=\"shaped\"][data-shape=\"circle\"] .wb-site-hero-media";
|
|
340
|
+
readonly about: "From 600px: the circle centred beside the words";
|
|
341
|
+
readonly css: "min-height:0;align-self:center";
|
|
342
|
+
}, {
|
|
343
|
+
readonly selector: "[data-over=\"no\"]:not([data-design=\"panorama\"]):not([data-design=\"words-only\"])[data-design=\"collage\"] .wb-site-hero-media";
|
|
344
|
+
readonly about: "From 600px: the collage beside the words";
|
|
345
|
+
readonly css: "min-height:0;align-self:center";
|
|
346
|
+
}, {
|
|
347
|
+
readonly selector: `[data-design="overlap"] .wb-site-hero-media`;
|
|
348
|
+
readonly about: "From 600px: the picture runs down into the next section";
|
|
349
|
+
readonly css: `margin-bottom:calc(${string} * -1.5);z-index:1;box-shadow:0 18px 40px rgb(0 0 0 / .18)`;
|
|
350
|
+
}, {
|
|
351
|
+
readonly selector: `[data-design="panorama"] .wb-site-hero-media`;
|
|
352
|
+
readonly about: "From 600px: a wider, thinner panorama";
|
|
353
|
+
readonly css: "height:clamp(10rem, 24vw, 20rem)";
|
|
354
|
+
}, {
|
|
355
|
+
readonly selector: `[data-design="card-over"]`;
|
|
356
|
+
readonly about: "From 600px: the card over the picture's lower edge";
|
|
357
|
+
readonly css: `min-height:${string};padding-top:calc(${string} * 2);margin-bottom:calc(${string} + ${string} * 4)`;
|
|
358
|
+
}, {
|
|
359
|
+
readonly selector: `[data-design="card-over"] .wb-site-hero-media`;
|
|
360
|
+
readonly about: "From 600px: the picture behind the card";
|
|
361
|
+
readonly css: "position:absolute;inset:0;z-index:-1;height:auto";
|
|
362
|
+
}, {
|
|
363
|
+
readonly selector: `[data-design="card-over"][data-width="edge"]`;
|
|
364
|
+
readonly about: "From 600px, edge to edge: the card in line with the page";
|
|
365
|
+
readonly css: `padding-left:max(${string}, calc((100vw - ${string}) / 2));padding-right:max(${string}, calc((100vw - ${string}) / 2))`;
|
|
366
|
+
}, {
|
|
367
|
+
readonly selector: `[data-design="card-over"][data-width="page"]`;
|
|
368
|
+
readonly about: "From 600px, page width: the card inset from the picture's edge";
|
|
369
|
+
readonly css: `padding-left:calc(${string} * 2);padding-right:calc(${string} * 2)`;
|
|
370
|
+
}, {
|
|
371
|
+
readonly selector: `[data-design="card-over"] .wb-site-hero-words`;
|
|
372
|
+
readonly about: "From 600px: the card, half over the picture";
|
|
373
|
+
readonly css: `margin:0 0 calc(${string} * -4)`;
|
|
374
|
+
}, {
|
|
375
|
+
readonly selector: `[data-design="card-over"][data-width="page"] .wb-site-hero-media`;
|
|
376
|
+
readonly about: "From 600px, page width: the picture's corners";
|
|
377
|
+
readonly css: `border-radius:${string}`;
|
|
378
|
+
}];
|
|
379
|
+
readonly moving: readonly [{
|
|
380
|
+
readonly selector: `[data-motion="slow-zoom"] .wb-site-hero-img`;
|
|
381
|
+
readonly about: "Movement: a slow zoom, once";
|
|
382
|
+
readonly css: "animation:wb-site-hero-zoom 9s ease-out both";
|
|
383
|
+
}, {
|
|
384
|
+
readonly selector: `[data-motion="fade-in"] .wb-site-hero-media`;
|
|
385
|
+
readonly about: "Movement: the picture fades in";
|
|
386
|
+
readonly css: "animation:wb-site-hero-fade .8s ease-out both";
|
|
387
|
+
}, {
|
|
388
|
+
readonly selector: `[data-motion="fade-in"] .wb-site-hero-words`;
|
|
389
|
+
readonly about: "Movement: the words fade in just after";
|
|
390
|
+
readonly css: "animation:wb-site-hero-fade .8s .15s ease-out both";
|
|
391
|
+
}, {
|
|
392
|
+
readonly selector: `[data-motion="words-rise"] .wb-site-hero-words`;
|
|
393
|
+
readonly about: "Movement: the words rise into place";
|
|
394
|
+
readonly css: "animation:wb-site-hero-rise .6s .15s ease-out both";
|
|
395
|
+
}];
|
|
396
|
+
}, {
|
|
397
|
+
readonly name: "wb-site-hero-notice";
|
|
398
|
+
readonly element: "p";
|
|
399
|
+
readonly about: "A line above the hero, such as a cut-off time or a warning";
|
|
400
|
+
readonly css: `margin:0 0 ${string};padding:.55rem ${string};border-radius:${string};background:${string};color:${string};font-size:.92rem;font-weight:600;text-align:center`;
|
|
401
|
+
readonly states: readonly [{
|
|
402
|
+
readonly selector: " .wb-site-link";
|
|
403
|
+
readonly about: "The notice's link";
|
|
404
|
+
readonly css: "color:inherit;text-decoration:underline";
|
|
405
|
+
}];
|
|
406
|
+
}, {
|
|
407
|
+
readonly name: "wb-site-hero-media";
|
|
408
|
+
readonly element: "div";
|
|
409
|
+
readonly about: "The hero's pictures (and the shade over them)";
|
|
410
|
+
readonly css: `position:relative;min-width:0;overflow:hidden;border-radius:${string}`;
|
|
411
|
+
}, {
|
|
412
|
+
readonly name: "wb-site-hero-frame";
|
|
413
|
+
readonly element: "picture";
|
|
414
|
+
readonly about: "One picture, with a phone version when there is one";
|
|
415
|
+
readonly css: "display:block;height:100%";
|
|
416
|
+
}, {
|
|
417
|
+
readonly name: "wb-site-hero-img";
|
|
418
|
+
readonly element: "img";
|
|
419
|
+
readonly about: "The picture, cropped round its focal point";
|
|
420
|
+
readonly css: `display:block;width:100%;height:100%;object-fit:cover;object-position:${string};transform:scale(${string});transform-origin:${string}`;
|
|
421
|
+
readonly wide: readonly [{
|
|
422
|
+
readonly selector: "";
|
|
423
|
+
readonly about: "From 600px: the main focal point";
|
|
424
|
+
readonly css: `object-position:${string};transform-origin:${string}`;
|
|
425
|
+
}];
|
|
426
|
+
}, {
|
|
427
|
+
readonly name: "wb-site-hero-shade";
|
|
428
|
+
readonly element: "span";
|
|
429
|
+
readonly about: "The shade over the picture that makes the words easier to read";
|
|
430
|
+
readonly css: `position:absolute;inset:0;pointer-events:none;background:linear-gradient(to top, ${string} 0%, ${string} 30%, transparent 90%)`;
|
|
431
|
+
}, {
|
|
432
|
+
readonly name: "wb-site-hero-eyebrow";
|
|
433
|
+
readonly element: "p";
|
|
434
|
+
readonly about: "The short line above the heading";
|
|
435
|
+
readonly css: `margin:0 0 .6rem;font-size:.85rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:inherit;opacity:.85`;
|
|
436
|
+
}, {
|
|
437
|
+
readonly name: "wb-site-hero-slot";
|
|
438
|
+
readonly element: "div";
|
|
439
|
+
readonly about: "A live tool inside the hero, such as a booking search";
|
|
440
|
+
readonly css: `margin-top:calc(${string} * 1.25);padding:${string};border-radius:${string};background:${string};color:${string};text-align:left;box-shadow:0 8px 28px rgb(0 0 0 / .12)`;
|
|
441
|
+
}];
|
|
442
|
+
export declare const HERO_KEYFRAMES: readonly [{
|
|
443
|
+
readonly name: "wb-site-hero-zoom";
|
|
444
|
+
readonly about: "A slow zoom into the picture";
|
|
445
|
+
readonly steps: readonly [{
|
|
446
|
+
readonly at: "from";
|
|
447
|
+
readonly css: `transform:scale(${string})`;
|
|
448
|
+
}, {
|
|
449
|
+
readonly at: "to";
|
|
450
|
+
readonly css: `transform:scale(calc(${string} * 1.06))`;
|
|
451
|
+
}];
|
|
452
|
+
}, {
|
|
453
|
+
readonly name: "wb-site-hero-fade";
|
|
454
|
+
readonly about: "Fading in";
|
|
455
|
+
readonly steps: readonly [{
|
|
456
|
+
readonly at: "from";
|
|
457
|
+
readonly css: "opacity:0";
|
|
458
|
+
}, {
|
|
459
|
+
readonly at: "to";
|
|
460
|
+
readonly css: "opacity:1";
|
|
461
|
+
}];
|
|
462
|
+
}, {
|
|
463
|
+
readonly name: "wb-site-hero-rise";
|
|
464
|
+
readonly about: "Rising a little into place";
|
|
465
|
+
readonly steps: readonly [{
|
|
466
|
+
readonly at: "from";
|
|
467
|
+
readonly css: "opacity:0;transform:translateY(12px)";
|
|
468
|
+
}, {
|
|
469
|
+
readonly at: "to";
|
|
470
|
+
readonly css: "opacity:1;transform:none";
|
|
471
|
+
}];
|
|
472
|
+
}];
|
|
473
|
+
export {};
|