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:
@@ -7,16 +7,17 @@
|
||||
* - 19003:23576 / 19000:23009 — left
|
||||
*/
|
||||
import {
|
||||
ASSETS,
|
||||
getAssetPath,
|
||||
howItWorksOrnamentLeftPath,
|
||||
howItWorksOrnamentRightPath,
|
||||
resolveArticleOrnamentPath,
|
||||
} from "../../../lib/assetUtils";
|
||||
|
||||
type ContentTemplateDecorativeShapesVariant = "guide" | "article";
|
||||
|
||||
type ContentTemplateDecorativeShapesProps = {
|
||||
variant: ContentTemplateDecorativeShapesVariant;
|
||||
slug?: string;
|
||||
};
|
||||
|
||||
const RIGHT_GUIDE_CLASS =
|
||||
@@ -30,8 +31,15 @@ const LEFT_ARTICLE_CLASS =
|
||||
|
||||
export default function ContentTemplateDecorativeShapes({
|
||||
variant,
|
||||
slug,
|
||||
}: ContentTemplateDecorativeShapesProps) {
|
||||
const isArticle = variant === "article";
|
||||
const rightSrc = isArticle
|
||||
? resolveArticleOrnamentPath(slug, "right")
|
||||
: getAssetPath(howItWorksOrnamentRightPath());
|
||||
const leftSrc = isArticle
|
||||
? resolveArticleOrnamentPath(slug, "left")
|
||||
: getAssetPath(howItWorksOrnamentLeftPath());
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -42,11 +50,7 @@ export default function ContentTemplateDecorativeShapes({
|
||||
>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img
|
||||
src={
|
||||
isArticle
|
||||
? getAssetPath(ASSETS.CONTENT_SHAPE_1)
|
||||
: getAssetPath(howItWorksOrnamentRightPath())
|
||||
}
|
||||
src={rightSrc}
|
||||
alt=""
|
||||
className="pointer-events-none size-full max-w-none object-contain"
|
||||
/>
|
||||
@@ -58,11 +62,7 @@ export default function ContentTemplateDecorativeShapes({
|
||||
>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img
|
||||
src={
|
||||
isArticle
|
||||
? getAssetPath(ASSETS.CONTENT_SHAPE_2)
|
||||
: getAssetPath(howItWorksOrnamentLeftPath())
|
||||
}
|
||||
src={leftSrc}
|
||||
alt=""
|
||||
className="pointer-events-none size-full max-w-none object-contain"
|
||||
/>
|
||||
|
||||
@@ -208,7 +208,10 @@ export default async function BlogPostPage({ params }: PageProps) {
|
||||
<ContentBanner post={post} />
|
||||
|
||||
<div className="relative w-full overflow-x-clip">
|
||||
<ContentTemplateDecorativeShapes variant="article" />
|
||||
<ContentTemplateDecorativeShapes
|
||||
variant="article"
|
||||
slug={post.slug}
|
||||
/>
|
||||
|
||||
<article
|
||||
data-node-id="19031:10426"
|
||||
|
||||
Reference in New Issue
Block a user