Use each catalog article’s Figma body ornaments instead of one shared pair.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilallo
2026-08-19 16:54:53 -06:00
co-authored by Cursor
parent 0f16c559c4
commit c2188015e3
23 changed files with 67 additions and 13 deletions
+23
View File
@@ -170,6 +170,14 @@ export function contentBlogTagPath(slug: string): string {
return `/content/blog/${slug}-tag.svg`;
}
/** Body gutter ornaments (Figma Content page Template 19003:23575 / 19003:23576). */
export function contentBlogOrnamentPath(
slug: string,
side: "right" | "left",
): string {
return `/content/blog/${slug}-ornament-${side}.png`;
}
/** Stable catalog slug order for blog asset fallbacks when an article has no custom SVGs. */
export const CONTENT_CATALOG_SLUG_ORDER = [
"resolving-active-conflicts",
@@ -182,6 +190,21 @@ export const CONTENT_CATALOG_SLUG_ORDER = [
"knowledge-management-and-institutional-amnesia",
] as const;
export function resolveArticleOrnamentPath(
slug: string | undefined,
side: "right" | "left",
): string {
const hasCatalogArt =
!!slug &&
(CONTENT_CATALOG_SLUG_ORDER as readonly string[]).includes(slug);
if (hasCatalogArt && slug) {
return contentBlogOrnamentPath(slug, side);
}
return getAssetPath(
side === "right" ? ASSETS.CONTENT_SHAPE_1 : ASSETS.CONTENT_SHAPE_2,
);
}
/** Pick a catalog article whose `public/content/blog/` SVGs can stand in as fallbacks. */
export function contentCatalogSlugForFallback(
slug: string,