Update course banners, brochures, and archive offerings.
Deploy edu.mstaut.ir / deploy (push) Has been cancelled

Ship delivery webp assets for AI Fluency and organizational AI transformation, keep brochure-only courses without fake card banners, and seed nine past open-education courses for production.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
smhk1376andCursor committed 2026-10-16 16:12:36 +03:30
1 parent 6e2c9f1ad7
commit 3eea1c35a6
14 files changed
+545 -365

No files matched your search

@@ -1,6 +1,6 @@
import Image from "next/image";
import Link from "next/link";
import { ArrowUpLeft, Clock, Layers, Wallet } from "lucide-react";
import { Clock, Layers, Wallet } from "lucide-react";
import { Container } from "@/components/atoms/Container";
import { Heading } from "@/components/atoms/Heading";
import { Section } from "@/components/atoms/Section";
@@ -41,7 +41,6 @@ export function CourseDetailTemplate({
labels: CourseDetailLabels;
}) {
const priceLabel = formatCoursePrice(course.price);
const instructors = course.instructors ?? [];
const details: DetailItem[] = [
{ icon: Layers, label: labels.format, value: formatLabel(course.format) },
...(course.durationHours
@@ -61,6 +60,8 @@ export function CourseDetailTemplate({
},
];
const hasTaxonomy = course.categories.length > 0 || course.tags.length > 0;
const bannerUrl = course.posterImageUrl?.trim() || undefined;
const brochureUrl = course.brochureImageUrl?.trim() || undefined;
return (
<main id="main-content">
@@ -69,75 +70,34 @@ export function CourseDetailTemplate({
title={course.title}
intro={course.summary}
eyebrow={course.categories[0]?.label ?? course.tags[0]?.label}
imageUrl={course.posterImageUrl}
imageUrl={bannerUrl}
/>
<Section tone="subtle">
<Container className="grid min-w-0 gap-10 lg:grid-cols-[minmax(0,1fr)_minmax(0,22rem)] lg:items-start lg:gap-12">
<div className="min-w-0 space-y-10">
<div className="relative aspect-[16/9] overflow-hidden rounded-2xl bg-muted ring-1 ring-foreground/10">
<Image
src={course.brochureImageUrl}
alt={course.title}
fill
className="object-cover"
sizes="(max-width:1024px) 100vw, 60vw"
priority
/>
</div>
{brochureUrl ? (
<div className="relative aspect-[16/9] overflow-hidden rounded-2xl bg-muted ring-1 ring-foreground/10">
<Image
src={brochureUrl}
alt={course.title}
fill
className="object-cover"
sizes="(max-width:1024px) 100vw, 60vw"
priority
/>
</div>
) : null}
<section className="space-y-4">
<Heading level={3} as="h2">
{labels.aboutTitle}
</Heading>
<p className="text-base leading-8 text-foreground/90">
<p className="text-base leading-7 text-foreground/90">
{course.seoDescription || course.summary}
</p>
</section>
{instructors.length > 0 ? (
<section className="space-y-4">
<Heading level={3} as="h2">
اساتید
</Heading>
<ul className="grid gap-3 sm:grid-cols-2">
{instructors.map((person) => {
const body = (
<>
<span className="block font-semibold text-foreground">
{person.name}
</span>
{person.title ? (
<span className="mt-1 block text-xs text-muted-foreground">
{person.title}
</span>
) : null}
</>
);
return (
<li key={person.id}>
{person.profileUrl ? (
<a
href={person.profileUrl}
target="_blank"
rel="noopener noreferrer"
className="group flex items-center justify-between gap-3 rounded-xl bg-card p-4 text-sm ring-1 ring-foreground/10 transition-shadow hover:shadow-md hover:ring-primary/25"
>
<span className="min-w-0">{body}</span>
<ArrowUpLeft className="size-4 shrink-0 text-muted-foreground transition-colors group-hover:text-primary" />
</a>
) : (
<div className="rounded-xl bg-card p-4 text-sm ring-1 ring-foreground/10">
{body}
</div>
)}
</li>
);
})}
</ul>
</section>
) : null}
{hasTaxonomy ? (
<section className="space-y-4">
<Heading level={3} as="h2">