e151bbd734
Floating button + centered modal on every page, opened from the demo bar and a fixed FAB. Minimal required fields (name + phone), optional business / what-they-want / message. POSTs to the lead-intake webhook (client_id DEMO/DEMO-A/DEMO-B, source callback-*). Also refreshes the stale "noch nicht aktiv" notices now that the forms are live. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
427 lines
24 KiB
HTML
427 lines
24 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="de">
|
||
<head>
|
||
<meta charset="UTF-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>Schnittpunkt — Barbershop Nürnberg | Termin online buchen</title>
|
||
<meta name="description" content="Klassische Herrenschnitte, Bartpflege und Rasur in Nürnberg. Jetzt bequem online einen Termin buchen." />
|
||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||
<link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
||
<style>
|
||
:root {
|
||
--bg: #14110f;
|
||
--bg-2: #1d1916;
|
||
--card: #221d19;
|
||
--ink: #f4efe9;
|
||
--muted: #b3a89c;
|
||
--gold: #c8a05a;
|
||
--gold-2: #e0c184;
|
||
--line: #342d27;
|
||
--radius: 14px;
|
||
--shadow: 0 18px 50px rgba(0,0,0,.45);
|
||
}
|
||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||
html { scroll-behavior: smooth; }
|
||
body {
|
||
font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
|
||
background: var(--bg); color: var(--ink);
|
||
line-height: 1.65; -webkit-font-smoothing: antialiased;
|
||
}
|
||
h1, h2, h3, .display { font-family: 'Bebas Neue', 'Inter', sans-serif; letter-spacing: .5px; line-height: 1.05; }
|
||
a { color: inherit; text-decoration: none; }
|
||
.wrap { width: min(1120px, 92vw); margin-inline: auto; }
|
||
section { padding: 92px 0; }
|
||
.eyebrow { color: var(--gold); font-weight: 600; letter-spacing: 3px; text-transform: uppercase; font-size: .72rem; }
|
||
|
||
/* demo ribbon */
|
||
.demo-bar {
|
||
background: repeating-linear-gradient(45deg, #2a2017, #2a2017 12px, #2f241a 12px, #2f241a 24px);
|
||
color: var(--gold-2); font-size: .76rem; letter-spacing: 1.5px; text-transform: uppercase;
|
||
text-align: center; padding: 7px 12px; border-bottom: 1px solid var(--line);
|
||
}
|
||
|
||
/* nav */
|
||
header.nav { position: sticky; top: 0; z-index: 50; background: rgba(20,17,15,.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
|
||
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
|
||
.brand { font-family: 'Bebas Neue', sans-serif; font-size: 1.7rem; letter-spacing: 2px; }
|
||
.brand span { color: var(--gold); }
|
||
nav ul { display: flex; gap: 30px; list-style: none; align-items: center; }
|
||
nav a { color: var(--muted); font-size: .92rem; font-weight: 500; transition: color .2s; }
|
||
nav a:hover { color: var(--ink); }
|
||
.btn {
|
||
display: inline-block; background: linear-gradient(180deg, var(--gold-2), var(--gold));
|
||
color: #1a1410; font-weight: 700; padding: 12px 22px; border-radius: 999px;
|
||
border: 0; cursor: pointer; font-size: .95rem; transition: transform .15s, box-shadow .2s;
|
||
box-shadow: 0 8px 22px rgba(200,160,90,.28);
|
||
}
|
||
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(200,160,90,.4); }
|
||
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
|
||
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 1.6rem; cursor: pointer; }
|
||
|
||
/* hero */
|
||
.hero { position: relative; background:
|
||
linear-gradient(rgba(15,12,10,.72), rgba(15,12,10,.86)),
|
||
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Crect width='60' height='60' fill='%231a1512'/%3E%3Cpath d='M0 59h60M0 29h60' stroke='%23241d18' stroke-width='1'/%3E%3C/svg%3E");
|
||
border-bottom: 1px solid var(--line); }
|
||
.hero-inner { padding: 96px 0 104px; max-width: 720px; }
|
||
.hero h1 { font-size: clamp(3rem, 8vw, 5.6rem); margin: 14px 0 6px; }
|
||
.hero h1 em { color: var(--gold); font-style: normal; }
|
||
.hero p { color: var(--muted); font-size: 1.18rem; max-width: 540px; margin: 18px 0 30px; }
|
||
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
|
||
.hero-meta { margin-top: 34px; display: flex; gap: 28px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
|
||
.hero-meta b { color: var(--ink); }
|
||
|
||
/* services */
|
||
.sec-head { max-width: 620px; margin-bottom: 46px; }
|
||
.sec-head h2 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-top: 8px; }
|
||
.sec-head p { color: var(--muted); margin-top: 10px; }
|
||
.grid { display: grid; gap: 18px; }
|
||
.services { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
|
||
.svc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: transform .18s, border-color .2s; }
|
||
.svc:hover { transform: translateY(-4px); border-color: var(--gold); }
|
||
.svc .ic { font-size: 1.8rem; }
|
||
.svc h3 { font-size: 1.5rem; margin: 14px 0 6px; }
|
||
.svc p { color: var(--muted); font-size: .92rem; min-height: 42px; }
|
||
.svc .price { color: var(--gold-2); font-weight: 700; font-size: 1.05rem; margin-top: 12px; font-family: 'Inter'; }
|
||
|
||
/* booking */
|
||
.booking { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
|
||
.booking-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
|
||
.booking-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
|
||
.gcal-head { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .82rem; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 18px; }
|
||
.gcal-dot { width: 12px; height: 12px; border-radius: 50%; background: #4285F4; box-shadow: 18px 0 0 #34A853, 36px 0 0 #FBBC05; }
|
||
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
|
||
.slot { text-align: center; padding: 11px 6px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font-size: .9rem; cursor: pointer; transition: .15s; background: #1b1611; }
|
||
.slot:hover { border-color: var(--gold); color: var(--gold-2); }
|
||
.slot.off { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
|
||
.booking ul.points { list-style: none; display: grid; gap: 14px; margin: 22px 0 28px; }
|
||
.booking ul.points li { padding-left: 30px; position: relative; color: var(--muted); }
|
||
.booking ul.points li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }
|
||
|
||
/* hours / about */
|
||
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
|
||
.hours { width: 100%; border-collapse: collapse; }
|
||
.hours td { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
|
||
.hours td:last-child { text-align: right; color: var(--ink); font-weight: 500; }
|
||
|
||
/* contact */
|
||
.contact { background: var(--bg-2); border-top: 1px solid var(--line); }
|
||
form.lead { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; max-width: 560px; }
|
||
.field { margin-bottom: 16px; }
|
||
.field label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
|
||
.field input, .field textarea, .field select {
|
||
width: 100%; background: #1a1611; border: 1px solid var(--line); border-radius: 9px;
|
||
color: var(--ink); padding: 12px 14px; font: inherit; font-size: .95rem;
|
||
}
|
||
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
|
||
.form-note { font-size: .78rem; color: var(--muted); margin-top: 10px; }
|
||
.toast { display: none; margin-top: 14px; padding: 12px 14px; border-radius: 9px; background: #1e2a1c; border: 1px solid #2f5a2c; color: #bfe6b6; font-size: .9rem; }
|
||
|
||
/* footer */
|
||
footer { padding: 54px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
|
||
.foot-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
|
||
footer .brand { color: var(--ink); }
|
||
|
||
@media (max-width: 820px) {
|
||
nav ul { display: none; }
|
||
.nav-toggle { display: block; }
|
||
nav.open ul { display: flex; position: absolute; inset: 68px 0 auto 0; flex-direction: column; background: var(--bg-2); padding: 18px 6vw; gap: 18px; border-bottom: 1px solid var(--line); }
|
||
.booking-grid, .split { grid-template-columns: 1fr; }
|
||
section { padding: 64px 0; }
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="demo-bar">Demo · Tier A (Google-Stack) — Beispielseite für Kund:innen <button class="cb-open" type="button" onclick="cbOpen()">📞 Rückruf anfordern</button></div>
|
||
|
||
<header class="nav">
|
||
<div class="wrap nav-inner">
|
||
<a href="#top" class="brand">SCHNITT<span>PUNKT</span></a>
|
||
<nav id="nav">
|
||
<ul>
|
||
<li><a href="#leistungen">Leistungen</a></li>
|
||
<li><a href="#buchen">Termin buchen</a></li>
|
||
<li><a href="#zeiten">Öffnungszeiten</a></li>
|
||
<li><a href="#kontakt">Kontakt</a></li>
|
||
<li><a href="#buchen" class="btn">Termin buchen</a></li>
|
||
</ul>
|
||
</nav>
|
||
<button class="nav-toggle" aria-label="Menü" onclick="document.getElementById('nav').classList.toggle('open')">☰</button>
|
||
</div>
|
||
</header>
|
||
|
||
<main id="top">
|
||
<!-- HERO -->
|
||
<section class="hero" id="hero">
|
||
<div class="wrap hero-inner">
|
||
<span class="eyebrow">Barbershop · Nürnberg Altstadt</span>
|
||
<h1>Sauberer Schnitt.<br><em>Echtes Handwerk.</em></h1>
|
||
<p>Klassische Herrenschnitte, Bartpflege und die heiße Rasur — von Profis, die ihr Handwerk lieben. Buch deinen Termin in 30 Sekunden.</p>
|
||
<div class="hero-cta">
|
||
<a href="#buchen" class="btn">Termin online buchen</a>
|
||
<a href="tel:+4991100000" class="btn ghost">☎ 0911 000000</a>
|
||
</div>
|
||
<div class="hero-meta">
|
||
<span>⭐ <b>4,9</b> · 320+ Bewertungen</span>
|
||
<span>✂ Seit <b>2014</b></span>
|
||
<span>📍 Königstraße 1, Nürnberg</span>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- SERVICES -->
|
||
<section id="leistungen">
|
||
<div class="wrap">
|
||
<div class="sec-head">
|
||
<span class="eyebrow">Leistungen</span>
|
||
<h2>Was wir am besten können</h2>
|
||
<p>Faire Preise, keine Überraschungen. Jeder Termin inklusive Beratung und einem Getränk aufs Haus.</p>
|
||
</div>
|
||
<div class="grid services">
|
||
<article class="svc"><div class="ic">✂️</div><h3>Herrenschnitt</h3><p>Waschen, Schnitt, Styling — individuell auf deinen Typ abgestimmt.</p><div class="price">ab 29 €</div></article>
|
||
<article class="svc"><div class="ic">🧔</div><h3>Bartpflege</h3><p>Konturieren, trimmen und pflegen für den perfekten Bart.</p><div class="price">ab 19 €</div></article>
|
||
<article class="svc"><div class="ic">🪒</div><h3>Heiße Rasur</h3><p>Klassische Nassrasur mit heißen Tüchern. Pure Entspannung.</p><div class="price">ab 25 €</div></article>
|
||
<article class="svc"><div class="ic">👦</div><h3>Kids Cut</h3><p>Entspannter Schnitt für die Kleinen — bis 12 Jahre.</p><div class="price">ab 17 €</div></article>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- BOOKING -->
|
||
<section class="booking" id="buchen">
|
||
<div class="wrap booking-grid">
|
||
<div>
|
||
<span class="eyebrow">Termin buchen</span>
|
||
<h2 style="font-size:clamp(2.2rem,5vw,3.2rem);margin:8px 0 6px;">Wähl deinen Slot.<br>Den Rest machen wir.</h2>
|
||
<ul class="points">
|
||
<li>Sofortige Bestätigung per E-Mail</li>
|
||
<li>Automatische Erinnerung am Vortag</li>
|
||
<li>Kostenlos umbuchen bis 24 Std. vorher</li>
|
||
</ul>
|
||
<!-- Tier A: dieser Button öffnet in der echten Version den Google Kalender „Terminplan" (Appointment Schedule). -->
|
||
<a href="#" class="btn" onclick="return false;">Verfügbare Zeiten ansehen →</a>
|
||
</div>
|
||
<div class="booking-card">
|
||
<div class="gcal-head"><span class="gcal-dot"></span> Google Kalender · Terminplan — Heute, 23. Juni</div>
|
||
<div class="slots">
|
||
<div class="slot off">09:00</div>
|
||
<div class="slot">10:30</div>
|
||
<div class="slot">11:15</div>
|
||
<div class="slot off">13:00</div>
|
||
<div class="slot">14:30</div>
|
||
<div class="slot">15:45</div>
|
||
<div class="slot">16:30</div>
|
||
<div class="slot off">17:15</div>
|
||
<div class="slot">18:00</div>
|
||
</div>
|
||
<p class="form-note" style="margin-top:16px;">Demo-Vorschau. In der Live-Version wird hier der echte Google-Kalender-Terminplan eingebettet.</p>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- HOURS / ABOUT -->
|
||
<section id="zeiten">
|
||
<div class="wrap split">
|
||
<div>
|
||
<span class="eyebrow">Über uns</span>
|
||
<h2 style="font-size:clamp(2rem,4.5vw,2.8rem);margin:8px 0 14px;">Drei Stühle, ein Anspruch: gute Arbeit.</h2>
|
||
<p style="color:var(--muted)">Seit 2014 schneiden wir in der Nürnberger Altstadt. Kein Schnickschnack, keine Wartezeiten dank Online-Termin — einfach ein Ort, an dem du dich auf einen sauberen Schnitt verlassen kannst. Komm vorbei, bleib auf einen Kaffee.</p>
|
||
</div>
|
||
<div>
|
||
<span class="eyebrow">Öffnungszeiten</span>
|
||
<table class="hours" style="margin-top:14px;">
|
||
<tr><td>Montag – Freitag</td><td>09:00 – 19:00</td></tr>
|
||
<tr><td>Samstag</td><td>09:00 – 16:00</td></tr>
|
||
<tr><td>Sonntag</td><td>geschlossen</td></tr>
|
||
</table>
|
||
<p class="form-note" style="margin-top:16px;">📍 Königstraße 1, 90402 Nürnberg</p>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- CONTACT / LEAD FORM -->
|
||
<section class="contact" id="kontakt">
|
||
<div class="wrap">
|
||
<div class="sec-head">
|
||
<span class="eyebrow">Kontakt</span>
|
||
<h2>Frage stellen oder Rückruf anfordern</h2>
|
||
<p>Schreib uns kurz — wir melden uns am selben Tag.</p>
|
||
</div>
|
||
<!-- Tier A: dieses Formular postet an einen n8n-Webhook -> Google Sheet (Leads) + Telegram. -->
|
||
<form class="lead" onsubmit="return submitLead(event, this)">
|
||
<input type="hidden" name="client_id" value="DEMO-A" />
|
||
<input type="hidden" name="source" value="demo-tier-a" />
|
||
<div class="field"><label for="a-name">Name</label><input id="a-name" name="name" type="text" placeholder="Max Mustermann" required /></div>
|
||
<div class="field"><label for="a-contact">E-Mail oder Telefon</label><input id="a-contact" name="contact" type="text" placeholder="max@example.de" required /></div>
|
||
<div class="field"><label for="a-svc">Gewünschte Leistung</label>
|
||
<select id="a-svc" name="service"><option>Herrenschnitt</option><option>Bartpflege</option><option>Heiße Rasur</option><option>Kids Cut</option><option>Sonstiges</option></select>
|
||
</div>
|
||
<div class="field"><label for="a-msg">Nachricht (optional)</label><textarea id="a-msg" name="message" rows="3" placeholder="Wunschtermin, Frage, …"></textarea></div>
|
||
<button class="btn" type="submit">Anfrage senden</button>
|
||
<div class="toast">✓ Danke! Demo-Formular — in der Live-Version landet deine Anfrage automatisch im CRM.</div>
|
||
<p class="form-note">Mit dem Absenden stimmst du der Verarbeitung deiner Angaben zur Kontaktaufnahme zu.</p>
|
||
</form>
|
||
</div>
|
||
</section>
|
||
</main>
|
||
|
||
<footer>
|
||
<div class="wrap foot-grid">
|
||
<div>
|
||
<div class="brand">SCHNITT<span style="color:var(--gold)">PUNKT</span></div>
|
||
<p style="margin-top:8px;">Königstraße 1 · 90402 Nürnberg</p>
|
||
</div>
|
||
<div>
|
||
<p><b style="color:var(--ink)">Öffnungszeiten</b></p>
|
||
<p>Mo–Fr 09–19 · Sa 09–16</p>
|
||
</div>
|
||
<div>
|
||
<p><b style="color:var(--ink)">Kontakt</b></p>
|
||
<p>0911 000000 · hallo@schnittpunkt-nbg.de</p>
|
||
</div>
|
||
</div>
|
||
<div class="wrap" style="margin-top:30px;opacity:.6;font-size:.8rem;">© 2026 Schnittpunkt Barbershop · Demo-Seite · Impressum · Datenschutz</div>
|
||
</footer>
|
||
<script>
|
||
// Lead-Formular -> n8n Webhook -> Google Sheet (Leads) + Telegram-Benachrichtigung.
|
||
const LEAD_WEBHOOK = 'https://n8n.mivanchenko.de/webhook/lead-intake';
|
||
async function submitLead(e, form) {
|
||
e.preventDefault();
|
||
const btn = form.querySelector('button[type=submit]');
|
||
const toast = form.querySelector('.toast');
|
||
const data = Object.fromEntries(new FormData(form).entries());
|
||
const old = btn.textContent;
|
||
btn.disabled = true; btn.textContent = 'Senden…';
|
||
try {
|
||
const r = await fetch(LEAD_WEBHOOK, {
|
||
method: 'POST',
|
||
headers: { 'Content-Type': 'application/json' },
|
||
body: JSON.stringify(data),
|
||
});
|
||
if (!r.ok) throw new Error(r.status);
|
||
toast.textContent = '✓ Danke! Deine Anfrage ist eingegangen — wir melden uns.';
|
||
toast.style.display = 'block';
|
||
form.reset();
|
||
} catch (err) {
|
||
toast.textContent = '⚠ Senden fehlgeschlagen — bitte erneut versuchen oder direkt anrufen.';
|
||
toast.style.display = 'block';
|
||
} finally {
|
||
btn.disabled = false; btn.textContent = old;
|
||
}
|
||
return false;
|
||
}
|
||
</script>
|
||
<script>window.CB_CTX = { client_id: "DEMO-A", source: "callback-tier-a" };</script>
|
||
<!-- ===== Rückruf-Widget (lead capture popup) ===== -->
|
||
<style>
|
||
.cb-fab { position: fixed; right: 18px; bottom: 18px; z-index: 900; background: #0f8a7e; color: #fff; border: 0; border-radius: 999px; padding: 13px 20px; font: 600 .95rem system-ui, -apple-system, Segoe UI, Roboto, sans-serif; box-shadow: 0 10px 26px rgba(0,0,0,.28); cursor: pointer; transition: transform .15s, background .2s; }
|
||
.cb-fab:hover { transform: translateY(-2px); background: #0b6b62; }
|
||
.cb-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(8,20,19,.55); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; padding: 18px; }
|
||
.cb-overlay.open { display: flex; }
|
||
.cb-modal { position: relative; width: min(440px, 100%); background: #fff; color: #16302f; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.35); padding: 28px 26px 22px; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; max-height: 92vh; overflow: auto; animation: cbIn .18s ease; }
|
||
@keyframes cbIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
|
||
.cb-modal h3 { margin: 0 0 4px; font-size: 1.35rem; }
|
||
.cb-sub { margin: 0 0 18px; color: #5d716f; font-size: .9rem; }
|
||
.cb-x { position: absolute; top: 10px; right: 13px; background: none; border: 0; font-size: 1.7rem; line-height: 1; color: #9fb0ad; cursor: pointer; }
|
||
.cb-x:hover { color: #16302f; }
|
||
.cb-modal label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 13px; }
|
||
.cb-modal label .o { color: #9aa7a5; font-weight: 400; }
|
||
.cb-modal input, .cb-modal textarea { width: 100%; margin-top: 5px; font: inherit; font-size: .94rem; color: #16302f; background: #f6f8f8; border: 1px solid #e3eae9; border-radius: 9px; padding: 10px 12px; resize: vertical; }
|
||
.cb-modal input:focus, .cb-modal textarea:focus { outline: none; border-color: #0f8a7e; background: #fff; }
|
||
.cb-submit { width: 100%; margin-top: 4px; background: #0f8a7e; color: #fff; border: 0; border-radius: 999px; padding: 13px; font: 600 1rem system-ui; cursor: pointer; transition: background .2s; }
|
||
.cb-submit:hover { background: #0b6b62; }
|
||
.cb-submit:disabled { opacity: .6; cursor: default; }
|
||
.cb-toast { display: none; margin-top: 14px; padding: 11px 13px; border-radius: 9px; font-size: .88rem; font-weight: 500; }
|
||
.cb-toast.ok { background: #e3f6ec; color: #0c6b3c; border: 1px solid #b8e6cc; }
|
||
.cb-toast.err { background: #fdecec; color: #9b2226; border: 1px solid #f3c7c7; }
|
||
.cb-open { margin-left: 10px; background: rgba(255,255,255,.16); color: inherit; border: 1px solid rgba(255,255,255,.34); border-radius: 999px; padding: 3px 13px; font: 600 .74rem system-ui; cursor: pointer; letter-spacing: .4px; vertical-align: middle; }
|
||
.cb-open:hover { background: rgba(255,255,255,.30); }
|
||
@media (max-width: 560px) { .cb-fab { right: 12px; bottom: 12px; padding: 11px 17px; } }
|
||
</style>
|
||
|
||
<button class="cb-fab" type="button" onclick="cbOpen()" aria-label="Rückruf anfordern">📞 Rückruf</button>
|
||
|
||
<div class="cb-overlay" id="cbOverlay" onclick="cbBg(event)">
|
||
<div class="cb-modal" role="dialog" aria-modal="true" aria-labelledby="cbTitle">
|
||
<button class="cb-x" type="button" onclick="cbClose()" aria-label="Schließen">×</button>
|
||
<h3 id="cbTitle">Rückruf anfordern</h3>
|
||
<p class="cb-sub">Name & Nummer genügen — wir melden uns bei Ihnen. Alles andere ist optional.</p>
|
||
<form onsubmit="return cbSubmit(event, this)">
|
||
<input type="hidden" name="client_id" />
|
||
<input type="hidden" name="source" />
|
||
<label>Name *
|
||
<input name="name" required autocomplete="name" placeholder="Vor- und Nachname" />
|
||
</label>
|
||
<label>Telefon *
|
||
<input name="phone" required autocomplete="tel" inputmode="tel" placeholder="+49 …" />
|
||
</label>
|
||
<label>Ihr Betrieb <span class="o">(optional)</span>
|
||
<input name="business" placeholder="z. B. Café Lichtblick" />
|
||
</label>
|
||
<label>Was sollen wir für Sie umsetzen? <span class="o">(optional)</span>
|
||
<input name="service" placeholder="Website, Online-Buchung, Rückruf-Service …" />
|
||
</label>
|
||
<label>Nachricht <span class="o">(optional)</span>
|
||
<textarea name="message" rows="2" placeholder="Worum geht es?"></textarea>
|
||
</label>
|
||
<button class="cb-submit" type="submit">Rückruf anfordern</button>
|
||
<div class="cb-toast" id="cbToast"></div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
<script>
|
||
const CB_WEBHOOK = 'https://n8n.mivanchenko.de/webhook/lead-intake';
|
||
const cbCtx = window.CB_CTX || { client_id: 'DEMO', source: 'callback' };
|
||
function cbOpen() {
|
||
const o = document.getElementById('cbOverlay');
|
||
o.querySelector('[name=client_id]').value = cbCtx.client_id;
|
||
o.querySelector('[name=source]').value = cbCtx.source;
|
||
o.classList.add('open');
|
||
document.body.style.overflow = 'hidden';
|
||
setTimeout(() => o.querySelector('[name=name]').focus(), 60);
|
||
}
|
||
function cbClose() {
|
||
document.getElementById('cbOverlay').classList.remove('open');
|
||
document.body.style.overflow = '';
|
||
}
|
||
function cbBg(e) { if (e.target.id === 'cbOverlay') cbClose(); }
|
||
document.addEventListener('keydown', e => { if (e.key === 'Escape') cbClose(); });
|
||
async function cbSubmit(e, form) {
|
||
e.preventDefault();
|
||
const btn = form.querySelector('.cb-submit');
|
||
const toast = document.getElementById('cbToast');
|
||
const d = Object.fromEntries(new FormData(form).entries());
|
||
let msg = (d.message || '').trim();
|
||
if (d.business) msg = (msg ? msg + ' — ' : '') + 'Betrieb: ' + d.business;
|
||
const payload = {
|
||
client_id: d.client_id, source: d.source,
|
||
name: d.name, phone: d.phone,
|
||
service_interest: d.service || '', message: msg
|
||
};
|
||
const old = btn.textContent;
|
||
btn.disabled = true; btn.textContent = 'Senden…';
|
||
toast.style.display = 'none';
|
||
try {
|
||
const r = await fetch(CB_WEBHOOK, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) });
|
||
if (!r.ok) throw new Error(r.status);
|
||
toast.className = 'cb-toast ok';
|
||
toast.textContent = '✓ Danke! Wir rufen Sie zurück.';
|
||
toast.style.display = 'block';
|
||
form.reset();
|
||
setTimeout(cbClose, 2200);
|
||
} catch (err) {
|
||
toast.className = 'cb-toast err';
|
||
toast.textContent = '⚠ Senden fehlgeschlagen. Bitte erneut versuchen.';
|
||
toast.style.display = 'block';
|
||
} finally {
|
||
btn.disabled = false; btn.textContent = old;
|
||
}
|
||
return false;
|
||
}
|
||
</script>
|
||
<!-- ===== /Rückruf-Widget ===== -->
|
||
|
||
</body>
|
||
</html>
|