- {slides.map((slide, index) => {
- const slideTitle = localizedFromRecord(slide, 'title', resolvedLang)
- const description = localizedFromRecord(slide, 'description', resolvedLang)
- const category = localizedFromRecord(slide, 'category', resolvedLang)
- const buttonText = localizedFromRecord(slide, 'buttonText', resolvedLang)
- const buttonLink = typeof slide.buttonLink === 'string' ? slide.buttonLink : ''
- const imageUrl = typeof slide.imageUrl === 'string' ? slide.imageUrl : ''
+
+
+
+ {slides.map((slide, index) => {
+ const slideTitle = localizedFromRecord(slide, 'title', resolvedLang)
+ const description = localizedFromRecord(slide, 'description', resolvedLang)
+ const category = localizedFromRecord(slide, 'category', resolvedLang)
+ const buttonText = localizedFromRecord(slide, 'buttonText', resolvedLang)
+ const buttonLink = typeof slide.buttonLink === 'string' ? slide.buttonLink : ''
+ const imageUrl = typeof slide.imageUrl === 'string' ? slide.imageUrl : ''
- return (
-
- {imageUrl ? (
-
-
-
- ) : null}
-
-
- {category &&
{category}
}
- {slideTitle &&
{renderAccentTitle(slideTitle)}
}
- {description &&
{description}
}
-
- {buttonText && buttonLink && (
-
-
- {buttonText}
→
-
+ return (
+
+ {imageUrl ? (
+
+
- )}
-
-
- )
- })}
+ ) : null}
+
+
+ {category &&
{category}}
+ {slideTitle &&
{renderAccentTitle(slideTitle)}
}
+ {description &&
{description}
}
+
+ {buttonText && buttonLink && (
+
+
+ {buttonText} →
+
+
+ )}
+
+
+ )
+ })}
+
+
@@ -560,9 +586,12 @@ function AccordionSection({ payload, lang }: { payload: Record
,
const categories = Array.isArray(payload.categories) ? payload.categories.map(toRecord) : []
if (!categories.length) return null
const sectionTitle = localizedFromRecord(payload, 'title', resolvedLang)
+ const backgroundColor = typeof payload.backgroundColor === 'string' ? payload.backgroundColor : undefined
+ const textColor = typeof payload.textColor === 'string' ? payload.textColor : undefined
+ const iconColor = typeof payload.iconColor === 'string' ? payload.iconColor : undefined
return (
-
+
{sectionTitle &&
{sectionTitle}
}
{categories.map((category, categoryIndex) => {
@@ -573,8 +602,8 @@ function AccordionSection({ payload, lang }: { payload: Record
,
return (
{name && (
-
- {icon && {icon}}
+
+ {icon && {icon}}
{name}
)}
@@ -586,7 +615,7 @@ function AccordionSection({ payload, lang }: { payload: Record,
return (
-
+
{question}
{answer}
diff --git a/fix-website-carousel.js b/fix-website-carousel.js
new file mode 100644
index 0000000..a1d976b
--- /dev/null
+++ b/fix-website-carousel.js
@@ -0,0 +1,9 @@
+const fs = require('fs');
+const path = 'apps/website/src/components/dynamic/DynamicPageRenderer.tsx';
+let content = fs.readFileSync(path, 'utf8');
+
+content = content.replace(/className="ui-section-dark-card group/g, 'className="ui-card group');
+content = content.replace(/className="ui-section-dark-card-title mt-6 text-xl"/g, 'className="text-xl font-bold text-text-main mt-6"');
+content = content.replace(/className="ui-section-dark-card-copy mt-3 text-base"/g, 'className="text-base text-muted-text mt-3 whitespace-pre-wrap"');
+
+fs.writeFileSync(path, content);
diff --git a/packages/types/index.ts b/packages/types/index.ts
index 968c009..bf42c70 100644
--- a/packages/types/index.ts
+++ b/packages/types/index.ts
@@ -462,18 +462,23 @@ export type ScentGuidePage = z.infer;
export const AccordionSectionPayloadSchema = z.object({
title: LocalizedStringSchema.optional(),
+ backgroundColor: z.string().optional(),
+ textColor: z.string().optional(),
+ iconColor: z.string().optional(),
categories: z.array(
z.object({
+ id: z.string().optional(),
name: LocalizedStringSchema,
icon: z.string().optional(),
questions: z.array(
z.object({
+ id: z.string().optional(),
q: LocalizedStringSchema,
a: LocalizedStringSchema,
})
- ).min(1),
+ ),
})
- ).min(1),
+ ).optional(),
});
export type AccordionSectionPayload = z.infer;