@bygghammar/cms-platform 0.67.0 → 0.69.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bygghammar/cms-platform",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.69.0",
|
|
4
4
|
"description": "Shared CMS platform: blocks, block types, i18n core, UI primitives and design-token contract used by every Bygghammar/Voyara site.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -140,7 +140,7 @@ export function CabinTabsBlock({ props }: { props: CabinTabsProps }) {
|
|
|
140
140
|
</p>
|
|
141
141
|
) : null}
|
|
142
142
|
{(item.bullets ?? []).length > 0 ? (
|
|
143
|
-
<ul className="mt-6
|
|
143
|
+
<ul className="mt-6 grid grid-cols-1 gap-x-6 gap-y-2.5 sm:grid-cols-2">
|
|
144
144
|
{(item.bullets ?? []).map((b, i) => (
|
|
145
145
|
<li key={b.id ?? i} className="flex items-start gap-3">
|
|
146
146
|
<Check className="mt-1 size-4 shrink-0 text-sea" aria-hidden />
|
|
@@ -89,6 +89,9 @@ export function HeroFullBlock({ props: p }: { props: HeroFullProps }) {
|
|
|
89
89
|
return (
|
|
90
90
|
<section
|
|
91
91
|
id={p.anchor || undefined}
|
|
92
|
+
// Lets the shared site header know a full-bleed hero sits behind it, so
|
|
93
|
+
// it can render light chrome until the visitor scrolls past it.
|
|
94
|
+
data-site-hero={dark ? "dark" : "light"}
|
|
92
95
|
className={`relative isolate w-full overflow-hidden bg-ink ${HEIGHTS[p.height ?? "full"]} flex`}
|
|
93
96
|
>
|
|
94
97
|
{/* Background media */}
|
package/src/site/SiteHeader.tsx
CHANGED
|
@@ -205,7 +205,18 @@ export function SiteHeader({
|
|
|
205
205
|
return () => document.removeEventListener("pointerdown", onDown);
|
|
206
206
|
}, [open]);
|
|
207
207
|
|
|
208
|
-
|
|
208
|
+
// Pages that open with a full-bleed dark hero mark it with
|
|
209
|
+
// `data-site-hero="dark"`. Detect it per route so the un-scrolled header uses
|
|
210
|
+
// light chrome there, and reverts to dark chrome once the hero is scrolled past.
|
|
211
|
+
const [darkHero, setDarkHero] = useState(false);
|
|
212
|
+
useEffect(() => {
|
|
213
|
+
const detect = () => setDarkHero(Boolean(document.querySelector('[data-site-hero="dark"]')));
|
|
214
|
+
detect();
|
|
215
|
+
const timer = setTimeout(detect, 150);
|
|
216
|
+
return () => clearTimeout(timer);
|
|
217
|
+
}, [pathname]);
|
|
218
|
+
|
|
219
|
+
const lightText = (lightTextPaths.includes(pathname) || darkHero) && !scrolled;
|
|
209
220
|
const name = t(brandName);
|
|
210
221
|
// A dedicated dark artwork wins on light surfaces; otherwise invert the light one.
|
|
211
222
|
const onLightSurface = !lightText;
|