GemeindePortal: Full implementation with Apple HIG redesign

- Landing page with large CTAs and seasonal banner
- Multi-step Pool booking wizard with progress bar
- Animated confirmation modals with calendar save
- Wasserzähler flow with large number input and live consumption
- Admin dashboard with today-stats, CSV export, click-to-call
- BookingCalendar with skeleton loading and 44px touch targets
- Cloudflare Turnstile CAPTCHA on pool form
- Supabase auth, RLS, and API routes
- Inline form validation, sticky submit buttons
- Mobile-first responsive design throughout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Michael
2026-03-02 21:35:32 +01:00
parent 32411cb27f
commit 39eac91568
22 changed files with 2772 additions and 94 deletions

View File

@@ -1,65 +1,98 @@
import Image from "next/image";
import Footer from '@/components/Footer';
import Link from 'next/link';
export default function Home() {
const now = new Date();
const year = now.getFullYear();
const saisonStart = new Date(year, 2, 15);
const saisonEnde = new Date(year, 5, 30);
const isSaison = now >= saisonStart && now <= saisonEnde;
return (
<div className="flex min-h-screen items-center justify-center bg-zinc-50 font-sans dark:bg-black">
<main className="flex min-h-screen w-full max-w-3xl flex-col items-center justify-between py-32 px-16 bg-white dark:bg-black sm:items-start">
<Image
className="dark:invert"
src="/next.svg"
alt="Next.js logo"
width={100}
height={20}
priority
/>
<div className="flex flex-col items-center gap-6 text-center sm:items-start sm:text-left">
<h1 className="max-w-xs text-3xl font-semibold leading-10 tracking-tight text-black dark:text-zinc-50">
To get started, edit the page.tsx file.
<div className="min-h-screen flex flex-col bg-bg">
{/* Gemeinde-Header — prominent, eigenständig */}
<div className="bg-primary text-white">
<div className="max-w-lg mx-auto px-6 pt-10 pb-8 text-center">
{/* Wappen */}
<div className="w-20 h-20 bg-white/15 backdrop-blur-sm rounded-2xl flex items-center justify-center text-3xl font-bold mx-auto mb-4">
W
</div>
<h1 className="text-xl font-bold leading-tight">
Weißkirchen an der Traun
</h1>
<p className="max-w-md text-lg leading-8 text-zinc-600 dark:text-zinc-400">
Looking for a starting point or more instructions? Head over to{" "}
<a
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
className="font-medium text-zinc-950 dark:text-zinc-50"
>
Templates
</a>{" "}
or the{" "}
<a
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
className="font-medium text-zinc-950 dark:text-zinc-50"
>
Learning
</a>{" "}
center.
</p>
<p className="text-white/50 text-sm mt-1">Bürgerportal</p>
</div>
<div className="flex flex-col gap-4 text-base font-medium sm:flex-row">
<a
className="flex h-12 w-full items-center justify-center gap-2 rounded-full bg-foreground px-5 text-background transition-colors hover:bg-[#383838] dark:hover:bg-[#ccc] md:w-[158px]"
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
</div>
<main className="flex-1 max-w-lg mx-auto px-4 w-full -mt-4">
{/* Seasonal Banner */}
{isSaison && (
<div className="bg-accent/10 border border-accent/20 rounded-2xl px-4 py-3 mb-5 text-center">
<p className="text-sm text-accent font-medium">
Pool-Saison läuft bis 30. Juni {year}
</p>
</div>
)}
{/* Warum-Text */}
<p className="text-center text-text-muted text-sm mb-6 px-2">
Große Wasserentnahmen koordinieren, damit die Versorgung für alle gesichert bleibt.
</p>
{/* 2 große CTA Buttons */}
<div className="space-y-3">
<Link
href="/pool"
className="group flex items-center gap-4 bg-white rounded-2xl border border-border p-5 hover:border-accent/40 hover:shadow-lg active:scale-[0.98] transition-all"
>
<Image
className="dark:invert"
src="/vercel.svg"
alt="Vercel logomark"
width={16}
height={16}
/>
Deploy Now
</a>
<a
className="flex h-12 w-full items-center justify-center rounded-full border border-solid border-black/[.08] px-5 transition-colors hover:border-transparent hover:bg-black/[.04] dark:border-white/[.145] dark:hover:bg-[#1a1a1a] md:w-[158px]"
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
<div className="w-14 h-14 bg-accent/10 rounded-xl flex items-center justify-center shrink-0 group-hover:bg-accent/15 transition-colors">
<span className="text-2xl" role="img" aria-label="Pool">&#x1F3CA;</span>
</div>
<div className="flex-1 min-w-0">
<h2 className="text-base font-bold text-primary group-hover:text-accent transition-colors">
Pool-Befüllung anmelden
</h2>
<p className="text-text-muted text-xs mt-0.5">
Wunschtermin wählen, in 2 Min. erledigt
</p>
</div>
<svg className="w-5 h-5 text-text-muted/40 group-hover:text-accent group-hover:translate-x-0.5 transition-all shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" />
</svg>
</Link>
<Link
href="/wasserzaehler"
className="group flex items-center gap-4 bg-white rounded-2xl border border-border p-5 hover:border-accent/40 hover:shadow-lg active:scale-[0.98] transition-all"
>
Documentation
</a>
<div className="w-14 h-14 bg-accent/10 rounded-xl flex items-center justify-center shrink-0 group-hover:bg-accent/15 transition-colors">
<span className="text-2xl" role="img" aria-label="Wasserzähler">&#x1F4A7;</span>
</div>
<div className="flex-1 min-w-0">
<h2 className="text-base font-bold text-primary group-hover:text-accent transition-colors">
Wasserzähler melden
</h2>
<p className="text-text-muted text-xs mt-0.5">
QR-Code scannen, Zählerstand eingeben
</p>
</div>
<svg className="w-5 h-5 text-text-muted/40 group-hover:text-accent group-hover:translate-x-0.5 transition-all shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" />
</svg>
</Link>
</div>
{/* Admin Login Link */}
<div className="mt-16 text-center pb-4">
<Link
href="/admin/login"
className="text-text-muted/50 text-xs hover:text-primary transition-colors"
>
Mitarbeiter-Zugang
</Link>
</div>
</main>
<Footer />
</div>
);
}