Align header, footer, brand, homepage course preview, faculty links, and the course catalog with the documented changes. Co-authored-by: Cursor <cursoragent@cursor.com>
311 lines
11 KiB
TypeScript
311 lines
11 KiB
TypeScript
import Link from "next/link";
|
|
import Image from "next/image";
|
|
import { Building2, Compass, Network } from "lucide-react";
|
|
import { Container } from "@/components/atoms/Container";
|
|
import { DotCta } from "@/components/atoms/DotCta";
|
|
import { Heading } from "@/components/atoms/Heading";
|
|
import { MetamorphField } from "@/components/atoms/MetamorphField";
|
|
import { Section } from "@/components/atoms/Section";
|
|
import { buttonVariants } from "@/components/ui/button";
|
|
import {
|
|
Card,
|
|
CardContent,
|
|
CardDescription,
|
|
CardHeader,
|
|
CardTitle,
|
|
} from "@/components/ui/card";
|
|
import { cn } from "@/lib/utils";
|
|
import { HeroFeatured } from "@/components/molecules/HeroFeatured";
|
|
import { IntersectionCard } from "@/components/molecules/Cards";
|
|
import { SectionHeader } from "@/components/molecules/SectionHeader";
|
|
import { StatGrid } from "@/components/molecules/StatGrid";
|
|
import type {
|
|
Article,
|
|
Course,
|
|
IntersectionTopic,
|
|
SiteStat,
|
|
} from "@/lib/types";
|
|
import { formatCoursePrice, formatLabel } from "@/lib/labels";
|
|
import { siteMission } from "@/lib/site-config";
|
|
|
|
export type HomeLabels = {
|
|
executiveLabel: string;
|
|
exploreOurPrograms: string;
|
|
ideasTitle: string;
|
|
eventsTitle: string;
|
|
seeAllEvents: string;
|
|
intersectionsTitle: string;
|
|
intersectionsSubtitle: string;
|
|
moreThanDegree: string;
|
|
moreThanDegreeBody: string;
|
|
keepExploring: string;
|
|
hireTitle: string;
|
|
hireBody: string;
|
|
registerCta: string;
|
|
missionTitle: string;
|
|
findUsTitle: string;
|
|
ideasEyebrow: string;
|
|
linksTitle: string;
|
|
exploreCourses?: string;
|
|
};
|
|
|
|
const ideas = [
|
|
{
|
|
icon: Compass,
|
|
title: "پشتوانه علمی دانشگاه صنعتی امیرکبیر",
|
|
text: "آموزش مدیریت در بستر دانشگاه صنعتی امیرکبیر، با تکیه بر دانش تخصصی، استدلال علمی و نگاه نقادانه.",
|
|
},
|
|
{
|
|
icon: Building2,
|
|
title: "پیوند مدیریت و فناوری",
|
|
text: "نگاهی میانرشتهای به داده و هوش مصنوعی؛ با توجه به تأثیر آنها بر تصمیمهای مدیریتی، مدلهای کسبوکار و آینده صنعت.",
|
|
},
|
|
{
|
|
icon: Network,
|
|
title: "تمرکز بر مسائل صنعت",
|
|
text: "توسعه توانمندی مدیران با توجه به چالشهای اجرای نوآوری، تغییر فرایندها و بهبود عملکرد سازمان.",
|
|
},
|
|
];
|
|
|
|
export function HomeHero({
|
|
featured,
|
|
eyebrow,
|
|
}: {
|
|
featured: Article | null;
|
|
eyebrow: string;
|
|
}) {
|
|
return (
|
|
<HeroFeatured
|
|
title={featured?.title}
|
|
href={featured?.href}
|
|
imageUrl={featured?.imageUrl}
|
|
eyebrow={eyebrow}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export function HomeIdeas() {
|
|
return (
|
|
<Section>
|
|
<Container>
|
|
<div className="grid min-w-0 gap-10 lg:grid-cols-[minmax(0,.8fr)_minmax(0,1.2fr)] lg:items-start lg:gap-20">
|
|
<div className="min-w-0 lg:sticky lg:top-28">
|
|
<SectionHeader
|
|
className="mb-0 sm:mb-0"
|
|
eyebrow="چرا دانشگاه صنعتی امیرکبیر؟"
|
|
title="مدیریت با پشتوانه دانش مهندسی"
|
|
description="هویت مهندسی و فناورانه دانشگاه صنعتی امیرکبیر به آموزش مدیریت در این دانشگاه جهت میدهد. در مرکز آموزشهای آزاد دانشکده مدیریت، علم و فناوری، توسعه مدیران با شناخت فناوری و مسائل صنعت پیوند دارد."
|
|
/>
|
|
</div>
|
|
<div className="grid min-w-0 gap-8 md:grid-cols-3 lg:grid-cols-1 lg:gap-10">
|
|
{ideas.map((item) => (
|
|
<div
|
|
key={item.title}
|
|
className="flex min-w-0 flex-col gap-4 lg:flex-row lg:items-start lg:gap-5"
|
|
>
|
|
<div className="flex size-12 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary">
|
|
<item.icon className="size-6" />
|
|
</div>
|
|
<div className="min-w-0">
|
|
<Heading as="h3" level={3}>
|
|
{item.title}
|
|
</Heading>
|
|
<p className="mt-2 text-sm leading-7 text-muted-foreground">
|
|
{item.text}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
))}
|
|
</div>
|
|
</div>
|
|
</Container>
|
|
</Section>
|
|
);
|
|
}
|
|
|
|
export function HomeCourseSearch({
|
|
courses,
|
|
exploreLabel = "مشاهده دورهها",
|
|
}: {
|
|
courses: Course[];
|
|
exploreLabel?: string;
|
|
}) {
|
|
return (
|
|
<Section tone="dark" className="overflow-hidden">
|
|
<Container>
|
|
<SectionHeader
|
|
inverse
|
|
eyebrow="دورههای کوتاه"
|
|
title="جدیدترین دورهها"
|
|
/>
|
|
{courses.length === 0 ? (
|
|
<p className="py-10 text-center text-sm text-background/60">
|
|
در حال حاضر دورهای برای نمایش نیست.
|
|
</p>
|
|
) : (
|
|
<div className="grid gap-5 sm:grid-cols-2 lg:grid-cols-3">
|
|
{courses.map((course) => {
|
|
const priceLabel = formatCoursePrice(course.price);
|
|
return (
|
|
<Card
|
|
key={course.id}
|
|
className="group relative gap-0 overflow-hidden bg-background/5 py-0 text-background ring-background/10 transition-colors hover:ring-background/30"
|
|
>
|
|
<Link
|
|
href={course.registrationUrl}
|
|
className="absolute inset-0 z-0"
|
|
aria-label={course.title}
|
|
/>
|
|
<div className="relative aspect-[16/10] overflow-hidden">
|
|
<Image
|
|
src={course.posterImageUrl}
|
|
alt={course.title}
|
|
fill
|
|
className="object-cover transition-transform duration-300 group-hover:scale-[1.03]"
|
|
sizes="(max-width:768px) 100vw, 33vw"
|
|
/>
|
|
</div>
|
|
<CardHeader className="relative z-[1] gap-1 px-4 pt-4">
|
|
<CardTitle className="text-base text-background">
|
|
{course.title}
|
|
</CardTitle>
|
|
</CardHeader>
|
|
<CardContent className="relative z-[1] space-y-3 px-4 pb-4">
|
|
<CardDescription className="line-clamp-2 text-background/70">
|
|
{course.summary}
|
|
</CardDescription>
|
|
<div className="flex flex-wrap items-center justify-between gap-2 text-xs text-background/55">
|
|
<span>
|
|
{course.durationHours
|
|
? `${course.durationHours} ساعت · ${formatLabel(course.format)}`
|
|
: formatLabel(course.format)}
|
|
</span>
|
|
{priceLabel ? (
|
|
<span className="font-semibold text-background/90">
|
|
{priceLabel}
|
|
</span>
|
|
) : null}
|
|
</div>
|
|
</CardContent>
|
|
</Card>
|
|
);
|
|
})}
|
|
</div>
|
|
)}
|
|
<div className="mt-10 flex justify-center">
|
|
<Link
|
|
href="/professional"
|
|
className={cn(
|
|
buttonVariants({ variant: "inverse", size: "lg" }),
|
|
"font-bold",
|
|
)}
|
|
>
|
|
{exploreLabel}
|
|
</Link>
|
|
</div>
|
|
</Container>
|
|
</Section>
|
|
);
|
|
}
|
|
|
|
export function HomeApproach() {
|
|
return (
|
|
<Section>
|
|
<Container>
|
|
<div className="overflow-hidden rounded-2xl bg-chart-3 text-background">
|
|
<div className="grid min-w-0 lg:grid-cols-2">
|
|
<div className="relative z-[1] order-2 flex min-w-0 flex-col justify-center px-6 py-10 sm:px-10 lg:order-1 lg:min-h-[22rem] lg:px-12 lg:py-14">
|
|
<SectionHeader
|
|
inverse
|
|
className="mb-0 sm:mb-0"
|
|
eyebrow="رویکرد آموزشی ما"
|
|
title="دانش دانشگاه صنعتی امیرکبیر، در خدمت تحول صنعت"
|
|
description="دانشگاه صنعتی امیرکبیر، دانش تخصصی و چارچوبهای مدیریتی را برای مواجهه با چالشهای صنعت در اختیار مدیران قرار میدهد؛ از شناخت ظرفیتهای داده و هوش مصنوعی تا ارزیابی تصمیمها و راهبری نوآوری در سازمان."
|
|
/>
|
|
<Link
|
|
href="/about"
|
|
className={cn(
|
|
buttonVariants({ variant: "inverse", size: "lg" }),
|
|
"mt-8 w-fit font-bold",
|
|
)}
|
|
>
|
|
آشنایی با رویکرد ما
|
|
</Link>
|
|
</div>
|
|
<div className="relative order-1 aspect-[16/10] min-h-0 lg:order-2 lg:aspect-auto lg:min-h-full lg:self-stretch">
|
|
<Image
|
|
src="/brand/campus-collaboration-v1.png"
|
|
alt="همکاری مدرسان و متخصصان در محیط دانشگاه"
|
|
fill
|
|
className="object-cover"
|
|
sizes="(max-width:1024px) 100vw, 50vw"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</Container>
|
|
</Section>
|
|
);
|
|
}
|
|
|
|
export function HomeRest({
|
|
labels,
|
|
intersections,
|
|
stats,
|
|
}: {
|
|
labels: HomeLabels;
|
|
intersections: IntersectionTopic[];
|
|
stats: SiteStat[];
|
|
}) {
|
|
return (
|
|
<>
|
|
<Section tone="muted">
|
|
<Container>
|
|
<SectionHeader
|
|
eyebrow="حوزههای آموزشی"
|
|
title={labels.intersectionsTitle}
|
|
description={labels.intersectionsSubtitle}
|
|
/>
|
|
<div className="grid min-w-0 gap-4 sm:grid-cols-2 lg:grid-cols-4">
|
|
{intersections.map((topic) => (
|
|
<IntersectionCard key={topic.id} {...topic} />
|
|
))}
|
|
</div>
|
|
</Container>
|
|
</Section>
|
|
|
|
<Section tone="dark" className="overflow-hidden">
|
|
<MetamorphField tone="dark" density="sparse" className="opacity-40" />
|
|
<Container className="relative z-[1] grid min-w-0 gap-8 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-end lg:gap-12">
|
|
<SectionHeader
|
|
inverse
|
|
className="mb-0 sm:mb-0"
|
|
eyebrow="همکاری با سازمانها"
|
|
title={labels.hireTitle}
|
|
description={labels.hireBody}
|
|
/>
|
|
<div className="shrink-0">
|
|
<DotCta href="/professional" onDark>
|
|
{labels.registerCta}
|
|
</DotCta>
|
|
</div>
|
|
</Container>
|
|
</Section>
|
|
|
|
<Section>
|
|
<Container className="max-w-4xl">
|
|
<SectionHeader
|
|
align="center"
|
|
eyebrow={labels.missionTitle}
|
|
title={siteMission}
|
|
/>
|
|
<StatGrid
|
|
stats={stats}
|
|
className="border-t border-border pt-10"
|
|
/>
|
|
</Container>
|
|
</Section>
|
|
</>
|
|
);
|
|
}
|