feat: build official Goldebek municipal website
Deploy / validate-dispatch (push) Successful in 1s
Deploy / scheduled-rebuild-dev (push) Skipped
Deploy / scheduled-rebuild-master (push) Skipped
Deploy / rollback-dev (push) Skipped
Deploy / rollback-master (push) Skipped
Deploy / changes (push) Successful in 6s
Deploy / app-quality (push) Successful in 1m16s
Deploy / secret-scan (push) Successful in 4s
Deploy / security-deps (push) Successful in 18s
Deploy / context (push) Successful in 1s
Deploy / app-image (push) Successful in 1m28s
Deploy / deploy-master (push) Skipped
Deploy / deploy-dev (push) Successful in 13s

This commit is contained in:
Per Hoener
2026-09-19 15:09:27 +02:00
parent ff9474f916
commit b57c24a3c4
64 changed files with 1116 additions and 619 deletions
@@ -0,0 +1,10 @@
import { describe, expect, it } from "vitest";
import { assertUnique, eventSchema, newsSchema } from "../lib/content/schemas";
describe("Content-Schemata",()=>{
it("akzeptiert einen vollständigen bestätigten Termin",()=>{expect(eventSchema.parse({id:"1",slug:"dorffest",title:"Dorffest",startDate:"2026-10-01",startTime:"18:00",timezone:"Europe/Berlin",sourceUrl:"https://example.com/termin",sourceName:"Amtliche Quelle",lastVerified:"2026-09-18",status:"verified"}).slug).toBe("dorffest");});
it("weist ungültige Daten zurück",()=>{expect(()=>eventSchema.parse({id:"1",slug:"termin",title:"Termin",startDate:"2026-02-31",timezone:"Europe/Berlin",sourceUrl:"https://example.com",sourceName:"Quelle",lastVerified:"2026-09-18",status:"verified"})).toThrow();});
it("verlangt bei einer Straßenadresse die Datenschutzfreigabe",()=>{expect(()=>eventSchema.parse({id:"1",slug:"termin",title:"Termin",startDate:"2026-10-01",timezone:"Europe/Berlin",location:"Dorfstraße 12",sourceUrl:"https://example.com",sourceName:"Quelle",lastVerified:"2026-09-18",status:"verified"})).toThrow(/privacyApproved/);});
it("validiert eine Meldung",()=>{expect(newsSchema.parse({id:"1",slug:"meldung",title:"Meldung",teaser:"Teaser",body:"Inhalt",publishedAt:"2026-09-18",lastVerified:"2026-09-18",status:"published"}).status).toBe("published");});
it("findet doppelte Slugs",()=>{expect(()=>assertUnique([{slug:"a"},{slug:"a"}],(item)=>item.slug,"Slug")).toThrow(/Doppelter/);});
});
+17
View File
@@ -0,0 +1,17 @@
import { describe, expect, it } from "vitest";
import type { Event } from "../lib/content/schemas";
import { dateInBerlin, eventDateTimeIso, formatGermanDate, partitionEvents, sortEvents } from "../lib/dates/events";
const event=(overrides:Partial<Event>):Event=>({id:"id",slug:"termin",title:"Termin",startDate:"2026-09-20",timezone:"Europe/Berlin",sourceUrl:"https://example.com",sourceName:"Quelle",lastVerified:"2026-09-18",status:"verified",...overrides});
describe("Terminsortierung und Archiv",()=>{
it("sortiert nach Datum und Uhrzeit",()=>{const result=sortEvents([event({id:"b",slug:"b",startDate:"2026-10-01"}),event({id:"a",slug:"a",startDate:"2026-09-20",startTime:"18:00"})]);expect(result.map((item)=>item.id)).toEqual(["a","b"]);});
it("ordnet vergangene Termine automatisch ins Archiv ein",()=>{const result=partitionEvents([event({id:"past",slug:"past",startDate:"2026-09-18"}),event({id:"today",slug:"today",startDate:"2026-09-19"}),event({id:"future",slug:"future",startDate:"2026-09-20"})],"2026-09-19");expect(result.archive.map((item)=>item.id)).toEqual(["past"]);expect(result.upcoming.map((item)=>item.id)).toEqual(["today","future"]);});
it("zeigt needs-verification nicht öffentlich",()=>{const result=partitionEvents([event({status:"needs-verification"})],"2026-09-19");expect(result.upcoming).toHaveLength(0);});
});
describe("Europe/Berlin-Datumslogik",()=>{
it("berücksichtigt den Berliner Tageswechsel",()=>{expect(dateInBerlin(new Date("2026-03-28T23:30:00Z"))).toBe("2026-03-29");});
it("berechnet den deutschen Wochentag aus dem ISO-Datum",()=>{expect(formatGermanDate("2026-09-20")).toBe("Sonntag, 20. September 2026");});
it("setzt den korrekten Sommer- und Winterzeit-Offset",()=>{expect(eventDateTimeIso("2026-09-20","11:00")).toContain("+02:00");expect(eventDateTimeIso("2026-12-06","11:00")).toContain("+01:00");});
});
+93
View File
@@ -0,0 +1,93 @@
import type { Metadata } from "next";
import Image from "next/image";
import Link from "next/link";
import { notFound } from "next/navigation";
import pagesJson from "../../../content/pages/pages.json";
import clubsJson from "../../../data/clubs.json";
import councilJson from "../../../data/council.json";
import municipalityJson from "../../../data/municipality.json";
import servicesJson from "../../../data/services.json";
import coatOfArms from "../../../goldebek_website_briefing/DEU_Goldebek_wappen.svg";
import doerpshuusImage from "../../../goldebek_website_briefing/csm_goldebek_1_0714260009.jpg";
import placeImage from "../../../goldebek_website_briefing/csm_nordfriesland_goldebek_mr_240320_388_2bb06f3278.jpg";
import PageHeader from "@/components/PageHeader";
import SourceNote from "@/components/SourceNote";
import { getSource } from "@/lib/content";
import { formatGermanDate } from "@/lib/dates/events";
import { createPageMetadata } from "@/lib/metadata";
type PageLink = { label: string; href: string; external?: boolean };
type Section = { title: string; text?: string[]; items?: string[]; links?: PageLink[] };
type ContentPage = { slug: string; eyebrow: string; title: string; intro: string; sections: Section[]; sourceId?: string; lastVerified?: string; special?: string };
const pages = pagesJson as ContentPage[];
export function generateStaticParams() {
return pages.map((page) => ({ slug: page.slug.split("/") }));
}
export async function generateMetadata({ params }: { params: Promise<{ slug: string[] }> }): Promise<Metadata> {
const slug = (await params).slug.join("/");
const page = pages.find((item) => item.slug === slug);
return page ? createPageMetadata({ title: page.title, description: page.intro, path: `/${page.slug}` }) : {};
}
function ExternalAwareLink({ link }: { link: PageLink }) {
if (link.external) {
return <a href={link.href} target="_blank" rel="noreferrer">{link.label} <span className="sr-only">(öffnet in neuem Fenster)</span><span aria-hidden="true">↗</span></a>;
}
return <Link href={link.href}>{link.label}</Link>;
}
function phoneUrl(value: string) { return `tel:${value.replace(/[^+\d]/g, "")}`; }
function SpecialContent({ type }: { type?: string }) {
if (type === "overview") {
return <figure className="content-image"><Image src={placeImage} alt="Goldebeker Wappenstein am Ortseingang" sizes="(max-width: 800px) 100vw, 760px" /><figcaption>Goldebek in Nordfriesland</figcaption></figure>;
}
if (type === "coat-of-arms") {
return <figure className="coat-of-arms"><Image src={coatOfArms} alt="Offizielles Wappen der Gemeinde Goldebek" /><figcaption>Das Gemeindewappen wird unverändert wiedergegeben.</figcaption></figure>;
}
if (type === "facts") {
return <dl className="data-grid"><div><dt>Einwohner</dt><dd>{municipalityJson.population.value}</dd><small>Stand 31.03.2026</small></div><div><dt>Fläche</dt><dd>{municipalityJson.areaKm2.toLocaleString("de-DE")} km²</dd></div><div><dt>Dichte</dt><dd>{municipalityJson.population.densityPerKm2} Einwohner/km²</dd></div><div><dt>Postleitzahl</dt><dd>{municipalityJson.postalCode}</dd></div><div><dt>Gemeindeschlüssel</dt><dd>{municipalityJson.officialMunicipalityKey}</dd></div><div><dt>Amt</dt><dd>{municipalityJson.administration}</dd></div></dl>;
}
if (type === "history") {
return <ol className="timeline">{municipalityJson.history.map((item) => <li key={`${item.date}-${item.title}`}><time>{item.date}</time><div><h3>{item.title}</h3><p>{item.text}</p></div></li>)}</ol>;
}
if (type === "doerpshuus") {
const item = servicesJson.doerpshuus;
return <><figure className="content-image"><Image src={doerpshuusImage} alt="Dörpshuus Goldebek mit Backsteinfassade und Grünanlage" sizes="(max-width: 800px) 100vw, 760px" /><figcaption>Dörpshuus Goldebek, Am Brodersberg 16</figcaption></figure><dl className="detail-list"><div><dt>Adresse</dt><dd>{item.address}</dd></div><div><dt>Service-Telefon</dt><dd><a href={phoneUrl(item.phone)}>{item.phone}</a></dd></div><div><dt>Kapazität</dt><dd>{item.capacity.hall} Personen im Dörpshuus, {item.capacity.fireBrigadeRoom} im Kameradschaftsraum, maximal {item.capacity.total} insgesamt</dd></div><div><dt>Gebühren</dt><dd>Einwohner {item.fees.residents} · Kameradschaftsraum {item.fees.fireBrigadeRoom} · Auswärtige {item.fees.nonResidents} · Endreinigung {item.fees.finalCleaning} · Fehlbenutzung Notausgang {item.fees.emergencyExitMisuse}</dd></div></dl></>;
}
if (type === "clubs") {
return <div className="card-grid">{clubsJson.map((club) => <article className="info-card" key={club.name}><p className="card-label">{club.type}</p><h2>{club.name}</h2>{club.url ? <a className="text-link" href={club.url} target="_blank" rel="noreferrer">Website öffnen <span className="sr-only">(öffnet in neuem Fenster)</span><span aria-hidden="true">↗</span></a> : null}</article>)}</div>;
}
if (type === "everyday-help") {
const item = servicesJson.everydayHelp;
return <><div className="data-grid"><div><span className="card-label">Kosten</span><strong>{item.hourly}</strong></div><div><span className="card-label">Fahrtkosten</span><strong>{item.mileage}</strong></div></div><section className="content-section"><h2>Beispiele</h2><ul>{item.examples.map((example) => <li key={example}>{example}</li>)}</ul><p><strong>Für Goldebek:</strong> {item.contact}, <a href={phoneUrl(item.phone)}>{item.phone}</a></p><p><strong>Beteiligte Gemeinden:</strong> {item.coverage.join(", ")}</p></section></>;
}
if (type === "council") {
return <><section className="contact-panel"><p className="card-label">Bürgermeister</p><h2>{councilJson.mayor.name}</h2><address>{councilJson.mayor.address}<br /><a href={phoneUrl(councilJson.mayor.phone)}>{councilJson.mayor.phone}</a><br />Fax {councilJson.mayor.fax}</address></section><div className="people-grid">{councilJson.members.map((name) => <article key={name}><span aria-hidden="true">{name.split(" ").map((part) => part[0]).join("")}</span><h3>{name}</h3><p>Mitglied der Gemeindevertretung</p></article>)}</div></>;
}
if (type === "taxes") {
const tax = councilJson.taxRates;
return <dl className="data-grid"><div><dt>Grundsteuer A</dt><dd>{tax.grundsteuerA}</dd></div><div><dt>Grundsteuer B</dt><dd>{tax.grundsteuerB}</dd></div><div><dt>Gewerbesteuer</dt><dd>{tax.gewerbesteuer}</dd></div><div><dt>1. Hund</dt><dd>{tax.firstDog}</dd></div><div><dt>2. Hund</dt><dd>{tax.secondDog}</dd></div><div><dt>Jeder weitere Hund</dt><dd>{tax.additionalDog}</dd></div></dl>;
}
if (type === "mobility") {
const item = servicesJson.mobility;
const source = getSource(item.sourceId);
return <><div className="route-number"><span>Buslinie</span><strong>{item.line}</strong></div><section className="content-section"><h2>Haltestellen</h2><ul>{item.stops.map((stop) => <li key={stop}>{stop}</li>)}</ul>{source ? <a className="button button--primary" href={source.url} target="_blank" rel="noreferrer">Aktuellen Fahrplan öffnen <span aria-hidden="true">↗</span></a> : null}</section></>;
}
if (type === "mobile-library") {
const item = servicesJson.mobileLibrary;
return <><dl className="detail-list"><div><dt>Haltestelle</dt><dd>{item.stop}</dd></div><div><dt>Uhrzeit</dt><dd>{item.time} Uhr</dd></div></dl><section className="content-section"><h2>Kommende Termine 2026</h2><ul>{item.dates.map((date) => <li key={date}>{formatGermanDate(date)}</li>)}</ul></section></>;
}
return null;
}
export default async function ContentPageRoute({ params }: { params: Promise<{ slug: string[] }> }) {
const slug = (await params).slug.join("/");
const page = pages.find((item) => item.slug === slug);
if (!page) notFound();
const parent = page.slug.includes("/") ? pages.find((item) => item.slug === page.slug.split("/")[0]) : undefined;
const source = page.sourceId ? getSource(page.sourceId) : undefined;
return <><PageHeader eyebrow={page.eyebrow} title={page.title} intro={page.intro} breadcrumbs={[...(parent ? [{ label: parent.title, href: `/${parent.slug}` }] : []), { label: page.title }]} /><div className="container page-content"><SpecialContent type={page.special} />{page.sections.map((section) => <section className="content-section" key={section.title}><h2>{section.title}</h2>{section.text?.map((paragraph) => <p key={paragraph}>{paragraph}</p>)}{section.items ? <ul>{section.items.map((item) => <li key={item}>{item}</li>)}</ul> : null}{section.links ? <div className="link-list">{section.links.map((link) => <ExternalAwareLink key={link.href} link={link} />)}</div> : null}</section>)}{page.lastVerified ? <SourceNote lastVerified={page.lastVerified} sourceName={source?.name} sourceUrl={source?.url} /> : null}</div></>;
}
+11
View File
@@ -0,0 +1,11 @@
import type { Metadata } from "next";
import { notFound } from "next/navigation";
import PageHeader from "@/components/PageHeader";
import SourceNote from "@/components/SourceNote";
import { getNews, getNewsItem } from "@/lib/content";
import { formatShortDate } from "@/lib/dates/events";
import { createPageMetadata } from "@/lib/metadata";
export function generateStaticParams() { return getNews().map((item) => ({ slug:item.slug })); }
export async function generateMetadata({ params }: { params:Promise<{slug:string}> }):Promise<Metadata> { const item=getNewsItem((await params).slug); return item ? { ...createPageMetadata({title:item.title,description:item.teaser,path:`/aktuelles/${item.slug}`,type:"article"}), openGraph:{title:item.title,description:item.teaser,type:"article",url:`/aktuelles/${item.slug}`,publishedTime:item.publishedAt,modifiedTime:item.updatedAt,images:[]},twitter:{title:item.title,description:item.teaser,images:[]} } : {}; }
export default async function NewsDetail({ params }: { params:Promise<{slug:string}> }) { const item=getNewsItem((await params).slug); if(!item) notFound(); return <><PageHeader eyebrow={`Meldung vom ${formatShortDate(item.publishedAt)}`} title={item.title} intro={item.teaser} breadcrumbs={[{label:"Aktuelles",href:"/aktuelles"},{label:item.title}]} /><article className="container narrow-content prose"><p>{item.body}</p><SourceNote lastVerified={item.lastVerified} sourceName={item.sourceName} sourceUrl={item.sourceUrl} /></article></>; }
+10
View File
@@ -0,0 +1,10 @@
import type { Metadata } from "next";
import Link from "next/link";
import PageHeader from "@/components/PageHeader";
import { getNews } from "@/lib/content";
import { formatShortDate } from "@/lib/dates/events";
import { createPageMetadata } from "@/lib/metadata";
export const metadata: Metadata = createPageMetadata({ title:"Aktuelles", description:"Aktuelle Meldungen aus Goldebek.", path:"/aktuelles" });
export default function NewsPage() { const news = getNews(); return <><PageHeader eyebrow="Aus der Gemeinde" title="Aktuelles" intro="Nachrichten aus Gemeinde, Projekten und Dorfgemeinschaft – sachlich und auf dem aktuellen Stand." breadcrumbs={[{label:"Aktuelles"}]} /><div className="container page-content"><div className="news-grid">{news.map((item) => <article className="news-card" key={item.id}><p className="news-date">{formatShortDate(item.publishedAt)}</p><h2><Link href={`/aktuelles/${item.slug}`}>{item.title}</Link></h2><p>{item.teaser}</p><Link className="text-link" href={`/aktuelles/${item.slug}`}>Weiterlesen <span aria-hidden="true">→</span></Link></article>)}</div></div></>; }
+6
View File
@@ -0,0 +1,6 @@
import type { Metadata } from "next";
import LegalPlaceholder from "@/components/LegalPlaceholder";
import { createPageMetadata } from "@/lib/metadata";
export const metadata: Metadata=createPageMetadata({title:"Barrierefreiheit",description:"Redaktioneller Platzhalter für die Erklärung zur Barrierefreiheit.",path:"/barrierefreiheit",noindex:true});
export default function AccessibilityPage(){return <LegalPlaceholder title="Erklärung zur Barrierefreiheit" intro="Informationen zur barrierefreien Zugänglichkeit dieser kommunalen Website."><h2>Erklärung in Vorbereitung</h2><p>Die rechtsverbindliche Erklärung, Angaben zum Prüfstand, bekannte Einschränkungen und die zuständige Beschwerdestelle werden nach Prüfung und Freigabe ergänzt.</p></LegalPlaceholder>}
-21
View File
@@ -1,21 +0,0 @@
import type { Metadata } from "next";
import PageEffects from "../../components/PageEffects";
import PhotoSlider from "../../components/PhotoSlider";
import { galleryYears } from "../../data/galleryYears";
import { createPageMetadata } from "../../lib/metadata";
export const metadata: Metadata = createPageMetadata({ title: "Bilder", description: "Neutrale Bildergalerie.", path: "/bilder" });
export default function PicturesPage() {
return (
<div className="about-v2">
<header className="about-header about-header--hero-camp2"><div className="about-header__overlay" /><div className="about-header__content"><h1>Bilder</h1><p>Platzhalter für Bilder und externe Galerien.</p></div></header>
<section className="about-block reveal"><div className="about-block__inner"><PhotoSlider /></div></section>
<section className="about-block about-block--alt reveal"><div className="about-block__inner">
<div className="about-block__head"><span className="about-eyebrow">Galerien</span><h2>Galerieübersicht</h2></div>
{galleryYears.length ? <div className="bilder-grid">{galleryYears.map((year) => <article className="bilder-card" key={year.year}><h2>{year.year}</h2><ul className="bilder-link-list">{year.items.map((item) => <li key={item.label}>{item.link ? <a href={item.link} target="_blank" rel="noopener noreferrer">{item.label}</a> : <span>{item.label}</span>}</li>)}</ul></article>)}</div> : <p className="muted">Noch keine Galerien hinterlegt.</p>}
</div></section>
<PageEffects once={false} />
</div>
);
}
+4 -21
View File
@@ -1,23 +1,6 @@
import type { Metadata } from "next";
import { createPageMetadata } from "../../lib/metadata";
import { COMPANY_NAME, CONTACT_ADDRESS, CONTACT_EMAIL, SITE_URL } from "../../lib/site";
import LegalPlaceholder from "@/components/LegalPlaceholder";
import { createPageMetadata } from "@/lib/metadata";
export const metadata: Metadata = createPageMetadata({ title: "Datenschutz", description: "Platzhalter für Datenschutzhinweise.", path: "/datenschutz", noindex: true });
export default function PrivacyPage() {
return (
<section className="container legal-page">
<header className="page-header"><h1>Datenschutz</h1><p>Neutrale Vorlage – vor Veröffentlichung rechtlich prüfen und vervollständigen.</p></header>
<div className="legal-content">
<h2>Verantwortliche Stelle</h2>
<p>{COMPANY_NAME}<br />{CONTACT_ADDRESS}<br />E-Mail: <a href={`mailto:${CONTACT_EMAIL}`}>{CONTACT_EMAIL}</a></p>
<h2>Geltungsbereich</h2>
<p>Diese Platzhalterseite bezieht sich auf <a href={SITE_URL}>{SITE_URL}</a>.</p>
<h2>Technischer Betrieb</h2>
<p>Beim Abruf der Website können technisch erforderliche Zugriffsdaten verarbeitet werden. Passen Sie diesen Abschnitt an Hosting, Formulare, Cookies, eingebundene Dienste und tatsächliche Verarbeitungen an.</p>
<h2>Hinweis</h2>
<p>Dieser Text ist keine vollständige Datenschutzerklärung und keine Rechtsberatung.</p>
</div>
</section>
);
}
export const metadata: Metadata=createPageMetadata({title:"Datenschutz",description:"Redaktioneller Platzhalter für die Datenschutzhinweise der Gemeinde Goldebek.",path:"/datenschutz",noindex:true});
export default function PrivacyPage(){return <LegalPlaceholder title="Datenschutz" intro="Hinweise zur Verarbeitung personenbezogener Daten auf dieser Website."><h2>Datensparsame Grundkonfiguration</h2><p>Die Website lädt keine Marketing-Tracker, keine externen Schriftarten und keine eingebetteten Karten oder Videos von Drittanbietern. Die vollständigen Pflichtinformationen werden nach rechtlicher Freigabe ergänzt.</p></LegalPlaceholder>}
-22
View File
@@ -1,22 +0,0 @@
import type { Metadata } from "next";
import Link from "next/link";
import { notFound } from "next/navigation";
import { getAllTripReports, getTripReport } from "@/trip-reports";
import JsonLd from "../../../components/JsonLd";
import { createPageMetadata } from "../../../lib/metadata";
import { COMPANY_NAME, SITE_URL } from "../../../lib/site";
import { createExcerpt } from "../../../utils/postUtils";
interface TripPageProps { params: Promise<{ slug: string }>; }
export const dynamicParams = false;
export async function generateStaticParams() { return (await getAllTripReports()).filter((post) => post.metadata.published).map((post) => ({ slug: post.metadata.slug })); }
export async function generateMetadata({ params }: TripPageProps): Promise<Metadata> { const { slug } = await params; const post = await getTripReport(slug); return post?.metadata.published ? createPageMetadata({ title: post.metadata.title, description: createExcerpt(post.metadata.plainText, 160), path: `/fahrten/${post.metadata.slug}`, type: "article" }) : {}; }
export default async function TripPage({ params }: TripPageProps) {
const { slug } = await params;
const post = await getTripReport(slug);
if (!post?.metadata.published) notFound();
const ReportContent = post.Component;
const jsonLd = { "@context": "https://schema.org", "@type": "BlogPosting", headline: post.metadata.title, dateModified: new Date(post.metadata.updatedAt).toISOString(), author: { "@type": "Person", name: post.metadata.author }, publisher: { "@type": "Organization", name: COMPANY_NAME }, mainEntityOfPage: `${SITE_URL}/fahrten/${post.metadata.slug}`, articleBody: post.metadata.plainText };
return <div className="container page-spacing post-detail-page"><JsonLd data={jsonLd} /><Link className="back-link" href="/fahrten">&larr; Zur Beitragsübersicht</Link><article className="post-card post-detail-card"><header><h1>{post.metadata.title}</h1><p className="post-meta">Von {post.metadata.author}</p></header><div className="markdown-content"><ReportContent /></div></article></div>;
}
-25
View File
@@ -1,25 +0,0 @@
import type { Metadata } from "next";
import Link from "next/link";
import { getAllTripReports } from "@/trip-reports";
import JsonLd from "../../components/JsonLd";
import PageEffects from "../../components/PageEffects";
import { createPageMetadata } from "../../lib/metadata";
import { SITE_URL } from "../../lib/site";
import { createExcerpt } from "../../utils/postUtils";
export const metadata: Metadata = createPageMetadata({ title: "Beiträge", description: "Übersicht veröffentlichter Beiträge.", path: "/fahrten" });
export default async function TripsPage() {
const posts = (await getAllTripReports()).filter((post) => post.metadata.published).sort((a, b) => new Date(b.metadata.createdAt).getTime() - new Date(a.metadata.createdAt).getTime());
const collectionJsonLd = { "@context": "https://schema.org", "@type": "CollectionPage", name: "Beiträge", url: `${SITE_URL}/fahrten`, hasPart: posts.slice(0, 20).map((post) => ({ "@type": "BlogPosting", headline: post.metadata.title, url: `${SITE_URL}/fahrten/${post.metadata.slug}`, author: { "@type": "Person", name: post.metadata.author } })) };
return (
<div className="about-v2">
<JsonLd data={collectionJsonLd} />
<header className="about-header about-header--hero-camp1"><div className="about-header__overlay" /><div className="about-header__content"><h1>Beiträge</h1><p>Platzhalter für redaktionelle Inhalte.</p></div></header>
<section className="about-block reveal"><div className="about-block__inner">
{posts.length ? <div className="post-grid post-grid--v2">{posts.map((post) => <Link href={`/fahrten/${post.metadata.slug}`} className="post-card-link" key={post.metadata.slug}><article className="post-card post-preview-card"><header><h3>{post.metadata.title}</h3><p className="post-meta">Von {post.metadata.author}</p></header><p className="post-preview-text">{createExcerpt(post.metadata.plainText, 240)}</p><span className="post-preview-link">Weiterlesen</span></article></Link>)}</div> : <p className="about-block__empty">Noch keine Beiträge veröffentlicht.</p>}
</div></section>
<PageEffects threshold={0} rootMargin="0px" />
</div>
);
}
+4 -19
View File
@@ -1,21 +1,6 @@
import type { Metadata } from "next";
import { createPageMetadata } from "../../lib/metadata";
import { COMPANY_NAME, CONTACT_ADDRESS, CONTACT_EMAIL, CONTACT_PHONE, SITE_URL, toPhoneUrl } from "../../lib/site";
import LegalPlaceholder from "@/components/LegalPlaceholder";
import { createPageMetadata } from "@/lib/metadata";
export const metadata: Metadata = createPageMetadata({ title: "Impressum", description: "Platzhalter für rechtliche Anbieterangaben.", path: "/impressum", noindex: true });
export default function LegalNoticePage() {
return (
<section className="container legal-page">
<header className="page-header"><h1>Impressum</h1><p>Neutrale Vorlage – vor Veröffentlichung rechtlich prüfen und vervollständigen.</p></header>
<div className="legal-content">
<h2>Diensteanbieter</h2>
<p><b>{COMPANY_NAME}</b><br />{CONTACT_ADDRESS}</p>
<h2>Kontakt</h2>
<p>Telefon: <a href={toPhoneUrl(CONTACT_PHONE)}>{CONTACT_PHONE}</a><br />E-Mail: <a href={`mailto:${CONTACT_EMAIL}`}>{CONTACT_EMAIL}</a><br />Website: <a href={SITE_URL}>{SITE_URL}</a></p>
<h2>Hinweis</h2>
<p>Dieser Text ist nur ein technischer Platzhalter und keine Rechtsberatung. Ergänzen Sie alle für Ihr Projekt erforderlichen Pflichtangaben.</p>
</div>
</section>
);
}
export const metadata: Metadata=createPageMetadata({title:"Impressum",description:"Redaktioneller Platzhalter für das Impressum der Gemeinde Goldebek.",path:"/impressum",noindex:true});
export default function ImprintPage(){return <LegalPlaceholder title="Impressum" intro="Anbieterkennzeichnung der Gemeinde Goldebek."><h2>Vor Veröffentlichung zu ergänzen</h2><p>Verantwortlichkeit, Vertretungsberechtigung, zuständige Aufsicht und weitere rechtlich erforderliche Angaben werden nach Freigabe eingepflegt.</p></LegalPlaceholder>}
-67
View File
@@ -1,67 +0,0 @@
import type { Metadata } from "next";
import { Fragment } from "react";
import PacklisteIcon from "../../components/PacklisteIcon";
import PageEffects from "../../components/PageEffects";
import RichTextParagraph from "../../components/RichTextParagraph";
import { downloads } from "../../data/downloads";
import { packlisteBasics, packlisteIntro, packlisteItems, packlisteTips } from "../../data/packliste";
import { createPageMetadata } from "../../lib/metadata";
export const metadata: Metadata = createPageMetadata({
title: "Informationen",
description: "Neutrale Seite für Informationen und Downloads.",
path: "/informationen",
});
function getFileIcon(filename: string): string {
const extension = filename.toLowerCase().split(".").pop() || "";
if (extension === "pdf") return "\u{1F4C4}";
if (["doc", "docx", "txt"].includes(extension)) return "\u{1F4DD}";
return "\u{1F4CE}";
}
export default function InformationPage() {
return (
<div className="about-v2 about-v2--info">
<header className="about-header about-header--hero-camp">
<div className="about-header__overlay" />
<div className="about-header__content"><h1>Informationen</h1><p>Platzhalter für strukturierte Informationen und Dokumente.</p></div>
</header>
<section className="about-block reveal">
<div className="about-block__inner">
<div className="about-block__head"><span className="about-eyebrow">Bausteine</span><h2>Informationsbereiche</h2></div>
<div className="packliste">
<div className="packliste__intro">{packlisteIntro.map((paragraph) => <RichTextParagraph text={paragraph} key={paragraph} />)}</div>
<div className="packliste__callout">
<div className="packliste__callout-icon" aria-hidden="true"><PacklisteIcon name={packlisteBasics.icon} size={20} /></div>
<div className="packliste__callout-body"><h4>{packlisteBasics.title}</h4>{packlisteBasics.paragraphs.map((paragraph) => <RichTextParagraph text={paragraph} key={paragraph} />)}</div>
</div>
<div className="packliste__grid">
{packlisteItems.map((item) => (
<article className="packliste__item" key={item.title}>
<div className="packliste__item-header"><span className="packliste__item-icon" aria-hidden="true"><PacklisteIcon name={item.icon} size={18} /></span><h4>{item.title}</h4></div>
{item.paragraphs.map((paragraph, index) => (
<Fragment key={paragraph}><RichTextParagraph text={paragraph} />{index === 0 && item.bullets?.length ? <ul>{item.bullets.map((bullet) => <li key={bullet}>{bullet}</li>)}</ul> : null}</Fragment>
))}
</article>
))}
</div>
<div className="packliste__tips"><h4>{packlisteTips.title}</h4>{packlisteTips.paragraphs.map((paragraph) => <RichTextParagraph text={paragraph} key={paragraph} />)}</div>
</div>
</div>
</section>
<section className="about-block about-block--alt reveal">
<div className="about-block__inner">
<div className="about-block__head"><span className="about-eyebrow">Dateien</span><h2>Downloads</h2></div>
{downloads.length ? <div className="download-grid">{downloads.map((download) => (
<a href={download.download_url} download className="download-card" title={`Download: ${download.name}`} key={download.download_url}>
<div className="download-header"><span className="download-icon">{getFileIcon(download.name)}</span><h3 className="download-name">{download.name}</h3></div>
<p className="download-description">{download.description}</p>
</a>
))}</div> : <p className="muted">Noch keine Downloads hinterlegt.</p>}
</div>
</section>
<PageEffects threshold={0} rootMargin="0px" />
</div>
);
}
-25
View File
@@ -1,25 +0,0 @@
import type { Metadata } from "next";
import EventsView from "../../components/EventsView";
import PageEffects from "../../components/PageEffects";
import { createPageMetadata } from "../../lib/metadata";
export const metadata: Metadata = createPageMetadata({
title: "Kalender",
description: "Kommende Termine im Kalenderüberblick.",
path: "/kalender",
});
export const dynamic = "force-dynamic";
export default function CalendarPage() {
return (
<div className="about-v2">
<header className="about-header about-header--hero-camp2">
<div className="about-header__overlay" />
<div className="about-header__content"><h1>Kalender</h1><p>Termine aus der konfigurierten Kalenderquelle.</p></div>
</header>
<section className="about-block reveal"><div className="about-block__inner"><EventsView mode="calendar" /></div></section>
<PageEffects once={false} />
</div>
);
}
+18 -20
View File
@@ -1,19 +1,9 @@
import type { Metadata, Viewport } from "next";
import { connection } from "next/server";
import type { ReactNode } from "react";
import Footer from "../components/Footer";
import Header from "../components/Header";
import ScrollToTop from "../components/ScrollToTop";
import { SITE_NAME, SITE_URL } from "../lib/site";
import "../styles/base.css";
import "../styles/layout.css";
import "../styles/components.css";
import "../styles/hero.css";
import "../styles/about.css";
import "../styles/calendar.css";
import "../styles/packliste.css";
import "../styles/post.css";
import "../styles/PhotoSlider.css";
import "../styles/goldebek.css";
export const metadata: Metadata = {
metadataBase: new URL(SITE_URL),
@@ -21,7 +11,22 @@ export const metadata: Metadata = {
default: SITE_NAME,
template: `%s | ${SITE_NAME}`,
},
icons: { icon: "/logo.svg" },
description: "Offizielle Website der Gemeinde Goldebek in Nordfriesland.",
openGraph: {
type: "website",
locale: "de_DE",
siteName: SITE_NAME,
title: SITE_NAME,
description: "Offizielle Website der Gemeinde Goldebek in Nordfriesland.",
url: SITE_URL,
images: [{ url: "/og.png", width: 1200, height: 630, alt: "Gemeinde Goldebek – Moin in Goldebek" }],
},
twitter: {
card: "summary_large_image",
title: SITE_NAME,
description: "Offizielle Website der Gemeinde Goldebek in Nordfriesland.",
images: ["/og.png"],
},
};
export const viewport: Viewport = {
@@ -29,15 +34,9 @@ export const viewport: Viewport = {
initialScale: 1,
};
export default async function RootLayout({ children }: Readonly<{ children: ReactNode }>) {
await connection();
export default function RootLayout({ children }: Readonly<{ children: ReactNode }>) {
return (
<html lang="de">
<head>
<link rel="preload" href="/fonts/Montserrat-Regular.woff2" as="font" type="font/woff2" crossOrigin="anonymous" />
<link rel="preload" href="/fonts/Poppins-Bold.woff2" as="font" type="font/woff2" crossOrigin="anonymous" />
</head>
<body>
<a href="#main-content" className="skip-link">Zum Inhalt springen</a>
<div className="app-shell">
@@ -45,7 +44,6 @@ export default async function RootLayout({ children }: Readonly<{ children: Reac
<main id="main-content">{children}</main>
<Footer />
</div>
<ScrollToTop />
</body>
</html>
);
+25 -68
View File
@@ -1,73 +1,30 @@
import type { Metadata } from "next";
import Image from "next/image";
import Link from "next/link";
import { getAllTripReports } from "@/trip-reports";
import EventsView from "../components/EventsView";
import JsonLd from "../components/JsonLd";
import { createPageMetadata } from "../lib/metadata";
import { COMPANY_NAME, SITE_NAME, SITE_URL } from "../lib/site";
import { createExcerpt } from "../utils/postUtils";
import heroImage from "../../goldebek_website_briefing/csm_nordfriesland_goldebek_mr_240316_127_36497ca77c.jpg";
import villageImage from "../../goldebek_website_briefing/csm_nordfriesland_goldebek_mr_240316_126_0b279a7462.jpg";
import EventCard from "@/components/EventCard";
import JsonLd from "@/components/JsonLd";
import { getEvents, getNews } from "@/lib/content";
import { partitionEvents } from "@/lib/dates/events";
import { createPageMetadata } from "@/lib/metadata";
import { SITE_NAME, SITE_URL } from "@/lib/site";
const homeMetadata = createPageMetadata({
title: "Startseite",
description: "Neutrales Starter-Projekt für eine neue Website.",
path: "/",
});
const homeMetadata=createPageMetadata({title:"Moin in Goldebek",description:"Offizielle Website der Gemeinde Goldebek mit aktuellen Informationen, Terminen und Anlaufstellen.",path:"/"});
export const metadata:Metadata={...homeMetadata,title:{absolute:SITE_NAME}};
export const metadata: Metadata = {
...homeMetadata,
title: { absolute: SITE_NAME },
};
const facts=[["381","Einwohner · Stand 31.03.2026"],["10,18 km²","Gemeindefläche"],["Nordfriesland","Kreis"],["25862","Postleitzahl"]] as const;
const quickLinks=[["Dörpshuus","/leben/doerpshuus","Raum für Feste und Begegnung"],["Gemeindevertretung","/politik/gemeindevertretung","Menschen und kommunale Arbeit"],["Alltagshilfe","/leben/alltagshilfe-osterdoerfer","Praktische Unterstützung vor Ort"],["Fahrbücherei","/service/fahrbuecherei","Haltezeiten und Termine"]] as const;
export const dynamic = "force-dynamic";
export default async function HomePage() {
const posts = (await getAllTripReports())
.filter((post) => post.metadata.published)
.sort((a, b) => new Date(b.metadata.createdAt).getTime() - new Date(a.metadata.createdAt).getTime())
.slice(0, 3);
const jsonLd = [
{ "@context": "https://schema.org", "@type": "Organization", name: COMPANY_NAME, url: SITE_URL },
{ "@context": "https://schema.org", "@type": "WebSite", name: SITE_NAME, url: SITE_URL },
];
return (
<>
<JsonLd data={jsonLd} />
<section className="hero">
<div className="container hero-content">
<div>
<h1>Bereit für Ihre neue Website</h1>
<p>Diese neutrale Startseite enthält bewusst nur minimale Platzhalter. Inhalte, Navigation und Gestaltung können projektspezifisch ergänzt werden.</p>
<a className="cta" href="#start">Projekt starten</a>
</div>
<div className="hero-card">
<h2>Nächste Termine</h2>
<EventsView mode="special" />
</div>
</div>
</section>
<section id="start" className="container group-info">
<div className="group-info-card">
<h2>Neutraler Ausgangspunkt</h2>
<p>Die technische Infrastruktur ist eingerichtet. Ersetzen Sie diesen Abschnitt durch den Einstieg Ihrer neuen Website.</p>
</div>
</section>
<section className="container">
<h2>Aktuelle Beiträge</h2>
{posts.length ? (
<div className="post-grid">
{posts.map((post) => (
<Link href={`/fahrten/${post.metadata.slug}`} className="post-card-link" key={post.metadata.slug}>
<article className="post-card post-preview-card">
<header><h3>{post.metadata.title}</h3><p className="post-meta">Von {post.metadata.author}</p></header>
<p className="post-preview-text">{createExcerpt(post.metadata.plainText, 220)}</p>
<span className="post-preview-link">Weiterlesen</span>
</article>
</Link>
))}
</div>
) : <p className="muted">Noch keine Beiträge veröffentlicht.</p>}
</section>
</>
);
}
export default function HomePage(){const news=getNews().slice(0,3);const {upcoming}=partitionEvents(getEvents());return <>
<JsonLd data={[{"@context":"https://schema.org","@type":"GovernmentOrganization","name":"Gemeinde Goldebek","url":SITE_URL,"address":{"@type":"PostalAddress","postalCode":"25862","addressLocality":"Goldebek","addressRegion":"Schleswig-Holstein","addressCountry":"DE"}},{"@context":"https://schema.org","@type":"WebSite","name":"Gemeinde Goldebek","url":SITE_URL,"inLanguage":"de-DE"}]}/>
<section className="municipality-hero"><div className="hero-photo" aria-hidden="true"><Image src={heroImage} alt="" fill priority sizes="100vw" /></div><div className="container municipality-hero__grid"><div className="municipality-hero__copy"><p className="eyebrow">Gemeinde Goldebek · Nordfriesland</p><h1>Moin in Goldebek</h1><p className="lead">Goldebek liegt im nordöstlichen Nordfriesland zwischen Bredstedt und Wanderup. Landwirtschaft, Ehrenamt, Vereine und gemeinschaftliche Projekte prägen das Dorf.</p><div className="button-row"><Link className="button button--primary" href="/termine">Aktuelle Termine</Link><Link className="button button--secondary" href="/gemeinde/ueber-goldebek">Goldebek entdecken</Link></div></div><aside className="welcome-card" aria-labelledby="welcome-title"><p className="welcome-card__kicker">Gut zu wissen</p><h2 id="welcome-title">Gemeinsam im Dorf</h2><p>Hier finden Sie verlässliche Informationen der Gemeinde, kommende Termine und direkte Wege zu den wichtigsten Angeboten.</p><Link href="/kontakt" className="text-link">Ansprechpartner finden <span aria-hidden="true">→</span></Link></aside></div></section>
<section className="facts" aria-label="Goldebek in Zahlen"><div className="container facts__grid">{facts.map(([value,label])=><div className="fact" key={label}><strong>{value}</strong><span>{label}</span></div>)}</div></section>
<section className="container home-section"><div className="section-heading"><div><p className="section-kicker">Aus der Gemeinde</p><h2>Aktuelles</h2></div><Link className="text-link" href="/aktuelles">Alle Meldungen <span aria-hidden="true">→</span></Link></div><div className="news-grid">{news.map((item)=><article className="news-card" key={item.id}><p className="news-date">{new Intl.DateTimeFormat("de-DE").format(new Date(`${item.publishedAt}T12:00:00Z`))}</p><h3><Link href={`/aktuelles/${item.slug}`}>{item.title}</Link></h3><p>{item.teaser}</p><Link className="text-link" href={`/aktuelles/${item.slug}`}>Weiterlesen <span aria-hidden="true">→</span></Link></article>)}</div></section>
<section className="home-section home-section--tinted"><div className="container"><div className="section-heading"><div><p className="section-kicker">Was steht an?</p><h2>Nächste Termine</h2></div><Link className="text-link" href="/termine">Zum Kalender <span aria-hidden="true">→</span></Link></div><div className="event-list">{upcoming.slice(0,4).map((event)=><EventCard event={event} key={event.id}/>)}</div></div></section>
<section className="container home-section"><p className="section-kicker">Direkt gefunden</p><h2>Schnellzugriffe</h2><div className="quick-grid quick-grid--four">{quickLinks.map(([title,href,copy],index)=><Link href={href} className="quick-card" key={title}><span className="quick-card__number" aria-hidden="true">0{index+1}</span><h3>{title}</h3><p>{copy}</p></Link>)}</div></section>
<section className="discover-section"><div className="discover-photo"><Image src={villageImage} alt="Luftaufnahme von Goldebek mit Feldern und Wohnhäusern" fill sizes="(max-width: 800px) 100vw, 50vw" /></div><div className="discover-copy"><p className="section-kicker">Ort mit Geschichte</p><h2>Goldebek entdecken</h2><p>Vom Mühlenstrom bis zur Dorfchronik: Lernen Sie Geschichte, Landschaft und Zeichen des Ortes kennen.</p><div className="link-list"><Link href="/gemeinde/geschichte">Geschichte</Link><Link href="/gemeinde/ueber-goldebek">Mühlenstrom</Link><Link href="/gemeinde/dorfchronik">Dorfchronik</Link><Link href="/gemeinde/wappen">Wappen</Link></div></div></section>
<section className="container home-section"><div className="section-heading"><div><p className="section-kicker">Engagiert vor Ort</p><h2>Gemeinschaft</h2></div></div><div className="feature-grid"><Link href="/leben/vereine"><span>01</span><h3>Vereine</h3><p>Sport, Tradition und soziales Engagement.</p></Link><Link href="/leben/freiwillige-feuerwehr"><span>02</span><h3>Feuerwehr</h3><p>Einsatzbereitschaft und Gemeinschaft.</p></Link><Link href="/leben/kulturausschuss"><span>03</span><h3>Kulturausschuss</h3><p>Feste, Aktionen und Kultur im Dorf.</p></Link></div></section>
<section className="home-section home-section--blue"><div className="container"><p className="section-kicker">Blick nach vorn</p><h2>Projekte & Entwicklung</h2><div className="project-links"><Link href="/leben/spielplatz"><strong>Spielplatz</strong><span>Seit August 2026 geöffnet</span></Link><Link href="/politik/projekte-entwicklung"><strong>Wärmeplanung</strong><span>Aktuelle Informationen und Quellen</span></Link><Link href="/politik/bauleitplanung"><strong>Bauleitplanung</strong><span>Zu den amtlichen Verfahren</span></Link></div></div></section>
<section className="container home-section contact-band"><div><p className="section-kicker">Gemeinde & Amt</p><h2>Wir helfen Ihnen weiter.</h2><p>Für Gemeindeangelegenheiten finden Sie hier Peter Jessen und das Amt Mittleres Nordfriesland.</p></div><Link className="button button--primary" href="/kontakt">Kontakt aufnehmen</Link></section>
</>}
+1 -1
View File
@@ -8,6 +8,6 @@ export default function robots(): MetadataRoute.Robots {
allow: "/",
disallow: ["/api/", "/health", "/downloads/"],
},
sitemap: `${SITE_URL}/sitemap-index.xml`,
sitemap: `${SITE_URL}/sitemap.xml`,
};
}
-17
View File
@@ -1,17 +0,0 @@
import { SITE_URL } from "../../lib/site";
export const dynamic = "force-static";
export function GET(): Response {
const body = [
'<?xml version="1.0" encoding="UTF-8"?>',
'<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">',
` <sitemap><loc>${SITE_URL}/sitemap.xml</loc></sitemap>`,
"</sitemapindex>",
"",
].join("\n");
return new Response(body, {
headers: { "Content-Type": "application/xml; charset=utf-8" },
});
}
+9 -22
View File
@@ -1,25 +1,12 @@
import type { MetadataRoute } from "next";
import { getAllTripReports } from "@/trip-reports";
import { SITE_URL } from "../lib/site";
import pages from "../../content/pages/pages.json";
import { getEvents, getNews } from "@/lib/content";
import { SITE_URL } from "@/lib/site";
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const staticPaths = [
"",
"/ueber-uns",
"/informationen",
"/kalender",
"/fahrten",
"/bilder",
];
const staticEntries: MetadataRoute.Sitemap = staticPaths.map((path) => ({
url: `${SITE_URL}${path}`,
}));
const tripEntries: MetadataRoute.Sitemap = (await getAllTripReports())
.filter((post) => post.metadata.published)
.map((post) => ({
url: `${SITE_URL}/fahrten/${post.metadata.slug}`,
lastModified: new Date(post.metadata.updatedAt),
}));
return [...staticEntries, ...tripEntries];
export default function sitemap(): MetadataRoute.Sitemap {
const staticPaths=["","/aktuelles","/termine","/impressum","/datenschutz","/barrierefreiheit",...pages.map((page)=>`/${page.slug}`)];
const staticEntries=staticPaths.map((path)=>({url:`${SITE_URL}${path}`,lastModified:new Date("2026-09-18")}));
const news=getNews().map((item)=>({url:`${SITE_URL}/aktuelles/${item.slug}`,lastModified:new Date(item.updatedAt??item.publishedAt)}));
const events=getEvents().filter((item)=>item.status==="verified"||item.status==="dynamic").map((item)=>({url:`${SITE_URL}/termine/${item.slug}`,lastModified:new Date(item.lastVerified)}));
return [...staticEntries,...news,...events];
}
@@ -0,0 +1,5 @@
import { notFound } from "next/navigation";
import { getEvent } from "@/lib/content";
import { eventsToIcs } from "@/lib/dates/ics";
export async function GET(_request: Request, { params }: { params: Promise<{ slug: string }> }) { const event = getEvent((await params).slug); if (!event || event.status === "needs-verification") notFound(); return new Response(eventsToIcs([event]), { headers: { "Content-Type":"text/calendar; charset=utf-8", "Content-Disposition":`attachment; filename="${event.slug}.ics"` } }); }
+20
View File
@@ -0,0 +1,20 @@
import type { Metadata } from "next";
import Link from "next/link";
import { notFound } from "next/navigation";
import JsonLd from "@/components/JsonLd";
import PageHeader from "@/components/PageHeader";
import SourceNote from "@/components/SourceNote";
import { getEvent, getEvents } from "@/lib/content";
import { eventDateTimeIso, formatGermanDate } from "@/lib/dates/events";
import { createPageMetadata } from "@/lib/metadata";
export function generateStaticParams() { return getEvents().filter((event) => event.status !== "needs-verification").map((event) => ({ slug: event.slug })); }
export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }): Promise<Metadata> { const { slug } = await params; const event = getEvent(slug); return event ? { ...createPageMetadata({ title: event.title, description: event.summary ?? `Termin in Goldebek am ${formatGermanDate(event.startDate)}.`, path: `/termine/${event.slug}` }), openGraph: { title: event.title, description: event.summary ?? `Termin in Goldebek am ${formatGermanDate(event.startDate)}.`, type: "website", url: `/termine/${event.slug}`, images: [] }, twitter: { title: event.title, description: event.summary, images: [] } } : {}; }
export default async function EventDetailPage({ params }: { params: Promise<{ slug: string }> }) {
const event = getEvent((await params).slug); if (!event || event.status === "needs-verification") notFound();
const visibleLocation = event.location && event.privacyApproved === true ? event.location : undefined;
const startDate = eventDateTimeIso(event.startDate, event.startTime);
const endDate = event.endDate || event.endTime ? eventDateTimeIso(event.endDate ?? event.startDate, event.endTime) : undefined;
return <><JsonLd data={{ "@context":"https://schema.org", "@type":"Event", name:event.title, description:event.summary, startDate, endDate, eventStatus:"https://schema.org/EventScheduled", location:visibleLocation ? { "@type":"Place", name:visibleLocation } : undefined, organizer:event.organizer ? { "@type":"Organization", name:event.organizer } : undefined }} /><PageHeader eyebrow="Termin" title={event.title} intro={event.summary ?? "Ein Termin der Gemeinde und Dorfgemeinschaft Goldebek."} breadcrumbs={[{ label:"Termine", href:"/termine" },{ label:event.title }]} /><div className="container narrow-content"><dl className="detail-list"><div><dt>Datum</dt><dd>{formatGermanDate(event.startDate)}</dd></div>{event.startTime ? <div><dt>Zeit</dt><dd>{event.startTime}{event.endTime ? `–${event.endTime}` : ""} Uhr</dd></div> : null}{visibleLocation ? <div><dt>Ort</dt><dd>{visibleLocation}</dd></div> : null}{event.organizer ? <div><dt>Veranstalter</dt><dd>{event.organizer}</dd></div> : null}</dl><div className="button-row"><a className="button button--primary" href={`/termine/${event.slug}/kalender.ics`}>Termin speichern (.ics)</a><Link className="button button--secondary" href="/termine">Alle Termine</Link></div><SourceNote lastVerified={event.lastVerified} sourceName={event.sourceName} sourceUrl={event.sourceUrl} /></div></>;
}
+4
View File
@@ -0,0 +1,4 @@
import { getEvents } from "@/lib/content";
import { eventsToIcs } from "@/lib/dates/ics";
export function GET() { const events = getEvents().filter((event) => event.status === "verified" || event.status === "dynamic"); return new Response(eventsToIcs(events), { headers: { "Content-Type":"text/calendar; charset=utf-8", "Content-Disposition":"attachment; filename=goldebek-termine.ics" } }); }
+13
View File
@@ -0,0 +1,13 @@
import type { Metadata } from "next";
import EventCard from "@/components/EventCard";
import PageHeader from "@/components/PageHeader";
import { getEvents } from "@/lib/content";
import { partitionEvents } from "@/lib/dates/events";
import { createPageMetadata } from "@/lib/metadata";
export const metadata: Metadata = createPageMetadata({ title: "Termine", description: "Veranstaltungen und Termine in Goldebek.", path: "/termine" });
export default function EventsPage() {
const { upcoming, archive } = partitionEvents(getEvents());
return <><PageHeader eyebrow="Gemeinde erleben" title="Termine" intro="Veranstaltungen, Treffen und wichtige Daten in Goldebek – geprüft und chronologisch sortiert." breadcrumbs={[{ label: "Termine" }]} /><div className="container page-content"><div className="section-heading"><div><p className="section-kicker">Kalender</p><h2>Kommende Termine</h2></div><a className="button button--secondary" href="/termine/kalender.ics">Alle Termine als ICS</a></div>{upcoming.length ? <div className="event-list">{upcoming.map((event) => <EventCard event={event} key={event.id} />)}</div> : <p>Zurzeit sind keine bestätigten kommenden Termine eingetragen.</p>}<section className="archive-section"><h2>Terminarchiv</h2>{archive.length ? <div className="event-list event-list--archive">{archive.map((event) => <EventCard event={event} key={event.id} />)}</div> : <p>Noch keine archivierten Termine.</p>}</section></div></>;
}
-35
View File
@@ -1,35 +0,0 @@
import type { Metadata } from "next";
import PageEffects from "../../components/PageEffects";
import PhotoSlider from "../../components/PhotoSlider";
import { createPageMetadata } from "../../lib/metadata";
export const metadata: Metadata = createPageMetadata({
title: "Über uns",
description: "Neutrale Inhaltsseite für die Vorstellung einer Organisation.",
path: "/ueber-uns",
});
export default function AboutPage() {
return (
<div className="about-v2">
<header className="about-header about-header--hero-camp1">
<div className="about-header__overlay" />
<div className="about-header__content"><h1>Über uns</h1><p>Platzhalter für eine kurze Vorstellung.</p></div>
</header>
<section className="about-block reveal">
<div className="about-block__inner about-block__inner--narrow">
<span className="about-eyebrow">Organisation</span>
<h2>Ihre Geschichte</h2>
<p>Ergänzen Sie hier die Geschichte, Werte und Ziele Ihres neuen Projekts.</p>
</div>
</section>
<section className="about-block about-block--alt reveal">
<div className="about-block__inner">
<div className="about-block__head"><span className="about-eyebrow">Medien</span><h2>Bilder</h2></div>
<PhotoSlider imageDir="secondary-slider" label="Beispielgalerie" />
</div>
</section>
<PageEffects threshold={0} rootMargin="0px" />
</div>
);
}
+7
View File
@@ -0,0 +1,7 @@
import Link from "next/link";
export type Crumb = { label: string; href?: string };
export default function Breadcrumbs({ items }: { items: Crumb[] }) {
return <nav className="breadcrumbs" aria-label="Brotkrümelnavigation"><ol><li><Link href="/">Startseite</Link></li>{items.map((item) => <li key={item.href ?? item.label}>{item.href ? <Link href={item.href}>{item.label}</Link> : <span aria-current="page">{item.label}</span>}</li>)}</ol></nav>;
}
+7
View File
@@ -0,0 +1,7 @@
import Link from "next/link";
import type { Event } from "@/lib/content/schemas";
import { formatGermanDate } from "@/lib/dates/events";
export default function EventCard({ event }: { event: Event }) {
return <article className="event-card"><div className="event-date"><span>{new Intl.DateTimeFormat("de-DE", { month: "short", timeZone: "Europe/Berlin" }).format(new Date(`${event.startDate}T12:00:00Z`))}</span><strong>{event.startDate.slice(-2)}</strong></div><div><p className="event-meta">{formatGermanDate(event.startDate)}{event.startTime ? ` · ${event.startTime} Uhr` : ""}</p><h3><Link href={`/termine/${event.slug}`}>{event.title}</Link></h3>{event.location && event.privacyApproved === true ? <p>{event.location}</p> : null}<Link className="text-link" href={`/termine/${event.slug}`}>Details <span aria-hidden="true">→</span></Link></div></article>;
}
+4 -55
View File
@@ -1,59 +1,8 @@
import Link from "next/link";
import {
COMPANY_NAME,
CONTACT_ADDRESS,
CONTACT_EMAIL,
CONTACT_PHONE,
toPhoneUrl,
} from "../lib/site";
import ContactLink from "./ContactLink";
export default function Footer() {
return (
<footer className="app-footer">
<div className="container footer-content">
<div className="footer-top">
<div className="footer-column footer-contact">
<h2 className="footer-heading">Kontakt</h2>
<address>
<div className="footer-contact-item">
<svg className="footer-contact-icon" viewBox="0 0 24 24" role="presentation" aria-hidden="true">
<path fill="currentColor" d="M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7Zm0 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5Z" />
</svg>
<span>{CONTACT_ADDRESS}</span>
</div>
<div className="footer-contact-item">
<svg className="footer-contact-icon" viewBox="0 0 24 24" role="presentation" aria-hidden="true">
<path fill="currentColor" d="M20 4H4a1 1 0 0 0-1 1v1.22l9 5.4 9-5.4V5a1 1 0 0 0-1-1Zm1 5.26-9 5.4-9-5.4V19a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V9.26Z" />
</svg>
<ContactLink href={`mailto:${CONTACT_EMAIL}`}>{CONTACT_EMAIL}</ContactLink>
</div>
<div className="footer-contact-item">
<svg className="footer-contact-icon" viewBox="0 0 24 24" role="presentation" aria-hidden="true">
<path fill="currentColor" d="M6.62 10.79a15.91 15.91 0 0 0 6.59 6.59l1.89-1.89a1 1 0 0 1 1-.24 12.18 12.18 0 0 0 3.83.61 1 1 0 0 1 1 1v3.18a1 1 0 0 1-1 1A17 17 0 0 1 3 7a1 1 0 0 1 1-1h3.18a1 1 0 0 1 1 1 12.31 12.31 0 0 0 .61 3.83 1 1 0 0 1-.24 1Z" />
</svg>
<ContactLink href={toPhoneUrl(CONTACT_PHONE)}>{CONTACT_PHONE}</ContactLink>
</div>
</address>
</div>
<nav className="footer-column footer-links" aria-label="Seitennavigation">
<h2 className="footer-heading">Links</h2>
<ul>
<li><Link href="/ueber-uns">Über uns</Link></li>
<li><Link href="/informationen">Informationen</Link></li>
<li><Link href="/kalender">Kalender</Link></li>
<li><Link href="/bilder">Bilder</Link></li>
</ul>
</nav>
</div>
<div className="footer-bottom">
<span>&copy; {new Date().getFullYear()} {COMPANY_NAME}</span>
<nav className="footer-legal" aria-label="Rechtliches">
<Link href="/datenschutz">Datenschutz</Link>
<Link href="/impressum">Impressum</Link>
</nav>
</div>
</div>
</footer>
);
return <footer className="municipality-footer"><div className="container footer-grid">
<div><p className="footer-brand">Gemeinde Goldebek</p><p>Im Amt Mittleres Nordfriesland</p><p className="footer-note">Inhalte werden mit Quelle und Prüfstand gepflegt.</p></div>
<nav aria-label="Weiterführende und rechtliche Links"><Link href="/impressum">Impressum</Link><Link href="/datenschutz">Datenschutz</Link><Link href="/barrierefreiheit">Barrierefreiheit</Link><a href="https://www.amnf.de" target="_blank" rel="noreferrer">Amt Mittleres Nordfriesland <span className="sr-only">(öffnet in neuem Fenster)</span><span aria-hidden="true">↗</span></a></nav>
</div></footer>;
}
+20 -68
View File
@@ -1,81 +1,33 @@
"use client";
import Image from "next/image";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { useEffect, useState } from "react";
import coatOfArms from "../../goldebek_website_briefing/DEU_Goldebek_wappen.svg";
const navLinks = [
{ href: "/", label: "Start" },
{ href: "/ueber-uns", label: "Über uns" },
{ href: "/informationen", label: "Informationen" },
{ href: "/kalender", label: "Kalender" },
{ href: "/fahrten", label: "Beiträge" },
{ href: "/bilder", label: "Bilder" },
];
{ href: "/", label: "Startseite" },
{ href: "/aktuelles", label: "Aktuelles" }, { href: "/termine", label: "Termine" },
{ href: "/gemeinde", label: "Gemeinde" }, { href: "/leben", label: "Leben & Gemeinschaft" },
{ href: "/politik", label: "Politik & Verwaltung" }, { href: "/service", label: "Service" },
] as const;
export default function Header({ siteName }: { siteName: string }) {
const pathname = usePathname() ?? "/";
const [openPath, setOpenPath] = useState<string | null>(null);
const open = openPath === pathname;
useEffect(() => {
const closeOnEscape = (event: KeyboardEvent) => {
if (event.key === "Escape") setOpenPath(null);
};
document.addEventListener("keydown", closeOnEscape);
return () => document.removeEventListener("keydown", closeOnEscape);
}, []);
const isActive = (href: string) =>
href === "/" ? pathname === "/" : pathname.startsWith(href);
const [open, setOpen] = useState(false);
useEffect(() => { const close = (event: KeyboardEvent) => { if (event.key === "Escape") setOpen(false); }; document.addEventListener("keydown", close); return () => document.removeEventListener("keydown", close); }, []);
return (
<header className="app-header">
<div className="container header-content">
<Link href="/" className="brand">
<img
src="/logo.svg"
alt={`${siteName} Logo`}
className="brand-logo"
/>
<span>{siteName}</span>
</Link>
<button
className="nav-toggle"
type="button"
aria-expanded={open}
aria-controls="primary-navigation"
aria-label={open ? "Menü schließen" : "Menü öffnen"}
data-open={String(open)}
onClick={() => setOpenPath(open ? null : pathname)}
>
<span className="nav-toggle-bars" aria-hidden="true">
<span />
<span />
<span />
</span>
</button>
<nav
className="nav-links"
id="primary-navigation"
data-open={String(open)}
>
{navLinks.map(({ href, label }) => {
const active = isActive(href);
return (
<Link
key={href}
href={href}
aria-current={active ? "page" : undefined}
className={active ? "active" : undefined}
onClick={() => setOpenPath(null)}
>
{label}
</Link>
);
})}
</nav>
</div>
</header>
<header className="municipality-header"><div className="container header-bar">
<Link href="/" className="municipality-brand" aria-label={`${siteName} – Startseite`}>
<Image src={coatOfArms} alt="Wappen der Gemeinde Goldebek" className="brand-mark" priority />
<span><strong>Gemeinde</strong><b>Goldebek</b></span>
</Link>
<button className="menu-button" type="button" aria-expanded={open} aria-controls="primary-navigation" onClick={() => setOpen((value) => !value)}><span aria-hidden="true" className="menu-icon"><i /><i /><i /></span><span>Menü</span></button>
<nav id="primary-navigation" className="primary-navigation" data-open={open} aria-label="Hauptnavigation">
{navLinks.map(({ href, label }) => { const active = pathname === href || pathname.startsWith(`${href}/`); return <Link key={href} href={href} aria-current={active ? "page" : undefined} onClick={() => setOpen(false)}>{label}</Link>; })}
<Link className="contact-link" href="/kontakt" onClick={() => setOpen(false)}>Kontakt</Link>
</nav>
</div></header>
);
}
+5
View File
@@ -0,0 +1,5 @@
import PageHeader from "./PageHeader";
export default function LegalPlaceholder({ title, intro, children }: { title:string; intro:string; children:React.ReactNode }) {
return <><PageHeader eyebrow="Rechtliche Information" title={title} intro={intro} breadcrumbs={[{label:title}]} /><div className="container narrow-content"><div className="editorial-warning" role="note"><strong>Redaktioneller Platzhalter – nicht rechtsverbindlich</strong><p>Die vollständige Fassung muss vor Veröffentlichung von der Gemeinde bereitgestellt und rechtlich freigegeben werden.</p></div><div className="prose">{children}</div></div></>;
}
+5
View File
@@ -0,0 +1,5 @@
import Breadcrumbs, { type Crumb } from "./Breadcrumbs";
export default function PageHeader({ eyebrow, title, intro, breadcrumbs }: { eyebrow: string; title: string; intro: string; breadcrumbs: Crumb[] }) {
return <header className="page-hero"><div className="container"><Breadcrumbs items={breadcrumbs} /><p className="eyebrow">{eyebrow}</p><h1>{title}</h1><p className="page-lead">{intro}</p></div></header>;
}
+4
View File
@@ -0,0 +1,4 @@
export default function SourceNote({ lastVerified, sourceName, sourceUrl }: { lastVerified: string; sourceName?: string; sourceUrl?: string }) {
const date = new Intl.DateTimeFormat("de-DE", { day: "2-digit", month: "2-digit", year: "numeric" }).format(new Date(`${lastVerified}T12:00:00Z`));
return <p className="source-note">Stand: {date}{sourceName && sourceUrl ? <> · <a href={sourceUrl} target="_blank" rel="noreferrer">{sourceName} <span className="sr-only">(öffnet in neuem Fenster)</span><span aria-hidden="true">↗</span></a></> : null}</p>;
}
+18
View File
@@ -0,0 +1,18 @@
import eventsJson from "../../../content/events/events.json";
import newsJson from "../../../content/news/spielplatz-am-langbarg.json";
import sourcesJson from "../../../data/sources.json";
import { assertUnique, eventSchema, newsSchema, sourceSchema, type Event, type NewsItem, type Source } from "./schemas";
const events = eventSchema.array().parse(eventsJson);
const news = newsSchema.array().parse([newsJson]);
const sources = sourceSchema.array().parse(sourcesJson);
assertUnique(events, (item) => item.slug, "Termin-Slug");
assertUnique(news, (item) => item.slug, "News-Slug");
assertUnique(sources, (item) => item.id, "Quellen-ID");
export function getEvents(): Event[] { return events; }
export function getEvent(slug: string): Event | undefined { return events.find((event) => event.slug === slug); }
export function getNews(): NewsItem[] { return news.filter((item) => item.status === "published").sort((a, b) => b.publishedAt.localeCompare(a.publishedAt)); }
export function getNewsItem(slug: string): NewsItem | undefined { return getNews().find((item) => item.slug === slug); }
export function getSource(id: string): Source | undefined { return sources.find((source) => source.id === id); }
export function getSources(): Source[] { return sources; }
+46
View File
@@ -0,0 +1,46 @@
import { z } from "zod";
const isoDate = z.string().refine((value) => {
if (!/^\d{4}-\d{2}-\d{2}$/.test(value)) return false;
const date = new Date(`${value}T00:00:00Z`);
return !Number.isNaN(date.valueOf()) && date.toISOString().startsWith(value);
}, "Ungültiges ISO-Datum");
const time = z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/);
export const eventSchema = z.object({
id: z.string().min(1), slug: z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/), title: z.string().min(1),
summary: z.string().optional(), startDate: isoDate, startTime: time.optional(), endDate: isoDate.optional(), endTime: time.optional(),
timezone: z.literal("Europe/Berlin"), location: z.string().optional(), organizer: z.string().optional(),
sourceUrl: z.string().url().optional(), sourceName: z.string().optional(), lastVerified: isoDate,
status: z.enum(["verified", "dynamic", "needs-verification", "archived"]), privacyApproved: z.boolean().optional(),
}).superRefine((event, context) => {
if ((event.endDate ?? event.startDate) < event.startDate) context.addIssue({ code: "custom", message: "Das Enddatum liegt vor dem Startdatum." });
if (event.location && /\b\d+[a-z]?\b/i.test(event.location) && event.privacyApproved !== true) context.addIssue({ code: "custom", path: ["privacyApproved"], message: "Eine Adresse benötigt privacyApproved=true." });
if (["verified", "dynamic"].includes(event.status) && (!event.sourceName || !event.sourceUrl)) context.addIssue({ code: "custom", path: ["sourceUrl"], message: "Veröffentlichte Termine benötigen eine Quelle." });
});
export const newsSchema = z.object({
id: z.string().min(1), slug: z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/), title: z.string().min(1), teaser: z.string().min(1), body: z.string().min(1),
publishedAt: isoDate, updatedAt: isoDate.optional(),
image: z.object({ src: z.string(), alt: z.string().min(1), copyright: z.string().optional() }).optional(),
sourceUrl: z.string().url().optional(), sourceName: z.string().optional(), lastVerified: isoDate,
status: z.enum(["published", "draft", "archived"]),
});
export const sourceSchema = z.object({
id: z.string().min(1), name: z.string().min(1), url: z.string().url(), type: z.string().min(1), lastVerified: isoDate,
});
export type Event = z.infer<typeof eventSchema>;
export type NewsItem = z.infer<typeof newsSchema>;
export type Source = z.infer<typeof sourceSchema>;
export function assertUnique<T>(items: T[], key: (item: T) => string, label: string): void {
const seen = new Set<string>();
for (const item of items) {
const value = key(item);
if (seen.has(value)) throw new Error(`Doppelter ${label}: ${value}`);
seen.add(value);
}
}
+36
View File
@@ -0,0 +1,36 @@
import type { Event } from "@/lib/content/schemas";
import { Temporal } from "@js-temporal/polyfill";
export function dateInBerlin(now = new Date()): string {
const parts = new Intl.DateTimeFormat("en-CA", { timeZone: "Europe/Berlin", year: "numeric", month: "2-digit", day: "2-digit" }).formatToParts(now);
const value = Object.fromEntries(parts.map((part) => [part.type, part.value]));
return `${value.year}-${value.month}-${value.day}`;
}
export function formatGermanDate(date: string, options: Intl.DateTimeFormatOptions = {}): string {
return new Intl.DateTimeFormat("de-DE", { timeZone: "Europe/Berlin", weekday: "long", day: "2-digit", month: "long", year: "numeric", ...options }).format(new Date(`${date}T12:00:00Z`));
}
export function formatShortDate(date: string): string {
return new Intl.DateTimeFormat("de-DE", { timeZone: "Europe/Berlin", day: "2-digit", month: "2-digit", year: "numeric" }).format(new Date(`${date}T12:00:00Z`));
}
export function eventDateTimeIso(date: string, time?: string): string {
if (!time) return date;
const [year, month, day] = date.split("-").map(Number);
const [hour, minute] = time.split(":").map(Number);
return Temporal.ZonedDateTime.from({ timeZone: "Europe/Berlin", year, month, day, hour, minute }).toString({ timeZoneName: "never", calendarName: "never" });
}
export function isPastEvent(event: Event, today = dateInBerlin()): boolean {
return (event.endDate ?? event.startDate) < today;
}
export function sortEvents(events: Event[]): Event[] {
return [...events].sort((a, b) => `${a.startDate}T${a.startTime ?? "00:00"}`.localeCompare(`${b.startDate}T${b.startTime ?? "00:00"}`));
}
export function partitionEvents(events: Event[], today = dateInBerlin()) {
const visible = events.filter((event) => event.status === "verified" || event.status === "dynamic");
return { upcoming: sortEvents(visible.filter((event) => !isPastEvent(event, today))), archive: sortEvents(visible.filter((event) => isPastEvent(event, today))).reverse() };
}
+22
View File
@@ -0,0 +1,22 @@
import type { Event } from "@/lib/content/schemas";
function escapeIcs(value: string): string { return value.replace(/\\/g, "\\\\").replace(/\n/g, "\\n").replace(/,/g, "\\,").replace(/;/g, "\\;"); }
function compactDate(value: string): string { return value.replaceAll("-", ""); }
function compactTime(value: string): string { return value.replace(":", "") + "00"; }
export function eventToIcsLines(event: Event): string[] {
const lines = ["BEGIN:VEVENT", `UID:${escapeIcs(event.id)}@goldebek.de`, `DTSTAMP:${compactDate(event.lastVerified)}T120000Z`];
if (event.startTime) lines.push(`DTSTART;TZID=Europe/Berlin:${compactDate(event.startDate)}T${compactTime(event.startTime)}`);
else lines.push(`DTSTART;VALUE=DATE:${compactDate(event.startDate)}`);
if (event.endTime) lines.push(`DTEND;TZID=Europe/Berlin:${compactDate(event.endDate ?? event.startDate)}T${compactTime(event.endTime)}`);
else if (event.endDate) lines.push(`DTEND;VALUE=DATE:${compactDate(event.endDate)}`);
lines.push(`SUMMARY:${escapeIcs(event.title)}`);
if (event.summary) lines.push(`DESCRIPTION:${escapeIcs(event.summary)}`);
if (event.location && event.privacyApproved === true) lines.push(`LOCATION:${escapeIcs(event.location)}`);
lines.push("END:VEVENT");
return lines;
}
export function eventsToIcs(events: Event[]): string {
return ["BEGIN:VCALENDAR", "VERSION:2.0", "PRODID:-//Gemeinde Goldebek//Termine//DE", "CALSCALE:GREGORIAN", "METHOD:PUBLISH", ...events.flatMap(eventToIcsLines), "END:VCALENDAR", ""].join("\r\n");
}
+2 -2
View File
@@ -1,7 +1,7 @@
import type { Metadata } from "next";
import { SITE_NAME, toAbsoluteUrl } from "./site";
const DEFAULT_OG_IMAGE = "/logo.svg";
const DEFAULT_OG_IMAGE = "/og.png";
interface PageMetadataOptions {
title: string;
@@ -37,7 +37,7 @@ export function createPageMetadata({
images: [imageUrl],
},
twitter: {
card: "summary",
card: "summary_large_image",
title,
description,
images: [imageUrl],
+5 -5
View File
@@ -18,14 +18,14 @@ function normalizeSiteUrl(value: string | undefined): string {
}
}
export const SITE_NAME = readEnvironment("APP_NAME", "Example Website");
export const SITE_NAME = readEnvironment("APP_NAME", "Gemeinde Goldebek");
export const SITE_URL = normalizeSiteUrl(process.env.APP_URL);
export const COMPANY_NAME = readEnvironment("COMPANY_NAME", "Example Company");
export const CONTACT_EMAIL = readEnvironment("CONTACT_EMAIL", "info@example.com");
export const CONTACT_PHONE = readEnvironment("CONTACT_PHONE", "+49 000 000000");
export const COMPANY_NAME = readEnvironment("COMPANY_NAME", "Gemeinde Goldebek");
export const CONTACT_EMAIL = readEnvironment("CONTACT_EMAIL", "info@amnf.de");
export const CONTACT_PHONE = readEnvironment("CONTACT_PHONE", "04671 9192-0");
export const CONTACT_ADDRESS = readEnvironment(
"CONTACT_ADDRESS",
"Example Street 1, 12345 Example City",
"über Amt Mittleres Nordfriesland, Theodor-Storm-Straße 2, 25821 Bredstedt",
);
export function toAbsoluteUrl(pathname: string): string {
+67
View File
@@ -0,0 +1,67 @@
@font-face { font-family: "Goldebek Sans"; src: url("/fonts/Montserrat-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Goldebek Sans"; src: url("/fonts/Montserrat-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Goldebek Sans"; src: url("/fonts/Montserrat-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root { --blue-950:#082d46; --blue-800:#0d4668; --blue-700:#126084; --green-700:#376c43; --green-100:#e7efe6; --gold-500:#d5a32f; --ink:#17262e; --muted:#5c6b72; --paper:#fffdf8; --line:#dce2dd; --shadow:0 18px 50px rgb(8 45 70 / 12%); }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; color:var(--ink); background:var(--paper); font-family:"Goldebek Sans",system-ui,sans-serif; line-height:1.65; }
a { color:inherit; } h1,h2,h3,p { margin-top:0; } h1,h2,h3 { line-height:1.15; letter-spacing:-.025em; } h1 { font-size:clamp(3rem,8vw,6.7rem); margin-bottom:1.5rem; } h2 { font-size:clamp(2rem,4vw,3.2rem); } h3 { font-size:1.25rem; }
.container { width:min(1180px,calc(100% - 2.5rem)); margin-inline:auto; }
.skip-link { position:fixed; top:.5rem; left:.5rem; z-index:100; padding:.7rem 1rem; background:white; transform:translateY(-200%); } .skip-link:focus { transform:none; }
a:focus-visible,button:focus-visible { outline:3px solid var(--gold-500); outline-offset:4px; }
.app-shell { min-height:100vh; display:flex; flex-direction:column; } main { flex:1; }
.municipality-header { background:var(--paper); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:20; }
.header-bar { min-height:88px; display:flex; align-items:center; gap:2rem; }
.municipality-brand { display:inline-flex; align-items:center; gap:.8rem; text-decoration:none; margin-right:auto; }
.municipality-brand span { display:grid; line-height:1.05; } .municipality-brand strong { font-size:.7rem; letter-spacing:.15em; text-transform:uppercase; color:var(--muted); } .municipality-brand b { font-size:1.35rem; color:var(--blue-950); }
.brand-mark { width:auto; height:58px; object-fit:contain; }
.primary-navigation { display:flex; align-items:center; gap:clamp(.7rem,1.7vw,1.4rem); }
.primary-navigation a { text-decoration:none; font-size:.86rem; font-weight:600; } .primary-navigation a:hover,.primary-navigation a[aria-current="page"] { color:var(--blue-700); }
.primary-navigation .contact-link { padding:.65rem .9rem; color:white; background:var(--blue-950); }
.menu-button { display:none; border:0; background:none; font:inherit; }
.municipality-hero { overflow:hidden; position:relative; background:#e8eee9; }
.hero-photo { position:absolute; inset:0; } .hero-photo img { object-fit:cover; object-position:center 44%; filter:saturate(.82); }
.municipality-hero::before { content:""; position:absolute; inset:0; z-index:1; background:linear-gradient(90deg,rgb(239 244 238 / 98%) 0%,rgb(239 244 238 / 91%) 48%,rgb(8 45 70 / 18%) 100%); }
.municipality-hero__grid { position:relative; z-index:2; min-height:650px; display:grid; grid-template-columns:1.5fr .75fr; gap:clamp(3rem,8vw,8rem); align-items:center; padding-block:7rem; }
.eyebrow,.section-kicker,.welcome-card__kicker { text-transform:uppercase; letter-spacing:.16em; font-size:.75rem; font-weight:700; color:var(--green-700); }
.lead { max-width:760px; font-size:clamp(1.1rem,2vw,1.35rem); color:#344850; }
.button-row { display:flex; flex-wrap:wrap; gap:.8rem; margin-top:2.5rem; } .button { display:inline-flex; min-height:48px; align-items:center; justify-content:center; padding:.75rem 1.15rem; text-decoration:none; font-weight:700; } .button--primary { color:white; background:var(--blue-950); } .button--secondary { color:var(--blue-950); border:1px solid var(--blue-950); background:rgb(255 255 255 / 65%); }
.welcome-card { padding:clamp(1.7rem,4vw,2.6rem); background:var(--paper); box-shadow:var(--shadow); border-top:5px solid var(--gold-500); } .welcome-card h2 { font-size:1.8rem; } .text-link { font-weight:700; color:var(--blue-800); text-underline-offset:5px; }
.facts { position:relative; z-index:3; background:var(--blue-950); color:white; } .facts__grid { display:grid; grid-template-columns:repeat(4,1fr); } .fact { min-height:125px; padding:1.5rem clamp(1rem,3vw,2rem); display:flex; flex-direction:column; justify-content:center; border-left:1px solid rgb(255 255 255 / 18%); } .fact:last-child { border-right:1px solid rgb(255 255 255 / 18%); } .fact strong { font-size:clamp(1.15rem,2.3vw,1.7rem); } .fact span { font-size:.8rem; color:rgb(255 255 255 / 70%); }
.home-intro { padding-block:clamp(5rem,10vw,8rem); } .quick-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; margin-top:2.5rem; } .quick-card { min-height:230px; padding:1.6rem; border:1px solid var(--line); background:white; text-decoration:none; transition:transform .2s ease,box-shadow .2s ease; } .quick-card:hover { transform:translateY(-4px); box-shadow:var(--shadow); } .quick-card__number { display:block; margin-bottom:2.8rem; color:var(--gold-500); font-weight:700; } .quick-card p { color:var(--muted); }
.municipality-footer { padding-block:3rem; background:#061f30; color:white; } .footer-grid { display:flex; justify-content:space-between; gap:2rem; } .footer-brand { font-size:1.2rem; font-weight:700; margin-bottom:.2rem; } .footer-grid nav { display:flex; flex-wrap:wrap; gap:1.5rem; align-items:center; } .footer-grid a { text-underline-offset:5px; }
.footer-note{color:rgb(255 255 255 / 62%);font-size:.78rem}.footer-grid nav{max-width:660px;justify-content:flex-end}
@media(max-width:980px){ .menu-button{display:inline-flex;align-items:center;gap:.6rem;padding:.6rem;cursor:pointer}.menu-icon{display:grid;gap:4px}.menu-icon i{display:block;width:22px;height:2px;background:currentColor}.primary-navigation{display:none;position:absolute;inset:88px 0 auto;padding:1.3rem max(1.25rem,calc((100vw - 1180px)/2));background:var(--paper);border-bottom:1px solid var(--line);flex-direction:column;align-items:stretch}.primary-navigation[data-open="true"]{display:flex}.primary-navigation a{padding:.6rem 0;font-size:1rem}.municipality-hero__grid{min-height:auto;grid-template-columns:1fr;gap:3rem;padding-block:5rem}.welcome-card{max-width:580px}}
@media(max-width:700px){.header-bar{min-height:74px}.brand-mark{height:50px}.primary-navigation{top:74px}.municipality-hero::before{background:rgb(239 244 238 / 91%)}.municipality-hero__grid{padding-block:3.7rem}.facts__grid{grid-template-columns:1fr 1fr}.fact:nth-child(odd){border-left:0}.fact{border-bottom:1px solid rgb(255 255 255 / 18%)}.quick-grid{grid-template-columns:1fr}.quick-card{min-height:190px}.footer-grid{flex-direction:column}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.page-hero{padding:clamp(3.5rem,8vw,6.5rem) 0;background:linear-gradient(120deg,#edf2ec,#f8f2e5);border-bottom:1px solid var(--line)}
.page-hero h1{max-width:950px;font-size:clamp(2.7rem,7vw,5.6rem);margin-bottom:1.4rem}.page-lead{max-width:800px;font-size:clamp(1.08rem,2vw,1.35rem);color:#3f535b}
.breadcrumbs{margin-bottom:clamp(2.2rem,5vw,4.5rem);font-size:.82rem;color:var(--muted)}.breadcrumbs ol{list-style:none;display:flex;flex-wrap:wrap;gap:.45rem;padding:0;margin:0}.breadcrumbs li+li::before{content:"/";margin-right:.45rem;color:#91a09c}.breadcrumbs a{text-underline-offset:4px}
.page-content{padding-block:clamp(4rem,8vw,7rem)}.narrow-content{width:min(800px,calc(100% - 2.5rem));margin-inline:auto;padding-block:clamp(4rem,8vw,7rem)}
.section-heading{display:flex;align-items:end;justify-content:space-between;gap:2rem;margin-bottom:2rem}.section-heading h2{margin-bottom:0}
.content-section{max-width:850px;padding-block:2.6rem;border-bottom:1px solid var(--line)}.content-section:first-of-type{padding-top:0}.content-section h2{font-size:clamp(1.7rem,3vw,2.4rem)}.content-section p,.content-section li,.prose p{font-size:1.03rem;color:#3f535b}.content-section li+li{margin-top:.45rem}
.link-list{display:flex;flex-wrap:wrap;gap:.7rem;margin-top:1.5rem}.link-list a{display:inline-flex;align-items:center;min-height:46px;padding:.65rem .9rem;border:1px solid var(--blue-800);color:var(--blue-800);font-weight:700;text-underline-offset:4px}
.source-note{margin-top:3rem;padding-top:1rem;border-top:1px solid var(--line);color:var(--muted);font-size:.78rem}.source-note a{text-underline-offset:4px}
.event-list{display:grid;gap:.75rem}.event-card{display:grid;grid-template-columns:80px 1fr;gap:1.4rem;padding:1.4rem;background:white;border:1px solid var(--line)}.event-date{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:80px;color:white;background:var(--blue-950);text-transform:uppercase}.event-date span{font-size:.75rem;letter-spacing:.08em}.event-date strong{font-size:1.8rem}.event-card h3{margin:.15rem 0 .4rem;font-size:1.3rem}.event-card h3 a{text-decoration:none}.event-card p{margin-bottom:.4rem;color:var(--muted)}.event-meta{font-size:.78rem;font-weight:700;color:var(--green-700)!important}.archive-section{margin-top:5rem}.event-list--archive{opacity:.82}
.news-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}.news-card{padding:clamp(1.5rem,3vw,2.2rem);background:white;border:1px solid var(--line)}.news-card h2,.news-card h3{font-size:clamp(1.3rem,2.2vw,1.8rem)}.news-card h2 a,.news-card h3 a{text-decoration:none}.news-card p{color:var(--muted)}.news-date,.card-label{font-size:.72rem!important;text-transform:uppercase;letter-spacing:.12em;font-weight:700;color:var(--green-700)!important}
.detail-list{display:grid;gap:0;margin:0}.detail-list div{display:grid;grid-template-columns:minmax(130px,.35fr) 1fr;gap:1rem;padding:1.2rem 0;border-bottom:1px solid var(--line)}.detail-list dt{font-size:.76rem;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);font-weight:700}.detail-list dd{margin:0;font-weight:600}
.home-section{padding-block:clamp(5rem,9vw,7.5rem)}.home-section--tinted{background:#f1f4f0}.home-section--blue{background:var(--blue-950);color:white}.home-section--blue h2{color:white}.home-section--blue .section-kicker{color:#e9bf58}
.quick-grid--four{grid-template-columns:repeat(4,1fr)}
.discover-section{display:grid;grid-template-columns:1fr 1fr;background:#e7eee7}.discover-photo{position:relative;min-height:570px}.discover-photo img{object-fit:cover}.discover-copy{display:flex;flex-direction:column;justify-content:center;padding:clamp(3rem,8vw,7rem)}.discover-copy>p{max-width:620px}.discover-copy .link-list{max-width:650px}
.feature-grid{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid var(--line);border-left:1px solid var(--line)}.feature-grid>a{min-height:240px;padding:2rem;border-right:1px solid var(--line);border-bottom:1px solid var(--line);text-decoration:none}.feature-grid span{display:block;margin-bottom:3rem;color:var(--gold-500);font-weight:700}.feature-grid p{color:var(--muted)}
.project-links{display:grid;grid-template-columns:repeat(3,1fr);margin-top:2.5rem;border-top:1px solid rgb(255 255 255 / 22%)}.project-links a{display:flex;flex-direction:column;padding:1.5rem 1.2rem;border-bottom:1px solid rgb(255 255 255 / 22%);text-decoration:none}.project-links strong{font-size:1.25rem}.project-links span{color:rgb(255 255 255 / 68%)}
.contact-band{display:flex;align-items:center;justify-content:space-between;gap:2rem}.contact-band>div{max-width:720px}.contact-band h2{margin-bottom:1rem}
.content-image{max-width:860px;margin:0 0 4rem}.content-image img{display:block;width:100%;height:auto;max-height:580px;object-fit:cover}.content-image figcaption,.coat-of-arms figcaption{margin-top:.5rem;color:var(--muted);font-size:.76rem}
.coat-of-arms{max-width:260px;margin:0 0 4rem}.coat-of-arms img{width:100%;height:auto}
.data-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.8rem;margin:0 0 3.5rem}.data-grid>div{min-height:145px;padding:1.3rem;background:#f1f4f0;border-top:4px solid var(--green-700);display:flex;flex-direction:column}.data-grid dt{color:var(--muted);font-size:.78rem;text-transform:uppercase;letter-spacing:.08em}.data-grid dd,.data-grid strong{margin:.6rem 0 0;font-size:1.35rem;font-weight:700}.data-grid small{margin-top:auto;color:var(--muted)}
.timeline{max-width:850px;list-style:none;padding:0;margin:0 0 4rem}.timeline li{display:grid;grid-template-columns:130px 1fr;gap:2rem;padding:0 0 2.3rem;position:relative}.timeline li::before{content:"";position:absolute;left:121px;top:.4rem;bottom:0;border-left:1px solid var(--line)}.timeline time{font-weight:700;color:var(--green-700)}.timeline h3{margin-bottom:.35rem}.timeline p{color:var(--muted)}
.card-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:.8rem;margin-bottom:3rem}.info-card{padding:1.6rem;border:1px solid var(--line);background:white}.info-card h2{font-size:1.35rem}
.contact-panel{max-width:650px;padding:2rem;margin-bottom:3rem;background:var(--blue-950);color:white}.contact-panel h2{color:white}.contact-panel address{font-style:normal}.contact-panel a{text-underline-offset:4px}
.people-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.8rem}.people-grid article{padding:1.4rem;border:1px solid var(--line)}.people-grid article>span{display:grid;place-items:center;width:48px;height:48px;margin-bottom:2rem;border-radius:50%;background:var(--green-100);color:var(--green-700);font-weight:700}.people-grid h3{margin-bottom:.3rem}.people-grid p{color:var(--muted);font-size:.85rem}
.route-number{display:inline-flex;align-items:center;gap:1rem;padding:1.2rem 1.8rem;margin-bottom:3rem;color:white;background:var(--blue-950)}.route-number span{text-transform:uppercase;letter-spacing:.1em;font-size:.72rem}.route-number strong{font-size:2rem}
.editorial-warning{padding:1.4rem;margin-bottom:2.5rem;border:2px solid #a86a00;background:#fff7df}.editorial-warning p{margin:.4rem 0 0}
.prose h2{font-size:1.6rem}.prose p{max-width:720px}
@media(max-width:900px){.news-grid,.quick-grid--four,.data-grid,.people-grid{grid-template-columns:repeat(2,1fr)}.discover-section{grid-template-columns:1fr}.discover-photo{min-height:420px}.feature-grid,.project-links{grid-template-columns:1fr}.feature-grid>a{min-height:auto}.feature-grid span{margin-bottom:1.5rem}}
@media(max-width:620px){.news-grid,.quick-grid--four,.data-grid,.people-grid,.card-grid{grid-template-columns:1fr}.section-heading,.contact-band{align-items:flex-start;flex-direction:column}.event-card{grid-template-columns:64px 1fr;padding:1rem;gap:1rem}.event-date{min-height:70px}.detail-list div{grid-template-columns:1fr;gap:.25rem}.timeline li{grid-template-columns:1fr;gap:.4rem;padding-left:1.5rem}.timeline li::before{left:0}.discover-photo{min-height:300px}}