139 lines
5.7 KiB
TypeScript
139 lines
5.7 KiB
TypeScript
import type { Metadata } from "next";
|
|
import Link from "next/link";
|
|
import { notFound } from "next/navigation";
|
|
import Header from "@/components/Header";
|
|
import JsonLd from "@/components/JsonLd";
|
|
import { OG_COMMON, breadcrumbSchema, serviceSchema } from "@/lib/seo";
|
|
import { PHONE_DISPLAY, PHONE_E164 } from "@/lib/site";
|
|
import { EINSATZGEBIET, leistungBySlug, leistungen } from "@/lib/leistungen";
|
|
|
|
export const dynamicParams = false;
|
|
|
|
export function generateStaticParams() {
|
|
return leistungen.map((l) => ({ slug: l.slug }));
|
|
}
|
|
|
|
export async function generateMetadata({
|
|
params,
|
|
}: {
|
|
params: Promise<{ slug: string }>;
|
|
}): Promise<Metadata> {
|
|
const { slug } = await params;
|
|
const l = leistungBySlug(slug);
|
|
if (!l) return {};
|
|
const path = `/leistungen/${l.slug}`;
|
|
return {
|
|
title: l.metaTitle,
|
|
description: l.metaDescription,
|
|
alternates: { canonical: path },
|
|
openGraph: { ...OG_COMMON, title: l.metaTitle, description: l.metaDescription, url: path },
|
|
};
|
|
}
|
|
|
|
export default async function LeistungPage({ params }: { params: Promise<{ slug: string }> }) {
|
|
const { slug } = await params;
|
|
const l = leistungBySlug(slug);
|
|
if (!l) notFound();
|
|
const path = `/leistungen/${l.slug}`;
|
|
|
|
return (
|
|
<div className="min-h-screen bg-[#f0f4f8] dark:bg-[#18212f]">
|
|
<JsonLd
|
|
data={breadcrumbSchema([
|
|
{ name: "Services", path: "/services" },
|
|
{ name: l.name, path },
|
|
])}
|
|
/>
|
|
<JsonLd data={serviceSchema({ name: l.h1, description: l.metaDescription, path })} />
|
|
<Header />
|
|
|
|
<main className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 pt-28 pb-16">
|
|
<nav aria-label="Breadcrumb" className="text-sm text-slate-500 mb-6">
|
|
<Link href="/" className="hover:text-orange-400">Startseite</Link>
|
|
{" / "}
|
|
<Link href="/services" className="hover:text-orange-400">Services</Link>
|
|
{" / "}
|
|
<span className="text-slate-700 dark:text-slate-300">{l.name}</span>
|
|
</nav>
|
|
|
|
<header className="mb-12">
|
|
<span className="text-orange-400 font-mono text-xs font-bold tracking-[0.25em] uppercase">
|
|
IT-Service aus Crailsheim
|
|
</span>
|
|
<h1 className="text-4xl sm:text-5xl font-black text-slate-900 dark:text-white mt-3 mb-4">
|
|
{l.h1}
|
|
</h1>
|
|
<p className="text-slate-600 dark:text-slate-400 text-lg leading-relaxed">{l.intro}</p>
|
|
<div className="flex flex-wrap gap-3 mt-6">
|
|
<Link href="/#contact" className="btn-primary px-6 py-3">Jetzt anfragen</Link>
|
|
<a href={`tel:${PHONE_E164}`} className="btn-secondary px-6 py-3">{PHONE_DISPLAY}</a>
|
|
</div>
|
|
</header>
|
|
|
|
<section className="mb-12 bg-white dark:bg-gray-900 border border-slate-200 dark:border-gray-800 rounded-2xl p-6 sm:p-8">
|
|
<h2 className="text-2xl font-bold text-slate-900 dark:text-white mb-4">Das umfasst unsere Leistung</h2>
|
|
<ul className="grid sm:grid-cols-2 gap-3">
|
|
{l.leistungen.map((item) => (
|
|
<li key={item} className="flex items-start gap-2 text-slate-700 dark:text-slate-300">
|
|
<span className="mt-2 w-1.5 h-1.5 rounded-full bg-orange-400 shrink-0" />
|
|
{item}
|
|
</li>
|
|
))}
|
|
</ul>
|
|
</section>
|
|
|
|
{l.abschnitte.map((a) => (
|
|
<section key={a.h2} className="mb-10">
|
|
<h2 className="text-2xl font-bold text-slate-900 dark:text-white mb-3">{a.h2}</h2>
|
|
{a.text.map((p) => (
|
|
<p key={p} className="text-slate-600 dark:text-slate-400 leading-relaxed mb-3">{p}</p>
|
|
))}
|
|
</section>
|
|
))}
|
|
|
|
<section className="mb-12">
|
|
<h2 className="text-2xl font-bold text-slate-900 dark:text-white mb-4">Häufige Fragen</h2>
|
|
<div className="space-y-3">
|
|
{l.faq.map((f) => (
|
|
<details
|
|
key={f.frage}
|
|
className="bg-white dark:bg-gray-900 border border-slate-200 dark:border-gray-800 rounded-xl p-4 group"
|
|
>
|
|
<summary className="cursor-pointer font-semibold text-slate-900 dark:text-white">
|
|
{f.frage}
|
|
</summary>
|
|
<p className="mt-3 text-slate-600 dark:text-slate-400 leading-relaxed">{f.antwort}</p>
|
|
</details>
|
|
))}
|
|
</div>
|
|
</section>
|
|
|
|
<section className="mb-12 bg-white dark:bg-gray-900 border border-slate-200 dark:border-gray-800 rounded-2xl p-6 sm:p-8">
|
|
<h2 className="text-2xl font-bold text-slate-900 dark:text-white mb-3">Einsatzgebiet</h2>
|
|
<p className="text-slate-600 dark:text-slate-400 leading-relaxed">
|
|
MBO-Tech-IT sitzt in Crailsheim (Mörikestr. 2, 74564 Crailsheim). Wir betreuen Kunden in{" "}
|
|
{EINSATZGEBIET.slice(0, -1).join(", ")} und {EINSATZGEBIET[EINSATZGEBIET.length - 1]} sowie
|
|
in der Umgebung.
|
|
</p>
|
|
</section>
|
|
|
|
<section className="text-center bg-orange-500/10 border border-orange-500/20 rounded-2xl p-8 mb-10">
|
|
<h2 className="text-2xl font-bold text-slate-900 dark:text-white mb-2">Sprechen wir darüber</h2>
|
|
<p className="text-slate-600 dark:text-slate-400 mb-5">
|
|
Schildern Sie uns kurz Ihr Anliegen. Wir melden uns persönlich bei Ihnen.
|
|
</p>
|
|
<Link href="/#contact" className="btn-primary px-8 py-3">Anfrage senden</Link>
|
|
</section>
|
|
|
|
<nav aria-label="Weitere Seiten" className="flex flex-wrap gap-4 text-sm">
|
|
{l.verwandt.map((v) => (
|
|
<Link key={v.href} href={v.href} className="text-orange-400 hover:underline">
|
|
{v.label} →
|
|
</Link>
|
|
))}
|
|
</nav>
|
|
</main>
|
|
</div>
|
|
);
|
|
}
|