Initial commit
Deploy / validate-dispatch (push) Successful in 43s
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 13s
Deploy / secret-scan (push) Successful in 9s
Deploy / app-quality (push) Successful in 11m21s
Deploy / security-deps (push) Successful in 14s
Deploy / context (push) Failing after 1s
Deploy / app-image (push) Skipped
Deploy / deploy-dev (push) Skipped
Deploy / deploy-master (push) Skipped
Deploy / validate-dispatch (push) Successful in 43s
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 13s
Deploy / secret-scan (push) Successful in 9s
Deploy / app-quality (push) Successful in 11m21s
Deploy / security-deps (push) Successful in 14s
Deploy / context (push) Failing after 1s
Deploy / app-image (push) Skipped
Deploy / deploy-dev (push) Skipped
Deploy / deploy-master (push) Skipped
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
import { buildEventsEtag } from "../../../server/calendar/events-transformer";
|
||||
import { getEventsService } from "../../../server/calendar/events-service";
|
||||
import { handleRoute } from "../../../server/calendar/http";
|
||||
|
||||
export const runtime = "nodejs";
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
function parseBoolean(value: string | null): boolean | null {
|
||||
if (value === null) return false;
|
||||
const normalized = value.toLowerCase();
|
||||
if (["true", "1", "on", "yes"].includes(normalized)) return true;
|
||||
if (["false", "0", "off", "no"].includes(normalized)) return false;
|
||||
return null;
|
||||
}
|
||||
|
||||
function ifNoneMatchMatches(headerValue: string | null, etag: string): boolean {
|
||||
if (!headerValue) return false;
|
||||
return headerValue.split(",").some((candidate) => {
|
||||
let normalized = candidate.trim();
|
||||
if (normalized === "*") return true;
|
||||
if (normalized.startsWith("W/")) normalized = normalized.slice(2).trim();
|
||||
return normalized.replace(/^"|"$/g, "") === etag;
|
||||
});
|
||||
}
|
||||
|
||||
export async function GET(request: Request): Promise<Response> {
|
||||
return handleRoute(request, async (config) => {
|
||||
const specialValues = new URL(request.url).searchParams.getAll("special");
|
||||
const special = parseBoolean(specialValues.at(-1) ?? null);
|
||||
if (special === null) {
|
||||
return Response.json(
|
||||
{ detail: "Request validation failed", error: "validation_error" },
|
||||
{ status: 422 },
|
||||
);
|
||||
}
|
||||
|
||||
const service = getEventsService();
|
||||
const events = special ? await service.getSpecialEvents() : await service.getEvents();
|
||||
const etag = special ? buildEventsEtag(events, true) : service.getCachedEtag() ?? buildEventsEtag(events);
|
||||
const cacheSeconds = Math.floor(config.calendarCacheDurationMs / 1_000);
|
||||
const headers = new Headers({
|
||||
"Cache-Control": `public, max-age=${cacheSeconds}, stale-while-revalidate=300`,
|
||||
ETag: `"${etag}"`,
|
||||
});
|
||||
|
||||
if (ifNoneMatchMatches(request.headers.get("if-none-match"), etag)) {
|
||||
return new Response(null, { status: 304, headers });
|
||||
}
|
||||
return Response.json(events, { headers });
|
||||
});
|
||||
}
|
||||
|
||||
export async function OPTIONS(request: Request): Promise<Response> {
|
||||
return handleRoute(request, (config) => {
|
||||
const origin = request.headers.get("origin");
|
||||
const requestedMethod = request.headers.get("access-control-request-method");
|
||||
if (!origin || !requestedMethod) {
|
||||
return Response.json({ detail: "Method Not Allowed", error: "http_error" }, { status: 405 });
|
||||
}
|
||||
|
||||
const failures: string[] = [];
|
||||
if (!config.corsOrigins.includes(origin)) failures.push("origin");
|
||||
if (requestedMethod !== "GET") failures.push("method");
|
||||
if (failures.length > 0) {
|
||||
return new Response(`Disallowed CORS ${failures.join(", ")}`, { status: 400 });
|
||||
}
|
||||
return new Response("OK", { status: 200 });
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import type { Metadata } from "next";
|
||||
import { createPageMetadata } from "../../lib/metadata";
|
||||
import { COMPANY_NAME, CONTACT_ADDRESS, CONTACT_EMAIL, SITE_URL } from "../../lib/site";
|
||||
|
||||
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>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
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">← 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>;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { handleRoute } from "../../../server/calendar/http";
|
||||
|
||||
export const runtime = "nodejs";
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export async function GET(request: Request): Promise<Response> {
|
||||
return handleRoute(request, () => Response.json({ status: "ok" }), {
|
||||
httpOnlyConfig: true,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { handleRoute } from "../../../server/calendar/http";
|
||||
import { readinessResponse } from "../../../server/calendar/readiness";
|
||||
|
||||
export const runtime = "nodejs";
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export async function GET(request: Request): Promise<Response> {
|
||||
return handleRoute(request, readinessResponse, { httpOnlyConfig: true });
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { handleRoute } from "../../server/calendar/http";
|
||||
import { readinessResponse } from "../../server/calendar/readiness";
|
||||
|
||||
export const runtime = "nodejs";
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export async function GET(request: Request): Promise<Response> {
|
||||
return handleRoute(request, readinessResponse, { httpOnlyConfig: true });
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
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";
|
||||
|
||||
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>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
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";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
metadataBase: new URL(SITE_URL),
|
||||
title: {
|
||||
default: SITE_NAME,
|
||||
template: `%s | ${SITE_NAME}`,
|
||||
},
|
||||
icons: { icon: "/logo.svg" },
|
||||
};
|
||||
|
||||
export const viewport: Viewport = {
|
||||
width: "device-width",
|
||||
initialScale: 1,
|
||||
};
|
||||
|
||||
export default async function RootLayout({ children }: Readonly<{ children: ReactNode }>) {
|
||||
await connection();
|
||||
|
||||
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">
|
||||
<Header siteName={SITE_NAME} />
|
||||
<main id="main-content">{children}</main>
|
||||
<Footer />
|
||||
</div>
|
||||
<ScrollToTop />
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import type { Metadata } from "next";
|
||||
import Link from "next/link";
|
||||
import { createPageMetadata } from "../lib/metadata";
|
||||
|
||||
export const metadata: Metadata = createPageMetadata({
|
||||
title: "Seite nicht gefunden",
|
||||
description: "Die angeforderte Seite wurde nicht gefunden.",
|
||||
path: "/404",
|
||||
noindex: true,
|
||||
});
|
||||
|
||||
export default function NotFound() {
|
||||
return (
|
||||
<section className="container page-spacing">
|
||||
<h1>Seite nicht gefunden</h1>
|
||||
<p className="muted">Diese Seite existiert nicht oder wurde verschoben.</p>
|
||||
<Link className="back-link" href="/">← Zur Startseite</Link>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
import type { Metadata } from "next";
|
||||
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";
|
||||
|
||||
const homeMetadata = createPageMetadata({
|
||||
title: "Startseite",
|
||||
description: "Neutrales Starter-Projekt für eine neue Website.",
|
||||
path: "/",
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
...homeMetadata,
|
||||
title: { absolute: SITE_NAME },
|
||||
};
|
||||
|
||||
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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import type { MetadataRoute } from "next";
|
||||
import { SITE_URL } from "../lib/site";
|
||||
|
||||
export default function robots(): MetadataRoute.Robots {
|
||||
return {
|
||||
rules: {
|
||||
userAgent: "*",
|
||||
allow: "/",
|
||||
disallow: ["/api/", "/health", "/downloads/"],
|
||||
},
|
||||
sitemap: `${SITE_URL}/sitemap-index.xml`,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
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" },
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import type { MetadataRoute } from "next";
|
||||
import { getAllTripReports } from "@/trip-reports";
|
||||
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];
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user