@conduction/docusaurus-preset 1.4.3 → 1.5.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
CHANGED
|
@@ -37,6 +37,11 @@
|
|
|
37
37
|
* Each cta object also accepts `tone: "orange"` to flip the primary
|
|
38
38
|
* (or secondary) variant to the KNVB-orange accent. Reserved for
|
|
39
39
|
* product pages with an orange-leaning brand identity (mydash).
|
|
40
|
+
*
|
|
41
|
+
* `background="cobalt"` paints the hero in a full-bleed cobalt panel
|
|
42
|
+
* with white type — the product-page identity used on the
|
|
43
|
+
* {slug}.conduction.nl landings. Default (undefined) keeps the
|
|
44
|
+
* existing on-cream rendering used by the connext apps detail pages.
|
|
40
45
|
*/
|
|
41
46
|
|
|
42
47
|
import React from 'react';
|
|
@@ -61,12 +66,18 @@ export default function DetailHero({
|
|
|
61
66
|
className,
|
|
62
67
|
appId,
|
|
63
68
|
downloads,
|
|
69
|
+
background,
|
|
64
70
|
}) {
|
|
65
71
|
const dlCount = downloads != null ? downloads : (appId ? downloadsForApp(appId) : 0);
|
|
66
72
|
const hasIllustration = Boolean(illustration);
|
|
73
|
+
/* `background="cobalt"` flips the hero to a full-bleed cobalt panel
|
|
74
|
+
with white type — the product-page identity used on
|
|
75
|
+
{slug}.conduction.nl landings. Default (undefined) keeps the
|
|
76
|
+
existing on-cream rendering used by connext apps detail pages. */
|
|
77
|
+
const bgClass = background === 'cobalt' ? styles.bgCobalt : null;
|
|
67
78
|
|
|
68
79
|
return (
|
|
69
|
-
<section className={[styles.head, hasIllustration && styles.withIllustration, className].filter(Boolean).join(' ')}>
|
|
80
|
+
<section className={[styles.head, hasIllustration && styles.withIllustration, bgClass, className].filter(Boolean).join(' ')}>
|
|
70
81
|
{crumb && Array.isArray(crumb) && (
|
|
71
82
|
<div className={styles.crumb}>
|
|
72
83
|
{crumb.map((c, i) => {
|
|
@@ -8,8 +8,41 @@
|
|
|
8
8
|
margin: 0 auto;
|
|
9
9
|
padding: 24px 64px 56px;
|
|
10
10
|
font-family: var(--conduction-typography-font-family-body);
|
|
11
|
+
position: relative;
|
|
11
12
|
}
|
|
12
13
|
|
|
14
|
+
/* Cobalt-background hero variant for product-page identity. The brand
|
|
15
|
+
panel needs to bleed full-width even though the section keeps its
|
|
16
|
+
1280px content max-width. Earlier attempt used a 100vw absolute
|
|
17
|
+
pseudo-element, but Docusaurus's <main>/<article> wrappers run
|
|
18
|
+
`overflow: hidden` on some routes which clipped the pseudo to the
|
|
19
|
+
container width (visible as a hard white strip on the right at
|
|
20
|
+
≥1280px viewports). Switch to the box-shadow + clip-path bleed:
|
|
21
|
+
a single colour paints the element's box AND extends horizontally
|
|
22
|
+
via box-shadow rings, while clip-path: inset(0 -100vmax) trims the
|
|
23
|
+
top/bottom of those rings so the panel doesn't bleed vertically.
|
|
24
|
+
Robust against any ancestor overflow setting. */
|
|
25
|
+
.bgCobalt {
|
|
26
|
+
padding-top: 56px;
|
|
27
|
+
padding-bottom: 64px;
|
|
28
|
+
color: white;
|
|
29
|
+
background: var(--c-blue-cobalt);
|
|
30
|
+
box-shadow: 0 0 0 100vmax var(--c-blue-cobalt);
|
|
31
|
+
clip-path: inset(0 -100vmax);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.bgCobalt .crumb,
|
|
35
|
+
.bgCobalt .crumb a { color: var(--c-cobalt-100); }
|
|
36
|
+
.bgCobalt .crumb a:hover { color: var(--c-orange-knvb); }
|
|
37
|
+
.bgCobalt .sep { color: var(--c-cobalt-300); }
|
|
38
|
+
.bgCobalt .badge { color: var(--c-cobalt-100); }
|
|
39
|
+
.bgCobalt .versionBadge { color: var(--c-cobalt-200); }
|
|
40
|
+
.bgCobalt .downloadsBadge { color: white; }
|
|
41
|
+
.bgCobalt .title,
|
|
42
|
+
.bgCobalt .titleText { color: white; }
|
|
43
|
+
.bgCobalt .tagline { color: var(--c-cobalt-100); }
|
|
44
|
+
.bgCobalt .tagline :global(.next-blue) { color: var(--c-nextcloud-cyan); }
|
|
45
|
+
|
|
13
46
|
.crumb {
|
|
14
47
|
font-family: var(--conduction-typography-font-family-code);
|
|
15
48
|
font-size: 12px;
|