Update course banners, brochures, and archive offerings.
Deploy edu.mstaut.ir / deploy (push) Has been cancelled
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:
1 parent
6e2c9f1ad7
commit
3eea1c35a6
14 files changed
+545
-365
No files matched your search
@@ -0,0 +1,32 @@
|
||||
import Image from "next/image";
|
||||
|
||||
/** Card media: banner image when set; otherwise course title on themed surface. */
|
||||
export function CourseCardBanner({
|
||||
title,
|
||||
bannerUrl,
|
||||
}: {
|
||||
title: string;
|
||||
bannerUrl?: string | null;
|
||||
}) {
|
||||
const hasBanner = Boolean(bannerUrl?.trim());
|
||||
|
||||
return (
|
||||
<div className="pointer-events-none relative aspect-[16/10] overflow-hidden bg-primary-foreground/10">
|
||||
{hasBanner ? (
|
||||
<Image
|
||||
src={bannerUrl!}
|
||||
alt=""
|
||||
fill
|
||||
className="object-cover transition-transform duration-300 group-hover:scale-[1.03]"
|
||||
sizes="(max-width:768px) 100vw, 33vw"
|
||||
/>
|
||||
) : (
|
||||
<div className="flex h-full items-center justify-center bg-gradient-to-br from-primary-foreground/15 to-primary-foreground/5 px-4">
|
||||
<p className="line-clamp-3 text-center text-sm font-bold leading-6 text-primary-foreground/90 sm:text-base">
|
||||
{title}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user