Enhance Next.js configuration and dependencies for improved functionality and localization support. Added support for internationalization with next-intl, updated global styles, and integrated new fonts. Removed default home page and updated README with project details and setup instructions.
This commit is contained in:
1 parent
2911dea00b
commit
44f4fa98e2
320 files changed
+31666
-220
No files matched your search
@@ -0,0 +1,281 @@
|
||||
import Link from "next/link";
|
||||
import Image from "next/image";
|
||||
import { ArrowLeft, 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 { Separator } from "@/components/ui/separator";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { buttonVariants } from "@/components/ui/button";
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { HeroFeatured } from "@/components/molecules/HeroFeatured";
|
||||
import {
|
||||
ArticleCard,
|
||||
EventCard,
|
||||
IntersectionCard,
|
||||
} from "@/components/molecules/Cards";
|
||||
import { ProgramCarousel } from "@/components/organisms/ProgramCarousel";
|
||||
import type { Article, EventItem, IntersectionTopic, Program, SiteStat } from "@/lib/types";
|
||||
import { siteMission } from "@/lib/site-config";
|
||||
import { AnimatedMetric } from "@/components/atoms/AnimatedMetric";
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
export function HomeHero({
|
||||
featured,
|
||||
eyebrow,
|
||||
}: {
|
||||
featured: Article;
|
||||
eyebrow: string;
|
||||
}) {
|
||||
return (
|
||||
<HeroFeatured
|
||||
title={featured.title}
|
||||
href={featured.href}
|
||||
imageUrl={featured.imageUrl}
|
||||
eyebrow={eyebrow}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export function HomeIdeas({
|
||||
articles,
|
||||
title,
|
||||
}: {
|
||||
articles: Article[];
|
||||
title: string;
|
||||
}) {
|
||||
const ideaCards = articles.filter((a) => !a.featured).slice(0, 3);
|
||||
return (
|
||||
<>
|
||||
<Section className="relative py-20 sm:py-28">
|
||||
<Container>
|
||||
<div className="grid gap-10 lg:grid-cols-[.8fr_1.2fr] lg:items-start lg:gap-20">
|
||||
<div className="lg:sticky lg:top-28">
|
||||
<Badge variant="outline" className="border-primary/20 bg-primary/5 text-primary">چرا امیرکبیر؟</Badge>
|
||||
<Heading level={2} className="mt-5 text-3xl leading-tight sm:text-4xl">
|
||||
آموزش برای جهانِ در حال تغییر
|
||||
</Heading>
|
||||
<p className="mt-5 text-base leading-8 text-muted-foreground sm:text-lg">
|
||||
اینجا آموزش، انتقال محتوا نیست؛ فضایی است برای دیدن مسئله از زاویهای تازه، ساختن راهحل و اجرای آن در دنیای واقعی.
|
||||
</p>
|
||||
</div>
|
||||
<div className="grid gap-4 sm:grid-cols-3 lg:grid-cols-1">
|
||||
{[
|
||||
{ icon: Compass, title: "تفکر راهبردی", text: "دیدن مسئله از زاویههای تازه و تبدیل پیچیدگی به تصمیمهای بهتر." },
|
||||
{ icon: Building2, title: "اثر سازمانی", text: "یادگیری مبتنی بر مسئلههای واقعی کسبوکار و صنعت ایران." },
|
||||
{ icon: Network, title: "شبکهی حرفهای", text: "پیوند با مدیران، متخصصان و پژوهشگران برای رشد ماندگار." },
|
||||
].map((item, index) => (
|
||||
<Card key={item.title} className="border-border/70 py-0 shadow-none transition-colors hover:border-primary/25">
|
||||
<CardContent className="flex h-full flex-col gap-5 p-6 lg:flex-row lg:items-center lg:gap-6 lg:p-7">
|
||||
<div className="flex size-12 shrink-0 items-center justify-center rounded-2xl bg-primary/10 text-primary"><item.icon className="size-6" /></div>
|
||||
<div><p className="text-xs font-bold text-primary">۰{index + 1}</p><h3 className="mt-1 text-lg font-bold">{item.title}</h3><p className="mt-2 text-sm leading-7 text-muted-foreground">{item.text}</p></div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Container>
|
||||
</Section>
|
||||
<Section className="overflow-hidden py-0">
|
||||
<Container className="grid max-w-none px-0 lg:grid-cols-2">
|
||||
<div className="relative min-h-80 lg:min-h-[32rem]">
|
||||
<Image src="/brand/campus-collaboration-v1.png" alt="همکاری مدرسان و متخصصان در محیط دانشگاه" fill className="object-cover" sizes="(max-width:1024px) 100vw, 50vw" />
|
||||
</div>
|
||||
<div className="relative flex items-center overflow-hidden bg-chart-3 px-6 py-14 text-background sm:px-12 lg:px-16">
|
||||
<MetamorphField tone="dark" density="sparse" className="opacity-20" />
|
||||
<div className="relative z-[2] max-w-xl">
|
||||
<p className="text-xs font-bold text-background/55">یادگیری در بستر مسئلههای واقعی</p>
|
||||
<Heading level={2} className="mt-3 text-3xl leading-tight text-background sm:text-4xl">جایی برای پیوند دانش دانشگاهی و تجربهی صنعت</Heading>
|
||||
<p className="mt-5 text-base leading-8 text-background/65">دورهها با مشارکت مدرسان دانشگاه، مدیران و متخصصان طراحی میشوند تا آموختهها از کلاس به تصمیم و اجرا برسند.</p>
|
||||
<Link
|
||||
href="/about"
|
||||
className={cn(
|
||||
buttonVariants({ variant: "outline" }),
|
||||
"mt-7 border-background/25 bg-transparent text-background hover:bg-background hover:text-foreground",
|
||||
)}
|
||||
>
|
||||
آشنایی با رویکرد ما
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</Container>
|
||||
</Section>
|
||||
<Section tone="muted" className="py-20 sm:py-24">
|
||||
<Container>
|
||||
<div className="mb-10 flex items-end justify-between gap-4">
|
||||
<div>
|
||||
<p className="text-xs font-bold text-primary">دانش برای عمل</p>
|
||||
<Heading level={2} className="mt-2 text-3xl sm:text-4xl">
|
||||
<Link href="/insights" className="hover:text-primary">
|
||||
{title}
|
||||
</Link>
|
||||
</Heading>
|
||||
</div>
|
||||
<Link
|
||||
href="/insights"
|
||||
className={cn(
|
||||
buttonVariants({ variant: "ghost" }),
|
||||
"hidden gap-2 text-primary sm:inline-flex",
|
||||
)}
|
||||
>
|
||||
همه بینشها <ArrowLeft className="size-4" />
|
||||
</Link>
|
||||
</div>
|
||||
<div className="grid gap-8 sm:grid-cols-2 lg:grid-cols-3 sm:gap-10">
|
||||
{ideaCards.map((article) => (
|
||||
<ArticleCard
|
||||
key={article.id}
|
||||
title={article.title}
|
||||
category={article.category}
|
||||
excerpt={article.excerpt}
|
||||
imageUrl={article.imageUrl}
|
||||
href={article.href}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</Container>
|
||||
</Section>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export function HomeEvents({
|
||||
events,
|
||||
title,
|
||||
seeAllLabel,
|
||||
}: {
|
||||
events: EventItem[];
|
||||
title: string;
|
||||
seeAllLabel: string;
|
||||
}) {
|
||||
return (
|
||||
<Section className="py-20 sm:py-24">
|
||||
<Container>
|
||||
<p className="text-center text-xs font-bold text-primary">در جریان یادگیری</p>
|
||||
<Heading level={2} className="mt-2 text-center text-3xl sm:text-4xl">
|
||||
{title}
|
||||
</Heading>
|
||||
<Separator className="mx-auto mt-5 max-w-16 bg-primary" />
|
||||
<div className="mt-10 grid gap-0 border-y border-border sm:grid-cols-2 lg:grid-cols-4">
|
||||
{events.map((event) => (
|
||||
<EventCard key={event.id} {...event} variant="home" />
|
||||
))}
|
||||
</div>
|
||||
<div className="mt-10 flex justify-center">
|
||||
<DotCta href="/events">{seeAllLabel}</DotCta>
|
||||
</div>
|
||||
</Container>
|
||||
</Section>
|
||||
);
|
||||
}
|
||||
|
||||
export function HomeRest({
|
||||
labels,
|
||||
carouselPrograms,
|
||||
intersections,
|
||||
stats,
|
||||
}: {
|
||||
labels: HomeLabels;
|
||||
carouselPrograms: Program[];
|
||||
intersections: IntersectionTopic[];
|
||||
stats: SiteStat[];
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<Section tone="muted" className="py-20 sm:py-24">
|
||||
<Container>
|
||||
<div className="mb-10 max-w-3xl">
|
||||
<p className="text-xs font-bold text-primary">مرزهای تازهی کسبوکار</p>
|
||||
<Heading level={2} className="mt-2 text-3xl sm:text-4xl">{labels.intersectionsTitle}</Heading>
|
||||
<p className="mt-3 text-lg font-semibold leading-relaxed text-primary sm:text-xl">
|
||||
{labels.intersectionsSubtitle}
|
||||
</p>
|
||||
</div>
|
||||
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
|
||||
{intersections.map((topic) => (
|
||||
<IntersectionCard key={topic.id} {...topic} />
|
||||
))}
|
||||
</div>
|
||||
</Container>
|
||||
</Section>
|
||||
|
||||
<Section className="relative overflow-hidden py-20 sm:py-24">
|
||||
<MetamorphField tone="light" density="sparse" />
|
||||
<Container className="relative z-[1]">
|
||||
<div className="mx-auto mb-10 max-w-2xl text-center">
|
||||
<Heading level={2}>{labels.moreThanDegree}</Heading>
|
||||
<p className="mt-4 text-base leading-relaxed text-muted-foreground sm:text-lg">
|
||||
{labels.moreThanDegreeBody}
|
||||
</p>
|
||||
</div>
|
||||
<ProgramCarousel
|
||||
title=""
|
||||
programs={carouselPrograms}
|
||||
keepExploringLabel={labels.keepExploring}
|
||||
hideTitle
|
||||
/>
|
||||
</Container>
|
||||
</Section>
|
||||
|
||||
<Section tone="dark" className="relative overflow-hidden py-20 sm:py-28">
|
||||
<MetamorphField
|
||||
tone="dark"
|
||||
density="sparse"
|
||||
className="opacity-[0.4]"
|
||||
/>
|
||||
<Container className="relative z-[1] grid gap-12 lg:grid-cols-[1fr_auto] lg:items-end">
|
||||
<div className="max-w-3xl"><p className="text-xs font-bold text-background/60">همکاری با سازمانها</p><Heading level={2} className="mt-3 text-background sm:text-5xl">
|
||||
{labels.hireTitle}
|
||||
</Heading>
|
||||
<p className="mt-5 max-w-2xl text-base leading-relaxed text-background/75 sm:text-lg">
|
||||
{labels.hireBody}
|
||||
</p>
|
||||
</div><div>
|
||||
<DotCta href="/professional" onDark>
|
||||
{labels.registerCta}
|
||||
</DotCta>
|
||||
</div>
|
||||
</Container>
|
||||
</Section>
|
||||
|
||||
<Section className="py-20 sm:py-24">
|
||||
<Container className="max-w-4xl text-center">
|
||||
<Heading
|
||||
level={2}
|
||||
className="text-sm font-bold uppercase tracking-wider text-muted-foreground"
|
||||
>
|
||||
{labels.missionTitle}
|
||||
</Heading>
|
||||
<p className="mt-5 text-2xl font-bold leading-relaxed text-foreground sm:text-3xl">
|
||||
{siteMission}
|
||||
</p>
|
||||
<div className="mt-12 grid gap-6 border-t border-border pt-10 sm:grid-cols-3">
|
||||
{stats.map((stat) => <div key={stat.id}><p className="text-3xl font-black text-primary sm:text-4xl"><AnimatedMetric value={stat.value} /></p><p className="mt-2 text-sm text-muted-foreground">{stat.label}</p></div>)}
|
||||
</div>
|
||||
</Container>
|
||||
</Section>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user