@conduction/docusaurus-preset 3.44.3 → 3.45.1
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/package.json +1 -1
- package/src/components/DetailHero/DetailHero.jsx +15 -0
- package/src/components/DetailHero/DetailHero.module.css +13 -0
- package/src/components/FeaturedCard/FeaturedCard.jsx +17 -0
- package/src/components/FeaturedCard/FeaturedCard.module.css +12 -0
- package/src/components/GameModal/GameModal.module.css +13 -8
package/package.json
CHANGED
|
@@ -32,8 +32,13 @@
|
|
|
32
32
|
* icon={<svg>...</svg>}
|
|
33
33
|
* iconColor="var(--c-blue-cobalt)"
|
|
34
34
|
* illustration={<AppMock app="launchpad" />}
|
|
35
|
+
* game={<HiddenGame id="stamp-rush" unlock={...}><StampRush /></HiddenGame>}
|
|
35
36
|
* />
|
|
36
37
|
*
|
|
38
|
+
* `game` is the app's hidden mini-game. It renders across the full
|
|
39
|
+
* width of the hero, under the copy and the illustration, and shows
|
|
40
|
+
* nothing until the player finds it.
|
|
41
|
+
*
|
|
37
42
|
* Each cta object also accepts `tone: "orange"` to flip the primary
|
|
38
43
|
* (or secondary) variant to the KNVB-orange accent. Reserved for
|
|
39
44
|
* product pages with an orange-leaning brand identity (launchpad).
|
|
@@ -95,6 +100,7 @@ export default function DetailHero({
|
|
|
95
100
|
icon,
|
|
96
101
|
iconColor,
|
|
97
102
|
illustration,
|
|
103
|
+
game,
|
|
98
104
|
className,
|
|
99
105
|
appId,
|
|
100
106
|
downloads,
|
|
@@ -393,6 +399,15 @@ export default function DetailHero({
|
|
|
393
399
|
{hasIllustration && (
|
|
394
400
|
<div className={styles.illustration}>{illustration}</div>
|
|
395
401
|
)}
|
|
402
|
+
|
|
403
|
+
{/* The app's hidden mini-game, when it has one. It lives here
|
|
404
|
+
rather than further down the page because the way in is up
|
|
405
|
+
here too: you knock on the logo in this hero, and what you
|
|
406
|
+
unlocked should not be somewhere you have to scroll to find.
|
|
407
|
+
It spans both columns, so the game gets the width of the
|
|
408
|
+
hero instead of the width of the mock. While the game is
|
|
409
|
+
still hidden this renders nothing at all. */}
|
|
410
|
+
{game && <div className={styles.game}>{game}</div>}
|
|
396
411
|
</div>
|
|
397
412
|
</section>
|
|
398
413
|
);
|
|
@@ -234,6 +234,19 @@ a.downloadsBadge:hover {
|
|
|
234
234
|
width: 100%;
|
|
235
235
|
}
|
|
236
236
|
.illustration > * { width: 100%; max-width: 560px; }
|
|
237
|
+
|
|
238
|
+
/* The app's mini-game, across the whole hero rather than in the
|
|
239
|
+
illustration's column: the games are wide, and a card squeezed into
|
|
240
|
+
half a hero reads as an accident. Empty until the game is found, and
|
|
241
|
+
`:empty` keeps the margin off until then. */
|
|
242
|
+
.game {
|
|
243
|
+
grid-column: 1 / -1;
|
|
244
|
+
margin-top: 40px; /* The games hold between 460 and 760px of content, so a card
|
|
245
|
+
stretched across the whole hero is mostly empty on the right. Wide
|
|
246
|
+
enough for the widest board, and no wider. */
|
|
247
|
+
max-width: 820px;
|
|
248
|
+
}
|
|
249
|
+
.game:empty { display: none; }
|
|
237
250
|
@media (max-width: 900px) {
|
|
238
251
|
.illustration { justify-content: flex-start; }
|
|
239
252
|
}
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
*
|
|
17
17
|
* <FeaturedCard
|
|
18
18
|
* href="/posts/install-opencatalogi"
|
|
19
|
+
*
|
|
20
|
+
* `game` puts a hidden mini-game across the bottom of the card. Only
|
|
21
|
+
* on a card without `href`: inside a link the card would swallow every
|
|
22
|
+
* click before the game saw it.
|
|
19
23
|
* eyebrow="Featured guide"
|
|
20
24
|
* title="Install OpenCatalogi in two minutes."
|
|
21
25
|
* lede="From app store to first register, no terminal required."
|
|
@@ -58,6 +62,7 @@ export default function FeaturedCard({
|
|
|
58
62
|
locale,
|
|
59
63
|
thumbnail,
|
|
60
64
|
visual,
|
|
65
|
+
game,
|
|
61
66
|
accent = 'orange',
|
|
62
67
|
contentType,
|
|
63
68
|
durationMinutes,
|
|
@@ -175,6 +180,18 @@ export default function FeaturedCard({
|
|
|
175
180
|
].join(' ')} />
|
|
176
181
|
</>)}
|
|
177
182
|
</div>
|
|
183
|
+
|
|
184
|
+
{/* The post's hidden mini-game, when it has one. It belongs in
|
|
185
|
+
the hero for the same reason the app games do: the way in is
|
|
186
|
+
up here, so what you unlocked should be too. It spans both
|
|
187
|
+
columns and shows nothing until the game is found.
|
|
188
|
+
|
|
189
|
+
Not rendered when the whole card is a link: a game inside an
|
|
190
|
+
anchor cannot be played, because the card swallows the click
|
|
191
|
+
before the game sees it. `game` and `href` do not go
|
|
192
|
+
together, and a card that links somewhere is a teaser, not a
|
|
193
|
+
place to play. */}
|
|
194
|
+
{game && !href && <div className={styles.game}>{game}</div>}
|
|
178
195
|
</Tag>
|
|
179
196
|
);
|
|
180
197
|
}
|
|
@@ -25,6 +25,18 @@
|
|
|
25
25
|
|
|
26
26
|
.body { min-width: 0; }
|
|
27
27
|
|
|
28
|
+
/* The post's mini-game, across the whole card rather than in the
|
|
29
|
+
visual's column: the games are wide, and a card squeezed into half a
|
|
30
|
+
hero reads as an accident. Empty until the game is found. */
|
|
31
|
+
.game {
|
|
32
|
+
grid-column: 1 / -1;
|
|
33
|
+
margin-top: var(--space-8); /* The games hold between 460 and 760px of content, so a card
|
|
34
|
+
stretched across the whole hero is mostly empty on the right. Wide
|
|
35
|
+
enough for the widest board, and no wider. */
|
|
36
|
+
max-width: 820px;
|
|
37
|
+
}
|
|
38
|
+
.game:empty { display: none; }
|
|
39
|
+
|
|
28
40
|
.eyebrow {
|
|
29
41
|
display: inline-flex;
|
|
30
42
|
align-items: center;
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
background: var(--conduction-color-surface-card);
|
|
36
36
|
color: var(--conduction-color-text-body);
|
|
37
37
|
border-radius: var(--radius-xl);
|
|
38
|
-
padding:
|
|
38
|
+
padding: 44px 44px 36px;
|
|
39
39
|
width: calc(100% - 48px);
|
|
40
40
|
max-width: 520px;
|
|
41
41
|
box-shadow: var(--shadow-3, 0 30px 80px -20px rgba(10, 23, 47, 0.4));
|
|
@@ -50,6 +50,10 @@
|
|
|
50
50
|
gap: 0;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
/* The roster sits under the headline and the share block rather than
|
|
54
|
+
against them. */
|
|
55
|
+
.roster { margin-top: 28px; }
|
|
56
|
+
|
|
53
57
|
@media (min-width: 880px) {
|
|
54
58
|
.panel { max-width: 880px; }
|
|
55
59
|
.body {
|
|
@@ -57,7 +61,7 @@
|
|
|
57
61
|
grid-template-areas:
|
|
58
62
|
'intro aside'
|
|
59
63
|
'roster roster';
|
|
60
|
-
column-gap:
|
|
64
|
+
column-gap: 56px;
|
|
61
65
|
}
|
|
62
66
|
.intro { grid-area: intro; }
|
|
63
67
|
.aside { grid-area: aside; }
|
|
@@ -68,8 +72,9 @@
|
|
|
68
72
|
.grid {
|
|
69
73
|
display: block;
|
|
70
74
|
columns: 2;
|
|
71
|
-
column-gap:
|
|
75
|
+
column-gap: 56px;
|
|
72
76
|
}
|
|
77
|
+
.roster { margin-top: 36px; }
|
|
73
78
|
.gridItem,
|
|
74
79
|
.gridItemFound { break-inside: avoid; }
|
|
75
80
|
}
|
|
@@ -164,10 +169,10 @@
|
|
|
164
169
|
.grid {
|
|
165
170
|
list-style: none;
|
|
166
171
|
padding: 0;
|
|
167
|
-
margin: 0
|
|
172
|
+
margin: 0;
|
|
168
173
|
display: flex;
|
|
169
174
|
flex-direction: column;
|
|
170
|
-
gap:
|
|
175
|
+
gap: 7px;
|
|
171
176
|
}
|
|
172
177
|
.gridItem,
|
|
173
178
|
.gridItemFound {
|
|
@@ -213,8 +218,8 @@
|
|
|
213
218
|
====================================================================== */
|
|
214
219
|
|
|
215
220
|
.share {
|
|
216
|
-
margin:
|
|
217
|
-
padding:
|
|
221
|
+
margin: 24px 0 0;
|
|
222
|
+
padding: 20px;
|
|
218
223
|
background: var(--conduction-color-surface-subtle);
|
|
219
224
|
border-radius: var(--radius-md);
|
|
220
225
|
}
|
|
@@ -302,7 +307,7 @@
|
|
|
302
307
|
display: flex;
|
|
303
308
|
gap: 8px;
|
|
304
309
|
justify-content: flex-end;
|
|
305
|
-
margin-top:
|
|
310
|
+
margin-top: 32px;
|
|
306
311
|
}
|
|
307
312
|
|
|
308
313
|
.btnSecondary {
|