Finalize multilingual routing and translations
CI / quality (push) Waiting to run

This commit is contained in:
MOH
2026-03-07 14:10:30 +01:00
parent 1ad9ae9629
commit 7f4277d1d7
53 changed files with 2805 additions and 1382 deletions
+93 -98
View File
@@ -1,7 +1,13 @@
import type { Metadata } from "next";
import { Compass, Layers3, Users } from "lucide-react";
import { getTranslations } from "next-intl/server";
import { Container } from "@/components/layout/container";
import { MotionFade } from "@/components/motion-fade";
import { resolveLocale } from "@/lib/site-data";
import { buildLocalizedMetadata } from "@/lib/metadata";
import { resolveLocale } from "@/lib/locale";
import { AppCard } from "@/components/ui/app-card";
import { CardContent } from "@/components/ui/card";
type AboutPageProps = {
params: {
@@ -9,114 +15,103 @@ type AboutPageProps = {
};
};
export default function AboutPage({ params: { locale } }: AboutPageProps) {
export async function generateMetadata({
params: { locale },
}: AboutPageProps): Promise<Metadata> {
const localeKey = resolveLocale(locale);
const t = await getTranslations({ locale: localeKey, namespace: "aboutPage" });
const copy =
localeKey === "de"
? {
title: "Ueber uns",
intro:
"Wir bauen klare digitale Erlebnisse fuer Marken, Produkte und Teams.",
valuesTitle: "Wie wir arbeiten",
valueA: "Strategie zuerst",
valueAText: "Jedes Projekt startet mit Zielbild, Scope und Prioritaeten.",
valueB: "Saubere Systeme",
valueBText: "Wir setzen auf wartbare Komponenten und klare Strukturen.",
valueC: "Enge Zusammenarbeit",
valueCText: "Kurze Schleifen mit direktem Feedback im gesamten Ablauf.",
processTitle: "Unser Ablauf",
processOne: "Discovery und Zieldefinition",
processTwo: "Design und Prototyping",
processThree: "Build, Test und Launch",
}
: {
title: "About",
intro:
"We build clear digital experiences for brands, products and teams.",
valuesTitle: "How we work",
valueA: "Strategy first",
valueAText: "Each project starts with goals, scope and priorities.",
valueB: "Clean systems",
valueBText: "We rely on maintainable components and clear structure.",
valueC: "Close collaboration",
valueCText: "Short loops with direct feedback across the full process.",
processTitle: "Our process",
processOne: "Discovery and goal definition",
processTwo: "Design and prototyping",
processThree: "Build, test and launch",
};
return buildLocalizedMetadata({
locale: localeKey,
pathname: "/about",
title: t("title"),
description: t("intro"),
});
}
export default async function AboutPage({ params: { locale } }: AboutPageProps) {
const localeKey = resolveLocale(locale);
const t = await getTranslations({ locale: localeKey, namespace: "aboutPage" });
return (
<div className="mx-auto flex w-full max-w-6xl flex-col gap-8 px-4 py-10 sm:px-6 lg:px-8 lg:py-14">
<Container className="flex flex-col gap-section py-10 lg:py-14">
<MotionFade>
<section className="rounded-3xl border border-default bg-surface p-6 lg:p-10">
<h1 className="text-3xl font-semibold text-fg sm:text-4xl">
{copy.title}
</h1>
<p className="mt-4 max-w-3xl text-base text-muted sm:text-lg">
{copy.intro}
</p>
</section>
<AppCard level={3}>
<CardContent className="p-6 lg:p-10">
<h1 className="text-3xl font-semibold text-foreground sm:text-4xl">
{t("title")}
</h1>
<p className="mt-4 max-w-3xl text-base text-muted-foreground sm:text-lg">
{t("intro")}
</p>
</CardContent>
</AppCard>
</MotionFade>
<MotionFade delay={0.05}>
<section className="rounded-3xl border border-default bg-surface p-6 lg:p-8">
<h2 className="text-2xl font-semibold text-fg">
{copy.valuesTitle}
</h2>
<div className="mt-6 grid gap-4 md:grid-cols-3">
<article className="rounded-2xl border border-default bg-surface-soft p-5 ">
<Compass className="h-5 w-5 text-muted-strong" />
<h3 className="mt-3 text-lg font-semibold text-fg">
{copy.valueA}
</h3>
<p className="mt-2 text-sm text-muted">
{copy.valueAText}
</p>
</article>
<article className="rounded-2xl border border-default bg-surface-soft p-5 ">
<Layers3 className="h-5 w-5 text-muted-strong" />
<h3 className="mt-3 text-lg font-semibold text-fg">
{copy.valueB}
</h3>
<p className="mt-2 text-sm text-muted">
{copy.valueBText}
</p>
</article>
<article className="rounded-2xl border border-default bg-surface-soft p-5 ">
<Users className="h-5 w-5 text-muted-strong" />
<h3 className="mt-3 text-lg font-semibold text-fg">
{copy.valueC}
</h3>
<p className="mt-2 text-sm text-muted">
{copy.valueCText}
</p>
</article>
</div>
</section>
<AppCard>
<CardContent className="p-6 lg:p-8">
<h2 className="text-2xl font-semibold text-foreground">
{t("valuesTitle")}
</h2>
<div className="mt-6 grid gap-4 md:grid-cols-3">
{[
{
icon: Compass,
title: t("valueA"),
text: t("valueAText"),
},
{
icon: Layers3,
title: t("valueB"),
text: t("valueBText"),
},
{
icon: Users,
title: t("valueC"),
text: t("valueCText"),
},
].map((item) => {
const Icon = item.icon;
return (
<AppCard key={item.title} level={2}>
<CardContent className="p-5">
<Icon className="h-5 w-5 text-brand-primary" />
<h3 className="mt-3 text-lg font-semibold text-foreground">
{item.title}
</h3>
<p className="mt-2 text-sm text-muted-foreground">{item.text}</p>
</CardContent>
</AppCard>
);
})}
</div>
</CardContent>
</AppCard>
</MotionFade>
<MotionFade delay={0.1}>
<section className="rounded-3xl border border-default bg-surface p-6 lg:p-8">
<h2 className="text-2xl font-semibold text-fg">
{copy.processTitle}
</h2>
<ol className="mt-5 grid gap-3 sm:grid-cols-3">
{[copy.processOne, copy.processTwo, copy.processThree].map((step, index) => (
<li
key={step}
className="rounded-xl border border-default bg-surface-soft p-4 text-sm text-muted-strong text-muted-strong"
>
<span className="mb-2 inline-flex h-6 w-6 items-center justify-center rounded-full bg-surface-elevated text-xs font-semibold text-muted-strong">
{index + 1}
</span>
<p>{step}</p>
</li>
))}
</ol>
</section>
<AppCard>
<CardContent className="p-6 lg:p-8">
<h2 className="text-2xl font-semibold text-foreground">
{t("processTitle")}
</h2>
<ol className="mt-5 grid gap-3 sm:grid-cols-3">
{[t("processOne"), t("processTwo"), t("processThree")].map((step, index) => (
<AppCard key={step} level={2}>
<CardContent className="p-4">
<span className="mb-2 inline-flex h-6 w-6 items-center justify-center rounded-pill bg-surface-1 text-xs font-semibold text-foreground/80">
{index + 1}
</span>
<p className="text-sm text-foreground/80">{step}</p>
</CardContent>
</AppCard>
))}
</ol>
</CardContent>
</AppCard>
</MotionFade>
</div>
</Container>
);
}