chore(repo): sync wireframe structure and references
This commit is contained in:
1 parent
05d2d5777f
commit
d953a79e95
453 files changed
+36639
-621
No files matched your search
@@ -0,0 +1,260 @@
|
||||
"use client";
|
||||
import { useState } from "react";
|
||||
import Link from "next/link";
|
||||
import { Check, TrafficCone } from "lucide-react";
|
||||
import DemoButton from "@/components/ui/DemoButton";
|
||||
|
||||
/* ─── shared input styles ─── */
|
||||
const inputClass =
|
||||
"w-full rounded-lg px-3 h-11 text-[14px] outline-none focus:ring-2 focus:ring-[var(--accent-yellow)]";
|
||||
const inputStyle = {
|
||||
border: "1px solid var(--border-neutral)",
|
||||
background: "var(--surface)",
|
||||
color: "var(--text-primary)",
|
||||
};
|
||||
|
||||
const HAZARD_STRIPES =
|
||||
"repeating-linear-gradient(45deg, #F1B729 0 10px, #171106 10px 20px)";
|
||||
|
||||
/* ─── Left column: construction "wird gerade gebaut" panel ─── */
|
||||
function ConstructionAside() {
|
||||
return (
|
||||
<div className="flex flex-col gap-5 w-full" style={{ maxWidth: 460 }}>
|
||||
<style>{`@keyframes wl-hazard{from{background-position:0 0}to{background-position:28px 0}}@media(prefers-reduced-motion:reduce){.wl-hazard-anim{animation:none!important}}`}</style>
|
||||
|
||||
{/* Absperrband */}
|
||||
<span
|
||||
className="wl-hazard-anim"
|
||||
style={{ width: 120, height: 10, borderRadius: 4, background: HAZARD_STRIPES, backgroundSize: "28px 28px", animation: "wl-hazard 1.1s linear infinite" }}
|
||||
/>
|
||||
|
||||
<h1 className="text-[34px] md:text-[46px] font-extrabold leading-[1.08]" style={{ color: "var(--text-primary)", letterSpacing: "-0.02em" }}>
|
||||
HiveGrid <span style={{ color: "var(--accent-yellow)" }}>wird gerade gebaut.</span>
|
||||
</h1>
|
||||
|
||||
<p className="text-[16px] md:text-[17px] leading-relaxed" style={{ color: "var(--text-secondary)" }}>
|
||||
Wir legen gerade die letzten Handgriffe an. Trag dich in die Warteliste
|
||||
ein und sei von Anfang an dabei, wenn HiveGrid für deinen Betrieb startet.
|
||||
</p>
|
||||
|
||||
<div className="flex items-center gap-3 text-[13px] font-medium" style={{ color: "var(--text-tertiary)" }}>
|
||||
<TrafficCone size={18} strokeWidth={2} style={{ color: "var(--accent-yellow-dark)" }} />
|
||||
<span>In Arbeit · Start in Kürze. Kein Spam, wir melden uns persönlich.</span>
|
||||
</div>
|
||||
|
||||
{/* heyData DSGVO seal */}
|
||||
<a
|
||||
href="https://heydata.eu"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
title="heyData GDPR seal"
|
||||
className="mt-2 flex flex-col items-start gap-2"
|
||||
>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img
|
||||
alt="heyData DSGVO-Siegel – DSGVO-konforme Verarbeitung"
|
||||
src="https://api.heydata.eu/privacy-seal/seal/2cdc4714-a706-4790-975c-7c95935905fe?lang=de&design=design1&sealType=GDPR"
|
||||
width={96}
|
||||
height={96}
|
||||
style={{ border: 0 }}
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
/* ─── Honeycomb backdrop — just the pattern (no hub, no cards), faded on all
|
||||
edges AND in the centre so it stays subtle behind the content. ─── */
|
||||
const HEX_FIELD = (() => {
|
||||
const r = 33; // hex radius (centre → vertex)
|
||||
const rr = r - 1.6; // slight inset → thin gaps between combs
|
||||
const dh2 = (Math.sqrt(3) / 2) * rr;
|
||||
const h2 = (Math.sqrt(3) / 2) * r;
|
||||
const colStep = 1.5 * r;
|
||||
const rowStep = 2 * h2;
|
||||
const VW = 1600, VH = 1040;
|
||||
const paths: string[] = [];
|
||||
for (let col = 0; col * colStep < VW + r; col++) {
|
||||
const cx = col * colStep;
|
||||
const yOff = col % 2 ? h2 : 0;
|
||||
for (let cy = -rowStep + yOff; cy < VH + rowStep; cy += rowStep) {
|
||||
const f = (n: number) => n.toFixed(1);
|
||||
paths.push(
|
||||
`M${f(cx + rr)} ${f(cy)}L${f(cx + rr / 2)} ${f(cy - dh2)}L${f(cx - rr / 2)} ${f(cy - dh2)}L${f(cx - rr)} ${f(cy)}L${f(cx - rr / 2)} ${f(cy + dh2)}L${f(cx + rr / 2)} ${f(cy + dh2)}Z`,
|
||||
);
|
||||
}
|
||||
}
|
||||
return { paths, VW, VH };
|
||||
})();
|
||||
|
||||
// Ellipse that clears the centre (behind the content) and fades to nothing well
|
||||
// INSIDE the section box → soft fade on every edge, incl. the bottom seam.
|
||||
const HC_MASK =
|
||||
"radial-gradient(82% 70% at 50% 45%, transparent 0%, rgba(0,0,0,0.08) 20%, #000 40%, #000 52%, transparent 76%)";
|
||||
|
||||
function HoneycombBackdrop() {
|
||||
return (
|
||||
<div
|
||||
aria-hidden
|
||||
className="absolute inset-0 pointer-events-none"
|
||||
style={{ zIndex: 0, WebkitMaskImage: HC_MASK, maskImage: HC_MASK }}
|
||||
>
|
||||
<svg className="w-full h-full" viewBox={`0 0 ${HEX_FIELD.VW} ${HEX_FIELD.VH}`} preserveAspectRatio="xMidYMid slice">
|
||||
{HEX_FIELD.paths.map((d, i) => (
|
||||
<path key={i} d={d} fill="#F1B729" fillOpacity={0.08} />
|
||||
))}
|
||||
</svg>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function WaitlistForm() {
|
||||
const [state, setState] = useState<"idle" | "loading" | "ok" | "err">("idle");
|
||||
const [errMsg, setErrMsg] = useState("");
|
||||
const [form, setForm] = useState({
|
||||
vorname: "",
|
||||
nachname: "",
|
||||
email: "",
|
||||
unternehmen: "",
|
||||
nachricht: "",
|
||||
dsgvo: false,
|
||||
});
|
||||
|
||||
const update = (k: string, v: string | boolean) =>
|
||||
setForm((f) => ({ ...f, [k]: v }));
|
||||
|
||||
const handleSubmit = async (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
if (!form.email || !form.vorname || !form.dsgvo) return;
|
||||
setState("loading");
|
||||
setErrMsg("");
|
||||
try {
|
||||
const res = await fetch("/api/demo-request", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({
|
||||
firstName: form.vorname,
|
||||
lastName: form.nachname,
|
||||
email: form.email,
|
||||
company: form.unternehmen,
|
||||
message: form.nachricht,
|
||||
source: "HiveGrid Warteliste",
|
||||
}),
|
||||
});
|
||||
if (!res.ok) {
|
||||
const data = await res.json().catch(() => null);
|
||||
throw new Error(data?.error || "Fehler beim Senden.");
|
||||
}
|
||||
setState("ok");
|
||||
} catch (err) {
|
||||
setState("err");
|
||||
setErrMsg(err instanceof Error ? err.message : "Fehler beim Senden.");
|
||||
}
|
||||
};
|
||||
|
||||
/* ─── Success state ─── */
|
||||
if (state === "ok") {
|
||||
return (
|
||||
<section
|
||||
className="section-full"
|
||||
style={{ paddingTop: "var(--hero-top-padding)", paddingBottom: 80, minHeight: "70vh" }}
|
||||
>
|
||||
<div className="flex flex-col items-center gap-6 mx-auto text-center" style={{ maxWidth: 560 }}>
|
||||
<div
|
||||
className="flex items-center justify-center rounded-full"
|
||||
style={{ width: 80, height: 80, background: "var(--accent-yellow-light)" }}
|
||||
>
|
||||
<Check size={38} style={{ color: "var(--accent-yellow-dark)" }} />
|
||||
</div>
|
||||
<h1 className="text-[32px] md:text-[42px] font-bold" style={{ color: "var(--text-primary)" }}>
|
||||
Du bist auf der Warteliste!
|
||||
</h1>
|
||||
<p className="text-[16px] md:text-[18px] leading-relaxed" style={{ color: "var(--text-secondary)" }}>
|
||||
Wir melden uns bei dir, sobald HiveGrid für deinen Betrieb bereit
|
||||
ist. Kein Spam, versprochen.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
/* ─── Form ─── */
|
||||
return (
|
||||
<section className="section-full" style={{ position: "relative", overflow: "hidden", background: "var(--surface)", paddingTop: "var(--hero-top-padding)", paddingBottom: 80 }}>
|
||||
<HoneycombBackdrop />
|
||||
<div className="relative mx-auto" style={{ zIndex: 1, maxWidth: "var(--content-width)" }}>
|
||||
<div className="flex flex-col lg:flex-row lg:items-center gap-14 lg:gap-20">
|
||||
{/* ── Left: construction panel ── */}
|
||||
<div className="lg:flex-1 flex justify-center lg:justify-start">
|
||||
<ConstructionAside />
|
||||
</div>
|
||||
|
||||
{/* ── Right: form, centered ── */}
|
||||
<div className="lg:flex-1 flex justify-center">
|
||||
<form onSubmit={handleSubmit} className="flex flex-col gap-5 w-full" style={{ maxWidth: 460 }}>
|
||||
{/* Vorname / Nachname */}
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<label className="flex flex-col gap-1.5">
|
||||
<span className="text-[13px] font-medium" style={{ color: "var(--text-primary)" }}>Vorname *</span>
|
||||
<input suppressHydrationWarning required value={form.vorname} onChange={(e) => update("vorname", e.target.value)} className={inputClass} style={inputStyle} />
|
||||
</label>
|
||||
<label className="flex flex-col gap-1.5">
|
||||
<span className="text-[13px] font-medium" style={{ color: "var(--text-primary)" }}>Nachname</span>
|
||||
<input suppressHydrationWarning value={form.nachname} onChange={(e) => update("nachname", e.target.value)} className={inputClass} style={inputStyle} />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{/* E-Mail */}
|
||||
<label className="flex flex-col gap-1.5">
|
||||
<span className="text-[13px] font-medium" style={{ color: "var(--text-primary)" }}>E-Mail *</span>
|
||||
<input suppressHydrationWarning required type="email" value={form.email} onChange={(e) => update("email", e.target.value)} className={inputClass} style={inputStyle} />
|
||||
</label>
|
||||
|
||||
{/* Unternehmen */}
|
||||
<label className="flex flex-col gap-1.5">
|
||||
<span className="text-[13px] font-medium" style={{ color: "var(--text-primary)" }}>Unternehmen</span>
|
||||
<input suppressHydrationWarning value={form.unternehmen} onChange={(e) => update("unternehmen", e.target.value)} className={inputClass} style={inputStyle} />
|
||||
</label>
|
||||
|
||||
{/* Nachricht (optional) */}
|
||||
<label className="flex flex-col gap-1.5">
|
||||
<span className="text-[13px] font-medium" style={{ color: "var(--text-primary)" }}>
|
||||
Nachricht <span style={{ color: "var(--text-tertiary)" }}>(optional)</span>
|
||||
</span>
|
||||
<textarea
|
||||
suppressHydrationWarning
|
||||
rows={4}
|
||||
placeholder="Eine Frage oder was dir wichtig ist?"
|
||||
value={form.nachricht}
|
||||
onChange={(e) => update("nachricht", e.target.value)}
|
||||
className="w-full rounded-lg px-3 py-2.5 text-[14px] outline-none resize-y focus:ring-2 focus:ring-[var(--accent-yellow)]"
|
||||
style={inputStyle}
|
||||
/>
|
||||
</label>
|
||||
|
||||
{/* DSGVO */}
|
||||
<label className="flex items-start gap-2.5 cursor-pointer">
|
||||
<input type="checkbox" checked={form.dsgvo} onChange={(e) => update("dsgvo", e.target.checked)} className="mt-1 shrink-0 accent-[var(--accent-yellow)]" />
|
||||
<span className="text-[13px] leading-relaxed" style={{ color: "var(--text-secondary)" }}>
|
||||
Ich stimme der Verarbeitung meiner Daten gemäß der{" "}
|
||||
<Link href="/datenschutz" className="underline underline-offset-2 hover:no-underline" style={{ color: "var(--accent-yellow)" }}>
|
||||
Datenschutzerklärung
|
||||
</Link>{" "}
|
||||
zu. *
|
||||
</span>
|
||||
</label>
|
||||
|
||||
{state === "err" && (
|
||||
<p className="text-[13px] font-medium" style={{ color: "#EF4444" }}>{errMsg}</p>
|
||||
)}
|
||||
|
||||
<DemoButton type="submit" disabled={state === "loading"} fullWidth>
|
||||
{state === "loading" ? "Sende …" : "Auf die Warteliste"}
|
||||
</DemoButton>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
"use client";
|
||||
|
||||
import { useCallback, useEffect, useRef, useState, type ReactNode } from "react";
|
||||
import Link from "next/link";
|
||||
import {
|
||||
ChatCircleDots,
|
||||
PaperPlaneTilt,
|
||||
Kanban,
|
||||
FlowArrow,
|
||||
ClipboardText,
|
||||
ArrowRight,
|
||||
CaretLeft,
|
||||
CaretRight,
|
||||
} from "@phosphor-icons/react/ssr";
|
||||
import type { Icon as PhosphorIcon } from "@phosphor-icons/react";
|
||||
import { CHAMFER } from "@/lib/chamfer";
|
||||
import WebChatDemo from "@/components/sections/WebChatDemo";
|
||||
import EmailBuilder from "@/components/sections/EmailBuilder";
|
||||
import KanbanBoard from "@/components/sections/KanbanBoard";
|
||||
import WorkflowEditor from "@/components/sections/WorkflowEditor";
|
||||
import ApprovalInbox from "@/components/sections/ApprovalInbox";
|
||||
|
||||
const HEX = "polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%)";
|
||||
|
||||
type Module = { name: string; blurb: string; href: string; Icon: PhosphorIcon; demo: ReactNode };
|
||||
|
||||
// The real interactive product modules — shown here display-only (see the
|
||||
// `inert` embed below) with a CTA to the subpage where they're interactive.
|
||||
// Vertriebspipelines is intentionally excluded.
|
||||
const MODULES: Module[] = [
|
||||
{ name: "Team-Chat", blurb: "Projektkanäle und Aufgaben direkt aus dem Chat.", href: "/produkt/chat", Icon: ChatCircleDots, demo: <WebChatDemo /> },
|
||||
{ name: "E-Mail-Baukasten", blurb: "Kampagnen per Drag-and-drop selbst gebaut.", href: "/produkt/email-marketing", Icon: PaperPlaneTilt, demo: <EmailBuilder hideHeader /> },
|
||||
{ name: "Kanban-Board", blurb: "Projekte und Baustellen im Blick.", href: "/produkt/projektmanagement", Icon: Kanban, demo: <KanbanBoard hideHeader /> },
|
||||
{ name: "Workflow-Editor", blurb: "Abläufe visuell und ohne Code.", href: "/produkt/workflow-engine", Icon: FlowArrow, demo: <WorkflowEditor hideHeader /> },
|
||||
{ name: "Freigaben", blurb: "Anträge freigeben oder ablehnen, in Sekunden.", href: "/produkt/mitarbeitermanagement", Icon: ClipboardText, demo: <ApprovalInbox hideHeader /> },
|
||||
];
|
||||
|
||||
export default function WaitlistModules() {
|
||||
const trackRef = useRef<HTMLDivElement>(null);
|
||||
const [active, setActive] = useState(0);
|
||||
|
||||
const goTo = useCallback((i: number) => {
|
||||
const track = trackRef.current;
|
||||
if (!track) return;
|
||||
const clamped = Math.max(0, Math.min(MODULES.length - 1, i));
|
||||
track.scrollTo({ left: clamped * track.clientWidth, behavior: "smooth" });
|
||||
}, []);
|
||||
|
||||
// Make the embedded demos truly non-interactive: `inert` also drops them out
|
||||
// of the tab order (pointer-events:none only blocks the mouse). Set via DOM
|
||||
// property so it works regardless of React's attribute handling.
|
||||
useEffect(() => {
|
||||
trackRef.current?.querySelectorAll<HTMLElement>(".demo-embed").forEach((el) => {
|
||||
el.inert = true;
|
||||
});
|
||||
}, []);
|
||||
|
||||
// Keep the active dot/arrows in sync with native (swipe) scrolling.
|
||||
useEffect(() => {
|
||||
const track = trackRef.current;
|
||||
if (!track) return;
|
||||
let raf = 0;
|
||||
const onScroll = () => {
|
||||
cancelAnimationFrame(raf);
|
||||
raf = requestAnimationFrame(() => {
|
||||
setActive(Math.round(track.scrollLeft / track.clientWidth));
|
||||
});
|
||||
};
|
||||
track.addEventListener("scroll", onScroll, { passive: true });
|
||||
return () => {
|
||||
track.removeEventListener("scroll", onScroll);
|
||||
cancelAnimationFrame(raf);
|
||||
};
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<section className="section-full wl-modules" style={{ background: "var(--bg-primary)", paddingBlock: 96 }}>
|
||||
<style>{`
|
||||
.wl-modules .demo-embed .section-full{ padding:14px 14px 0 !important; background:transparent !important; width:100% !important; min-height:0 !important; }
|
||||
.wl-modules .no-scrollbar{ scrollbar-width:none; -ms-overflow-style:none; }
|
||||
.wl-modules .no-scrollbar::-webkit-scrollbar{ display:none; }
|
||||
/* the modules' onboarding hint popups make no sense in a display-only preview */
|
||||
.wl-modules [data-canvas-hint]{ display:none !important; }
|
||||
`}</style>
|
||||
|
||||
<div className="mx-auto flex flex-col items-center" style={{ maxWidth: "var(--content-width)" }}>
|
||||
{/* transition from the timeline into "what you actually get" */}
|
||||
<div className="flex flex-col items-center gap-3 text-center mb-20 md:mb-24">
|
||||
<span
|
||||
className="text-[12px] font-semibold tracking-widest chamfer-badge px-3 py-1"
|
||||
style={{ background: "var(--accent-yellow-light)", color: "var(--accent-yellow-dark)" }}
|
||||
>
|
||||
DAS BEKOMMST DU
|
||||
</span>
|
||||
<h2 className="text-[28px] md:text-[38px] font-bold leading-[1.15]" style={{ color: "var(--text-primary)" }}>
|
||||
Ein Blick in deinen künftigen Betrieb.
|
||||
</h2>
|
||||
<p className="text-[16px] md:text-[17px] max-w-[580px]" style={{ color: "var(--text-secondary)" }}>
|
||||
Von Team-Chat bis Rechnungs-Automatik: die Module, mit denen dein Betrieb
|
||||
bald läuft. Wisch dich durch und probier jedes live auf seiner Seite aus.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="relative w-full">
|
||||
{/* arrows (desktop) */}
|
||||
<button
|
||||
type="button"
|
||||
aria-label="Vorheriges Modul"
|
||||
onClick={() => goTo(active - 1)}
|
||||
disabled={active === 0}
|
||||
className="hidden md:grid place-items-center absolute left-0 top-1/2 -translate-y-1/2 -translate-x-1/2 z-20 w-11 h-11 rounded-full transition disabled:opacity-0"
|
||||
style={{ background: "#fff", color: "var(--text-primary)", boxShadow: "0 8px 24px -8px rgba(15,23,42,0.35)" }}
|
||||
>
|
||||
<CaretLeft size={20} weight="bold" />
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
aria-label="Nächstes Modul"
|
||||
onClick={() => goTo(active + 1)}
|
||||
disabled={active === MODULES.length - 1}
|
||||
className="hidden md:grid place-items-center absolute right-0 top-1/2 -translate-y-1/2 translate-x-1/2 z-20 w-11 h-11 rounded-full transition disabled:opacity-0"
|
||||
style={{ background: "#fff", color: "var(--text-primary)", boxShadow: "0 8px 24px -8px rgba(15,23,42,0.35)" }}
|
||||
>
|
||||
<CaretRight size={20} weight="bold" />
|
||||
</button>
|
||||
|
||||
{/* track */}
|
||||
<div
|
||||
ref={trackRef}
|
||||
className="no-scrollbar"
|
||||
style={{ display: "flex", overflowX: "auto", scrollSnapType: "x mandatory", scrollBehavior: "smooth" }}
|
||||
>
|
||||
{MODULES.map((m) => (
|
||||
<div
|
||||
key={m.name}
|
||||
className="px-1 md:px-8"
|
||||
style={{ flex: "0 0 100%", minWidth: 0, scrollSnapAlign: "center" }}
|
||||
>
|
||||
{/* caption */}
|
||||
<div className="flex items-center justify-center gap-3 mb-4">
|
||||
<span className="grid place-items-center shrink-0" style={{ width: 40, height: 35, clipPath: HEX, background: "var(--accent-yellow-light)" }}>
|
||||
<m.Icon size={20} weight="duotone" style={{ color: "var(--accent-yellow-dark)" }} />
|
||||
</span>
|
||||
<div className="text-left">
|
||||
<h3 className="text-[17px] md:text-[19px] font-bold leading-tight" style={{ color: "var(--text-primary)" }}>{m.name}</h3>
|
||||
<p className="text-[13.5px] leading-tight" style={{ color: "var(--text-secondary)" }}>{m.blurb}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* preview frame — display-only module + fade + CTA */}
|
||||
<div
|
||||
className="relative overflow-hidden mx-auto"
|
||||
style={{ background: "#fff", clipPath: CHAMFER, height: "clamp(420px, 60vh, 520px)", filter: "drop-shadow(0 24px 44px rgba(15,23,42,0.14))" }}
|
||||
>
|
||||
<div className="demo-embed absolute inset-0" style={{ pointerEvents: "none" }} aria-hidden>
|
||||
{m.demo}
|
||||
</div>
|
||||
|
||||
{/* bottom fade so the clipped module reads as a peek, not a cut */}
|
||||
<div
|
||||
className="absolute inset-x-0 bottom-0 pointer-events-none"
|
||||
style={{ height: 150, background: "linear-gradient(to bottom, rgba(255,255,255,0) 0%, #fff 82%)" }}
|
||||
aria-hidden
|
||||
/>
|
||||
|
||||
<Link
|
||||
href={m.href}
|
||||
className="absolute left-1/2 bottom-6 -translate-x-1/2 z-10 inline-flex items-center gap-2 rounded-[var(--radius-button)] font-semibold text-[15px] px-5 py-2.5 transition-transform hover:-translate-y-0.5"
|
||||
style={{ background: "var(--accent-yellow)", color: "var(--text-primary)", boxShadow: "0 10px 24px -6px rgba(241,183,41,0.6)" }}
|
||||
>
|
||||
Live ausprobieren
|
||||
<ArrowRight size={17} weight="bold" />
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* dots */}
|
||||
<div className="flex items-center justify-center gap-2.5 mt-8">
|
||||
{MODULES.map((m, i) => (
|
||||
<button
|
||||
key={m.name}
|
||||
type="button"
|
||||
aria-label={`Zu ${m.name}`}
|
||||
aria-current={i === active}
|
||||
onClick={() => goTo(i)}
|
||||
className="rounded-full transition-all"
|
||||
style={{
|
||||
width: i === active ? 26 : 9,
|
||||
height: 9,
|
||||
background: i === active ? "var(--accent-yellow)" : "var(--border-light)",
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect, useRef } from "react";
|
||||
import { gsap } from "gsap";
|
||||
import { ScrollTrigger } from "gsap/dist/ScrollTrigger";
|
||||
import { EnvelopeSimple, ChatCircleDots, Confetti } from "@phosphor-icons/react/ssr";
|
||||
import type { Icon as PhosphorIcon } from "@phosphor-icons/react";
|
||||
|
||||
// Flat-top hexagon → ties the step nodes into the honeycomb theme.
|
||||
const HEX = "polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%)";
|
||||
|
||||
type Step = { n: string; t: string; d: string; Icon: PhosphorIcon };
|
||||
|
||||
const STEPS: Step[] = [
|
||||
{ n: "01", t: "Du trägst dich ein", d: "Eine E-Mail genügt. Kein Vertrag, keine Kreditkarte, komplett unverbindlich.", Icon: EnvelopeSimple },
|
||||
{ n: "02", t: "Wir melden uns", d: "Sobald HiveGrid für deinen Betrieb bereit ist, persönlich und ohne Spam.", Icon: ChatCircleDots },
|
||||
{ n: "03", t: "Du bist von Anfang an dabei", d: "Unter den Ersten, die HiveGrid nutzen und mitgestalten.", Icon: Confetti },
|
||||
];
|
||||
|
||||
// Scroll-linked "how it works" timeline: a fill line grows with scroll progress
|
||||
// and each hex node lights up the moment the fill reaches it.
|
||||
export default function WaitlistNext() {
|
||||
const listRef = useRef<HTMLDivElement>(null);
|
||||
const trackRef = useRef<HTMLSpanElement>(null);
|
||||
const fillRef = useRef<HTMLSpanElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
const list = listRef.current;
|
||||
const track = trackRef.current;
|
||||
const fill = fillRef.current;
|
||||
if (!list || !track || !fill) return;
|
||||
|
||||
const steps = Array.from(list.querySelectorAll<HTMLElement>("[data-step]"));
|
||||
const hexes = steps.map((s) => s.querySelector<HTMLElement>("[data-node]")!);
|
||||
|
||||
// Reduced motion: skip the scrub, just show the finished state.
|
||||
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
||||
const lr = list.getBoundingClientRect();
|
||||
const first = hexes[0].getBoundingClientRect().top - lr.top + hexes[0].offsetHeight / 2;
|
||||
const last = hexes[hexes.length - 1].getBoundingClientRect().top - lr.top + hexes[hexes.length - 1].offsetHeight / 2;
|
||||
track.style.top = fill.style.top = `${first}px`;
|
||||
track.style.height = fill.style.height = `${last - first}px`;
|
||||
steps.forEach((s) => s.classList.add("is-active"));
|
||||
return;
|
||||
}
|
||||
|
||||
gsap.registerPlugin(ScrollTrigger);
|
||||
let centers: number[] = [];
|
||||
let first = 0;
|
||||
let span = 0;
|
||||
|
||||
const measure = () => {
|
||||
const lr = list.getBoundingClientRect();
|
||||
centers = hexes.map((h) => h.getBoundingClientRect().top - lr.top + h.offsetHeight / 2);
|
||||
first = centers[0];
|
||||
span = centers[centers.length - 1] - first;
|
||||
track.style.top = `${first}px`;
|
||||
track.style.height = `${span}px`;
|
||||
fill.style.top = `${first}px`;
|
||||
};
|
||||
|
||||
const ctx = gsap.context(() => {
|
||||
measure();
|
||||
ScrollTrigger.create({
|
||||
trigger: list,
|
||||
start: "top 80%",
|
||||
end: "bottom 62%",
|
||||
scrub: 0.4,
|
||||
onRefresh: measure,
|
||||
onUpdate: (self) => {
|
||||
const filled = self.progress * span;
|
||||
fill.style.height = `${filled}px`;
|
||||
const reach = first + filled;
|
||||
steps.forEach((s, i) => s.classList.toggle("is-active", reach >= centers[i] - 1));
|
||||
},
|
||||
});
|
||||
}, list);
|
||||
|
||||
return () => ctx.revert();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<section className="section-full wl-next" style={{ background: "var(--surface)", paddingBlock: 88 }}>
|
||||
<style>{`
|
||||
.wl-next [data-node]{ background:#E8EAEF; transition:background .5s ease, transform .5s cubic-bezier(.2,.8,.2,1), filter .5s ease; }
|
||||
.wl-next [data-node] svg{ color:var(--text-tertiary); transition:color .5s ease; }
|
||||
.wl-next [data-num]{ color:var(--text-tertiary); transition:color .5s ease; }
|
||||
.wl-next [data-title]{ opacity:.82; transition:opacity .5s ease; }
|
||||
.wl-next [data-step] p{ opacity:.66; transition:opacity .5s ease; }
|
||||
.wl-next [data-step].is-active [data-node]{ background:var(--accent-yellow); transform:scale(1.07); filter:drop-shadow(0 8px 18px rgba(241,183,41,.5)); }
|
||||
.wl-next [data-step].is-active [data-node] svg{ color:#171106; }
|
||||
.wl-next [data-step].is-active [data-num]{ color:var(--accent-yellow-dark); }
|
||||
.wl-next [data-step].is-active [data-title]{ opacity:1; }
|
||||
.wl-next [data-step].is-active p{ opacity:1; }
|
||||
.wl-next .rail-head{ position:absolute; left:50%; bottom:-4px; transform:translateX(-50%); width:11px; height:11px; border-radius:50%; background:var(--accent-yellow); box-shadow:0 0 14px 2px rgba(241,183,41,.75); }
|
||||
`}</style>
|
||||
|
||||
<div className="mx-auto flex flex-col items-center gap-12" style={{ maxWidth: "var(--content-width)" }}>
|
||||
<div className="flex flex-col items-center gap-3 text-center">
|
||||
<span
|
||||
className="text-[12px] font-semibold tracking-widest chamfer-badge px-3 py-1"
|
||||
style={{ background: "var(--accent-yellow-light)", color: "var(--accent-yellow-dark)" }}
|
||||
>
|
||||
SO GEHT'S WEITER
|
||||
</span>
|
||||
<h2 className="text-[28px] md:text-[38px] font-bold leading-[1.15]" style={{ color: "var(--text-primary)" }}>
|
||||
Was nach deiner Anmeldung passiert.
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div ref={listRef} className="relative w-full" style={{ maxWidth: 560 }}>
|
||||
{/* rail: dim track + animated fill with a glowing head */}
|
||||
<span ref={trackRef} aria-hidden className="absolute rounded-full" style={{ left: 26, width: 2, top: 0, height: 0, background: "var(--border-light)" }} />
|
||||
<span ref={fillRef} aria-hidden className="absolute rounded-full rail-fill" style={{ left: 26, width: 2, top: 0, height: 0, background: "linear-gradient(var(--accent-yellow), var(--accent-yellow-dark))" }}>
|
||||
<span className="rail-head" aria-hidden />
|
||||
</span>
|
||||
|
||||
{STEPS.map((s, i) => (
|
||||
<div
|
||||
key={s.n}
|
||||
data-step
|
||||
className="relative flex items-start gap-5 md:gap-6"
|
||||
style={{ paddingBottom: i === STEPS.length - 1 ? 0 : 56 }}
|
||||
>
|
||||
<span data-node className="relative z-10 grid place-items-center shrink-0" style={{ width: 54, height: 48, clipPath: HEX }}>
|
||||
<s.Icon size={24} weight="duotone" />
|
||||
</span>
|
||||
<div className="pt-1.5">
|
||||
<div className="flex items-baseline gap-2.5">
|
||||
<span data-num className="text-[13px] font-extrabold tracking-[0.14em]">{s.n}</span>
|
||||
<h3 data-title className="text-[18px] md:text-[20px] font-bold" style={{ color: "var(--text-primary)" }}>{s.t}</h3>
|
||||
</div>
|
||||
<p className="text-[14.5px] leading-relaxed mt-1.5 max-w-[420px]" style={{ color: "var(--text-secondary)" }}>{s.d}</p>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import type { Metadata } from "next";
|
||||
import WaitlistForm from "./WaitlistForm";
|
||||
import WaitlistNext from "./WaitlistNext";
|
||||
import WaitlistModules from "./WaitlistModules";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Warteliste",
|
||||
description:
|
||||
"HiveGrid startet bald. Trag dich in die Warteliste ein und gehör zu den Ersten, die loslegen. Kostenlos und unverbindlich.",
|
||||
alternates: { canonical: "/waitlist" },
|
||||
};
|
||||
|
||||
export default function WaitlistPage() {
|
||||
return (
|
||||
<>
|
||||
<WaitlistForm />
|
||||
<WaitlistNext />
|
||||
<WaitlistModules />
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user