70 lines
2.3 KiB
TypeScript
70 lines
2.3 KiB
TypeScript
import type { Metadata } from "next";
|
|
import { getTranslations } from "next-intl/server";
|
|
import { CmsImage } from "@/components/atoms/CmsImage";
|
|
import { Container } from "@/components/atoms/Container";
|
|
import { Heading } from "@/components/atoms/Heading";
|
|
import { Section } from "@/components/atoms/Section";
|
|
import { BadgeLabel } from "@/components/atoms/BadgeLabel";
|
|
import { PageHero } from "@/components/molecules/PageHero";
|
|
import { SurfaceCard } from "@/components/molecules/SurfaceCard";
|
|
import { getAlumniStories } from "@/lib/data/site";
|
|
import { pageMetadata } from "@/lib/seo/metadata";
|
|
|
|
export async function generateMetadata(): Promise<Metadata> {
|
|
const t = await getTranslations("pages");
|
|
return pageMetadata({
|
|
title: t("alumniTitle"),
|
|
description: t("alumniIntro"),
|
|
path: "/alumni",
|
|
});
|
|
}
|
|
|
|
export default async function AlumniPage() {
|
|
const t = await getTranslations("pages");
|
|
const stories = await getAlumniStories();
|
|
|
|
return (
|
|
<main id="main-content">
|
|
<PageHero
|
|
title={t("alumniTitle")}
|
|
intro={t("alumniIntro")}
|
|
imageUrl="/brand/graduation-cap-neural.webp"
|
|
/>
|
|
<Section tone="subtle">
|
|
<Container>
|
|
<div className="grid gap-5 md:grid-cols-3">
|
|
{stories.map((story) => (
|
|
<SurfaceCard
|
|
key={story.id}
|
|
id={story.id}
|
|
padded={false}
|
|
className="scroll-mt-24"
|
|
>
|
|
<div className="relative aspect-[16/10] bg-muted">
|
|
<CmsImage
|
|
src={story.imageUrl}
|
|
alt={story.name}
|
|
fill
|
|
className="object-cover"
|
|
sizes="(max-width:768px) 100vw, 33vw"
|
|
/>
|
|
</div>
|
|
<div className="p-6">
|
|
<BadgeLabel>{story.program}</BadgeLabel>
|
|
<Heading as="h2" level={4} className="mt-3">
|
|
{story.title}
|
|
</Heading>
|
|
<p className="mt-2 text-sm leading-7 text-muted-foreground">
|
|
{story.excerpt}
|
|
</p>
|
|
<p className="mt-4 text-sm font-semibold">{story.name}</p>
|
|
</div>
|
|
</SurfaceCard>
|
|
))}
|
|
</div>
|
|
</Container>
|
|
</Section>
|
|
</main>
|
|
);
|
|
}
|