Fix featured grid

This commit is contained in:
adilallo
2026-05-22 13:50:55 -06:00
parent 3dbb6b61d2
commit 5863a256f6
23 changed files with 243 additions and 88 deletions
+26 -1
View File
@@ -106,7 +106,32 @@ export function governanceBookletPath(): string {
export type FeaturePanelKey = "support" | "exercises" | "guidance" | "tools";
export function featurePanelPath(key: FeaturePanelKey): string {
return `assets/marketing/feature-${key}.png`;
return `assets/marketing/feature-${key}.svg`;
}
/** Intrinsic icon bounds from Figma Feature-Grid (18632:10911). */
export const FEATURE_PANEL_LAYOUT: Record<
FeaturePanelKey,
{ width: number; height: number; panelImageClassName?: string }
> = {
support: { width: 48, height: 48 },
exercises: { width: 55, height: 48 },
guidance: { width: 56, height: 39 },
tools: {
width: 50,
height: 47,
/** Figma 18632:10947 — raw asset is inverted; frame applies rotate + flip. */
panelImageClassName: "rotate-180 -scale-x-100",
},
};
export function featurePanelLayout(key: FeaturePanelKey): {
panelWidth: number;
panelHeight: number;
panelImageClassName?: string;
} {
const { width, height, panelImageClassName } = FEATURE_PANEL_LAYOUT[key];
return { panelWidth: width, panelHeight: height, panelImageClassName };
}
/** Case study card artwork in `public/assets/case-study/`. */
+3
View File
@@ -0,0 +1,3 @@
/** feTurbulence grain masked to alpha and multiply-blended — matches HeroDecor. */
export const SVG_GRAIN_MULTIPLY_FILTER =
'url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg"><defs><filter id="grain" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1" colorInterpolationFilters="sRGB"><feTurbulence type="fractalNoise" baseFrequency="0.4" numOctaves="3" seed="7" stitchTiles="stitch" result="noise"/><feColorMatrix in="noise" result="softNoise" type="matrix" values="0.8 0 0 0 0.3 0 0.6 0 0 0.2 0 0 1.0 0 0.4 0 0 0 0.25 0"/><feComposite in="softNoise" in2="SourceAlpha" operator="in" result="maskedNoise"/><feBlend in="SourceGraphic" in2="maskedNoise" mode="multiply"/></filter></defs></svg>#grain\')';