Add rich HTML course lead/body and refresh AI course media from delivery v2.
Deploy edu.mstaut.ir / deploy (push) Has been cancelled

Course detail pages can show sanitized HTML ad copy under the hero and a structured body; posters and brochures are updated for both AI workshops.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
smhk1376andCursor committed 2026-10-20 00:54:30 +03:30
1 parent afd2b3333c
commit bd2cfa5a26
26 files changed
+801 -30

No files matched your search

@@ -7,6 +7,7 @@ import { TextLink } from "@/components/atoms/TextLink";
import { CourseMediaFigure } from "@/components/molecules/CourseMediaFigure";
import { DetailList, type DetailItem } from "@/components/molecules/DetailList";
import { PageHero } from "@/components/molecules/PageHero";
import { RichHtmlContent } from "@/components/molecules/RichHtmlContent";
import { SurfaceCard } from "@/components/molecules/SurfaceCard";
import { CourseRegisterGate } from "@/components/organisms/CourseRegisterGate";
import { Badge } from "@/components/ui/badge";
@@ -64,13 +65,20 @@ export function CourseDetailTemplate({
];
const hasTaxonomy = course.categories.length > 0 || course.tags.length > 0;
const brochureUrl = course.brochureImageUrl?.trim() || undefined;
const leadHtml = course.leadHtml?.trim() ?? "";
const bodyHtml = course.bodyHtml?.trim() ?? "";
const heroIntro = leadHtml ? (
<RichHtmlContent html={leadHtml} tone="onPrimary" />
) : (
course.summary
);
return (
<main id="main-content">
<JsonLd data={courseJsonLd(course)} />
<PageHero
title={course.title}
intro={course.summary}
intro={heroIntro}
eyebrow={course.categories[0]?.label ?? course.tags[0]?.label}
/>
@@ -87,14 +95,20 @@ export function CourseDetailTemplate({
/>
) : null}
<section className="space-y-4">
<Heading level={3} as="h2">
{labels.aboutTitle}
</Heading>
<p className="text-base leading-7 text-foreground/90">
{course.seoDescription || course.summary}
</p>
</section>
{bodyHtml || course.seoDescription ? (
<section className="space-y-4">
<Heading level={3} as="h2">
{labels.aboutTitle}
</Heading>
{bodyHtml ? (
<RichHtmlContent html={bodyHtml} />
) : (
<p className="text-base leading-7 text-foreground/90">
{course.seoDescription}
</p>
)}
</section>
) : null}
{hasTaxonomy ? (
<section className="space-y-4">