diff --git a/www/reports/migration-summary.md b/www/reports/migration-summary.md index c21a5a8..c700e4b 100644 --- a/www/reports/migration-summary.md +++ b/www/reports/migration-summary.md @@ -49,8 +49,11 @@ Implemented fidelity work includes: links. - Rebuilt library indexes and blog-post presentation around the live sidebar, article list, byline, featured-image, and counter patterns. -- Converted FAQ-bearing posts to MDX and recreated their live-style accordions - with a reusable component that emits matching `FAQPage` JSON-LD. +- Converted FAQ-bearing posts to MDX and routed their accordions, the + standalone FAQ page, and the insurance FAQ through one reusable component. + Each accordion uses the same animated, single-open interaction and a + component-scoped caret color override; blog and insurance instances also + emit matching `FAQPage` JSON-LD. - Restored 32 live-source blog blockquotes with their original emphasis, links, fawn backgrounds, spacing, rounded presentation, and quote-mark SVG. - Replaced generic oversized cards, rounded controls, and marketing heroes diff --git a/www/src/components/FAQAccordion.astro b/www/src/components/FAQAccordion.astro index b33b776..7a14489 100644 --- a/www/src/components/FAQAccordion.astro +++ b/www/src/components/FAQAccordion.astro @@ -8,13 +8,32 @@ interface FAQItem { interface Props { label?: string; heading: string; - items: FAQItem[]; + items?: FAQItem[]; canonical?: string; - variant?: 'blog' | 'source'; + variant?: 'blog' | 'source' | 'page'; + sourceSelector?: string; + searchSelector?: string; + faqIconColor?: string; } -const { label, heading, items, canonical, variant = 'blog' } = Astro.props; -const headingId = label ? 'blog-faq-heading' : 'source-faq-heading'; +const { + label, + heading, + items = [], + canonical, + variant = 'blog', + sourceSelector, + searchSelector, + faqIconColor = '--color-accent-strong' +} = Astro.props; +const resolvedFaqIconColor = faqIconColor.startsWith('--') + ? `var(${faqIconColor})` + : faqIconColor; +const headingId = variant === 'page' + ? 'faq-questions-heading' + : label + ? 'blog-faq-heading' + : 'source-faq-heading'; const schema = { '@context': 'https://schema.org', '@type': 'FAQPage', @@ -29,24 +48,361 @@ const schema = { })) }; --- -
-
- {label &&

{label}

} -

{heading}

-
-
- {items.map((item, index) => ( -
- - {item.question} - - -
${item.answer}

`} /> -
- ))} +
+
+
+ {label &&

{label}

} + {variant === 'page' + ?

{heading}

+ :

{heading}

} +
+
+ {items.map((item, index) => ( +
+ + {item.question} + + +
+
${item.answer}

`} /> +
+
+ ))} +
- diff --git a/www/src/components/pages/FaqPage.astro b/www/src/components/pages/FaqPage.astro index 7cfd518..8a905d2 100644 --- a/www/src/components/pages/FaqPage.astro +++ b/www/src/components/pages/FaqPage.astro @@ -1,8 +1,10 @@ --- import Button from '../Button.astro'; +import FAQAccordion from '../FAQAccordion.astro'; --- +
-
+
@@ -22,7 +24,7 @@ import Button from '../Button.astro'; /> @@ -30,12 +32,12 @@ import Button from '../Button.astro';
-
-
-

Questions & Answers

-
-
-
+
@@ -54,261 +56,6 @@ import Button from '../Button.astro';
- -