228 lines
9.1 KiB
TypeScript
228 lines
9.1 KiB
TypeScript
import Link from "next/link";
|
|
import { CHAMFER } from "@/lib/chamfer";
|
|
import type { ReactNode } from "react";
|
|
import DemoButton from "@/components/ui/DemoButton";
|
|
import { AnimatedDavidCard } from "@/app/ueber-uns/TeamCards";
|
|
|
|
/* ──────────────────────────────────────────────────────────────────────────
|
|
* CTA banner with three interchangeable right-side visuals. Shared by the
|
|
* landing page and the product pages so each surface can pick the variant
|
|
* that fits (not the same one everywhere):
|
|
* - "hex": honeycomb texture (abstract brand)
|
|
* - "portrait": David-portrait frame (human touch)
|
|
* - "kanban": kanban board preview (product peek / pipeline)
|
|
* ────────────────────────────────────────────────────────────────────────── */
|
|
|
|
export type CtaVariant = "hex" | "portrait" | "kanban";
|
|
|
|
function HexRightArt() {
|
|
// Brand honeycomb graphic over the text-free right area. Two layers:
|
|
// 1. the honeycomb (public/cta-honeycomb.svg) at uniform strength
|
|
// 2. a navy background that fades in from the right (0%) to the left (100%),
|
|
// revealing the honeycomb progressively toward the right.
|
|
return (
|
|
<div className="absolute inset-0 pointer-events-none" aria-hidden>
|
|
<div
|
|
className="absolute inset-0"
|
|
style={{
|
|
backgroundImage: "url(/cta-honeycomb.svg)",
|
|
backgroundSize: "auto 120%",
|
|
backgroundPosition: "center right",
|
|
backgroundRepeat: "repeat-x",
|
|
opacity: 1,
|
|
}}
|
|
/>
|
|
<div
|
|
className="absolute inset-0"
|
|
style={{
|
|
background:
|
|
"linear-gradient(90deg, var(--dark-bg) 0%, var(--dark-bg) 40%, transparent 100%)",
|
|
}}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
function PortraitRightArt() {
|
|
return (
|
|
<div className="relative shrink-0 hidden lg:block" aria-hidden>
|
|
<AnimatedDavidCard />
|
|
</div>
|
|
);
|
|
}
|
|
|
|
// Mini priority flag — same mark as the projektmanagement KanbanBoard, lighter
|
|
// tints so it reads on the dark CTA background.
|
|
function MiniFlag({ priority }: { priority: "high" | "medium" | "low" }) {
|
|
const color = priority === "high" ? "#F87171" : priority === "medium" ? "#F1B729" : "rgba(255,255,255,0.35)";
|
|
return (
|
|
<svg width="11" height="11" viewBox="0 0 24 24" fill={color} stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="shrink-0">
|
|
<path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z" />
|
|
<line x1="4" y1="22" x2="4" y2="15" />
|
|
</svg>
|
|
);
|
|
}
|
|
|
|
function KanbanRightArt() {
|
|
const columns = [
|
|
{
|
|
title: "Angebote",
|
|
accent: "#93C5FD",
|
|
cards: [
|
|
{ title: "Sanitär Neubau · Weber", tag: "Neu", tagColor: "#93C5FD", priority: "high" as const, value: "€ 42.500", initials: "MW" },
|
|
{ title: "Heizung Modernis. · Berg", tag: "Follow-up", tagColor: "#F1B729", priority: "medium" as const, value: "€ 18.900", initials: "LK" },
|
|
],
|
|
},
|
|
{
|
|
title: "Baustellen",
|
|
accent: "#F1B729",
|
|
cards: [
|
|
{ title: "Solarcarport · Linnich", tag: "Planung", tagColor: "#F1B729", priority: "high" as const, value: "€ 73.800", initials: "AW" },
|
|
],
|
|
},
|
|
{
|
|
title: "Abgeschlossen",
|
|
accent: "#4ADE80",
|
|
cards: [
|
|
{ title: "Wartung Müller", tag: "OK", tagColor: "#4ADE80", priority: "low" as const, value: "12 Anlagen", initials: "SM" },
|
|
{ title: "Bad Renov. Fischer", tag: "Abgenommen", tagColor: "#4ADE80", priority: "low" as const, value: "€ 24.300", initials: "TB" },
|
|
],
|
|
},
|
|
];
|
|
return (
|
|
<div className="relative hidden lg:flex flex-col gap-2 shrink-0" style={{ width: 380 }} aria-hidden>
|
|
<span
|
|
className="self-end text-[9px] font-semibold uppercase tracking-wider rounded-full mb-0.5"
|
|
style={{ padding: "2px 8px", background: "rgba(255,255,255,0.08)", color: "rgba(255,255,255,0.55)", border: "1px solid rgba(255,255,255,0.12)" }}
|
|
>
|
|
Beispielansicht
|
|
</span>
|
|
<div className="grid grid-cols-3 gap-2.5">
|
|
{columns.map((col) => (
|
|
<div key={col.title} className="flex flex-col gap-2">
|
|
<div className="flex items-center gap-1.5 pb-1">
|
|
<span className="inline-block" style={{ width: 6, height: 6, borderRadius: 2, background: col.accent }} />
|
|
<span className="text-[10.5px] font-bold uppercase tracking-wider" style={{ color: "rgba(255,255,255,0.75)" }}>
|
|
{col.title}
|
|
</span>
|
|
</div>
|
|
{col.cards.map((card, i) => (
|
|
// Same card anatomy as the projektmanagement board: tag + priority
|
|
// flag row, prominent title, footer with an avatar and a chip —
|
|
// just re-coloured for the dark banner.
|
|
<div
|
|
key={i}
|
|
className="flex flex-col gap-1.5"
|
|
style={{
|
|
background: "rgba(255,255,255,0.05)",
|
|
border: "1px solid rgba(255,255,255,0.08)",
|
|
borderRadius: 10,
|
|
padding: "9px 10px",
|
|
}}
|
|
>
|
|
{/* Row 1: tag · priority flag */}
|
|
<div className="flex items-start justify-between gap-1.5">
|
|
<span
|
|
className="inline-flex text-[8.5px] font-bold uppercase tracking-wider px-1.5 py-0.5 rounded self-start"
|
|
style={{ background: `${card.tagColor}26`, color: card.tagColor, border: `1px solid ${card.tagColor}40` }}
|
|
>
|
|
{card.tag}
|
|
</span>
|
|
<MiniFlag priority={card.priority} />
|
|
</div>
|
|
|
|
{/* Title */}
|
|
<span className="text-[11.5px] font-semibold leading-tight" style={{ color: "#fff" }}>
|
|
{card.title}
|
|
</span>
|
|
|
|
{/* Footer: avatar · value chip */}
|
|
<div className="flex items-center justify-between gap-1.5 pt-1.5" style={{ borderTop: "1px solid rgba(255,255,255,0.08)" }}>
|
|
<span
|
|
className="grid place-items-center rounded-full shrink-0 text-[8px] font-bold"
|
|
style={{ width: 18, height: 18, background: "rgba(255,255,255,0.1)", color: "rgba(255,255,255,0.85)", boxShadow: "0 0 0 1.5px var(--dark-bg)" }}
|
|
>
|
|
{card.initials}
|
|
</span>
|
|
<span
|
|
className="text-[9px] font-semibold rounded px-1.5 py-0.5"
|
|
style={{ background: "rgba(255,255,255,0.06)", color: "rgba(255,255,255,0.65)" }}
|
|
>
|
|
{card.value}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
))}
|
|
</div>
|
|
))}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default function CtaBanner({
|
|
headline,
|
|
sub,
|
|
variant = "hex",
|
|
ctaLabel = "Auf die Warteliste",
|
|
}: {
|
|
headline: ReactNode;
|
|
sub: string;
|
|
variant?: CtaVariant;
|
|
ctaLabel?: string;
|
|
}) {
|
|
const compactPortraitSpacing = variant === "portrait";
|
|
|
|
return (
|
|
<section
|
|
className="section-full"
|
|
style={{
|
|
background: "var(--surface)",
|
|
paddingBlock: compactPortraitSpacing ? 72 : 80,
|
|
}}
|
|
>
|
|
<div className="mx-auto" style={{ maxWidth: "var(--content-width)" }}>
|
|
<div
|
|
className="relative flex flex-col lg:flex-row items-center justify-between gap-10 overflow-hidden"
|
|
style={{
|
|
background: "var(--dark-bg)",
|
|
padding: compactPortraitSpacing ? "64px 72px" : "72px 72px",
|
|
minHeight: 380,
|
|
clipPath: CHAMFER,
|
|
}}
|
|
>
|
|
{/* Variant-specific right-side art (hex is absolute-full, others sit inline) */}
|
|
{variant === "hex" && <HexRightArt />}
|
|
|
|
{/* Text block */}
|
|
<div className="relative z-10 flex flex-col gap-4 w-full lg:max-w-lg">
|
|
<h2
|
|
className="font-extrabold leading-tight"
|
|
style={{ color: "#FFFFFF", fontSize: "clamp(28px, 3.4vw, 42px)", letterSpacing: "-0.02em" }}
|
|
>
|
|
{headline}
|
|
</h2>
|
|
<p className="text-[16px] leading-relaxed" style={{ color: "#A3ACBA" }}>
|
|
{sub}
|
|
</p>
|
|
<div className="flex flex-wrap gap-3 mt-2">
|
|
<DemoButton href="/waitlist">{ctaLabel}</DemoButton>
|
|
<Link
|
|
href="/kontakt"
|
|
className="inline-flex items-center justify-center rounded-[var(--radius-button)] text-[16px] font-semibold hover:bg-white/10 transition-colors"
|
|
style={{ color: "#FFFFFF", padding: "14px 28px", border: "1px solid #FFFFFF" }}
|
|
>
|
|
Kontakt
|
|
</Link>
|
|
</div>
|
|
</div>
|
|
|
|
{/* Non-hex variants: inline art on the right */}
|
|
{variant === "portrait" && <PortraitRightArt />}
|
|
{variant === "kanban" && <KanbanRightArt />}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
);
|
|
}
|