Files
HiveGrid-Marketing/E-Mails/quelle/bilder.html
T
dejanandClaude Opus 5.5 bf6e371ec9 GET Nord: neues Banner mit Haris, Signatur für Haris
Banner dunkel mit Waben und Haris statt der Standskizze. Signatur von
Haris im Look von Noahs Signatur (Foto von der Website), in der Mail
eingesetzt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 17:14:13 +01:00

328 lines
22 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>Bilder der Mail-Strecke</title>
<!--
Zeichnet jedes Bild der Mail-Strecke im Look des Hefts „Jede Frage lief über
meinen Tisch“: Manrope für Titel, Literata für Text, Caveat für die
Handschrift, Gold #F1B729, Skizzen mit schwarzem Strich.
Aufruf: bilder.html?id=k03 (Liste der Kennungen unten in BILDER)
Gerendert wird mit ./erzeugen.sh, das jede Kennung mit Chrome abfotografiert.
-->
<link rel="stylesheet" href="fonts/manrope.css">
<style>
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 500 700;
src: url(fonts/caveat-latin.woff2) format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 500 700;
src: url(fonts/caveat-latin-ext.woff2) format("woff2");
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400 700;
src: url(fonts/literata-latin.woff2) format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400 700;
src: url(fonts/literata-latin-ext.woff2) format("woff2");
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
--tinte: #1A1A1A; --gold: #F1B729; --dunkel: #141414; --grau: #5C5C57;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; }
body { width: max-content; }
.banner { position: relative; width: 1200px; height: 600px; overflow: hidden; background: #fff; color: var(--tinte); }
.banner.dunkel { background: var(--dunkel); color: #fff; }
.banner.gold { background: var(--gold); color: var(--tinte); }
.text { position: absolute; left: 76px; top: 50%; transform: translateY(-50%); width: 560px; z-index: 2; }
.stapel .text { top: 58px; transform: none; width: 1050px; }
.kicker { font-family: Caveat, cursive; font-weight: 700; font-size: 48px; line-height: 1; margin: 0 0 14px; -webkit-text-stroke: .6px currentColor; }
.dunkel .kicker { color: var(--gold); }
.titel { font-family: Manrope, sans-serif; font-weight: 800; font-size: 68px; line-height: 1.12; letter-spacing: -.028em; margin: 0; }
.unter { font-family: Literata, Georgia, serif; font-size: 30px; line-height: 1.35; margin: 22px 0 0; color: var(--grau); font-variation-settings: "opsz" 12; }
.dunkel .unter { color: #C9C9C3; }
.gold .unter { color: #3A3000; }
/* Unterstreichung wie im Heft: zwei goldene, leicht schiefe Striche */
.strich { position: relative; white-space: nowrap; }
.strich::after { content: ""; position: absolute; left: -1%; right: -1%; bottom: -.12em; height: .22em;
background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 24' preserveAspectRatio='none'%3E%3Cpath d='M3 10 C 52 4, 128 3, 197 8' stroke='%23F1B729' stroke-width='7' fill='none' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M10 18 C 64 13, 134 12, 188 16' stroke='%23F1B729' stroke-width='4' fill='none' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); }
.gold .strich::after { filter: brightness(0); }
mark { white-space: nowrap; background: var(--gold); color: var(--tinte); padding: 0 .1em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.bild { position: absolute; right: 56px; top: 50%; transform: translateY(-50%); width: 520px; height: 470px; display: flex; align-items: center; justify-content: center; z-index: 1; }
.bild img { max-width: 100%; max-height: 100%; display: block; }
.hell .bild > img { mix-blend-mode: multiply; } /* Papierton der Zeichnungen verschwindet auf Weiß */
.bild svg { width: 100%; height: 100%; overflow: visible; }
.karte { background: #fff; border-radius: 20px; padding: 22px; display: flex; align-items: center; justify-content: center; }
.stapel .bild { top: auto; bottom: 44px; transform: none; left: 76px; right: 76px; width: auto; height: 330px; }
.foto { position: absolute; right: 0; bottom: 0; z-index: 1; }
.foto img { display: block; height: 100%; filter: grayscale(1) contrast(1.05); }
.heft { transform: rotate(-4deg); box-shadow: 0 30px 70px rgba(0,0,0,.55); width: 300px; }
.waben { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
/* Bausteine für die Mail selbst */
.logo { width: 456px; height: 120px; background: #F4F3EF; /* Grund der Mail außerhalb der Karte */ display: flex; align-items: center; }
.logo img { width: 456px; }
.signatur { width: 900px; height: 220px; background: #fff; display: flex; align-items: center; gap: 34px; padding: 0 0 0 4px; }
.signatur .rund { width: 176px; height: 176px; border-radius: 50%; overflow: hidden; flex: none; background: #EDEDE8; }
.signatur .rund img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.signatur b { display: block; font-family: Manrope, sans-serif; font-weight: 800; font-size: 46px; letter-spacing: -.02em; color: var(--tinte); }
.signatur span { display: block; font-family: Literata, Georgia, serif; font-size: 32px; color: var(--grau); margin-top: 6px; font-variation-settings: "opsz" 12; }
.signatur i { display: block; font-family: Caveat, cursive; font-style: normal; font-weight: 700; font-size: 38px; color: #8A6800; margin-top: 4px; }
.heftklein { width: 260px; height: 360px; background: #fff; display: flex; align-items: center; justify-content: center; }
.heftklein img { width: 200px; box-shadow: 0 14px 28px rgba(0,0,0,.28); transform: rotate(-3deg); }
</style>
</head>
<body>
<div id="ziel"></div>
<script>
// ------------------------------------------------------------ Skizzen
// Zufall mit festem Startwert, damit jedes Bild bei jedem Lauf gleich aussieht.
function zufall(start) {
let s = start >>> 0 || 1;
return () => ((s = (Math.imul(s, 1664525) + 1013904223) >>> 0) / 4294967296);
}
const z2 = (n) => Math.round(n * 10) / 10;
// Eine leicht gebogene, zittrige Linie, wie mit dem Stift gezogen.
function linie(x1, y1, x2, y2, r, wackel = 3) {
const j = () => (r() - 0.5) * wackel;
const mx = (x1 + x2) / 2 + j() * 1.5, my = (y1 + y2) / 2 + j() * 1.5;
return `M${z2(x1 + j())} ${z2(y1 + j())} Q${z2(mx)} ${z2(my)} ${z2(x2 + j())} ${z2(y2 + j())} `;
}
// Kasten wie im Heft: zweimal nachgezogen, dicker schwarzer Strich.
function kasten(x, y, w, h, { start = 1, strich = "#1A1A1A", dicke = 6, fuellung = null } = {}) {
const r = zufall(start);
let d = "";
for (let n = 0; n < 2; n++) {
d += linie(x, y, x + w, y, r) + linie(x + w, y, x + w, y + h, r) + linie(x + w, y + h, x, y + h, r) + linie(x, y + h, x, y, r);
}
const fl = fuellung ? `<rect x="${x + 3}" y="${y + 3}" width="${w - 6}" height="${h - 6}" fill="${fuellung}"/>` : "";
return `${fl}<path d="${d}" fill="none" stroke="${strich}" stroke-width="${dicke}" stroke-linecap="round" stroke-linejoin="round"/>`;
}
// Kreis aus zittrigen Punkten, zweimal gezogen.
function kreis(cx, cy, rad, { start = 7, strich = "#1A1A1A", dicke = 6, fuellung = null } = {}) {
const r = zufall(start);
let d = "";
for (let n = 0; n < 2; n++) {
const punkte = [];
for (let i = 0; i <= 24; i++) {
const w = (i / 24) * Math.PI * 2 + n * 0.2;
const rr = rad + (r() - 0.5) * 4;
punkte.push([cx + Math.cos(w) * rr, cy + Math.sin(w) * rr]);
}
d += "M" + punkte.map(([a, b]) => `${z2(a)} ${z2(b)}`).join(" L") + " ";
}
const fl = fuellung ? `<circle cx="${cx}" cy="${cy}" r="${rad - 2}" fill="${fuellung}"/>` : "";
return `${fl}<path d="${d}" fill="none" stroke="${strich}" stroke-width="${dicke}" stroke-linecap="round" stroke-linejoin="round"/>`;
}
// Gebogener Pfeil mit Spitze.
function pfeil(x1, y1, x2, y2, { farbe = "#1A1A1A", dicke = 5, bogen = 40 } = {}) {
const mx = (x1 + x2) / 2 + bogen, my = (y1 + y2) / 2 - bogen / 2;
const w = Math.atan2(y2 - my, x2 - mx);
const s = 18;
const a = [x2 - Math.cos(w - 0.45) * s, y2 - Math.sin(w - 0.45) * s];
const b = [x2 - Math.cos(w + 0.45) * s, y2 - Math.sin(w + 0.45) * s];
return `<path d="M${x1} ${y1} Q${z2(mx)} ${z2(my)} ${x2} ${y2} M${z2(a[0])} ${z2(a[1])} L${x2} ${y2} L${z2(b[0])} ${z2(b[1])}" fill="none" stroke="${farbe}" stroke-width="${dicke}" stroke-linecap="round" stroke-linejoin="round"/>`;
}
// Text in einer der drei Heft-Schriften. max: längste erlaubte Breite.
function text(x, y, t, { schrift = "caveat", gr = 44, gew = 700, farbe = "#1A1A1A", anker = "start", max = 0 } = {}) {
const fam = { caveat: "Caveat, cursive", manrope: "Manrope, sans-serif", literata: "Literata, Georgia, serif" }[schrift];
const strich = schrift === "caveat" ? ` stroke="${farbe}" stroke-width="0.8" stroke-linejoin="round"` : "";
return `<text x="${x}" y="${y}" font-family="${fam}" font-size="${gr}" font-weight="${gew}" fill="${farbe}" text-anchor="${anker}"${strich}${max ? ` data-max="${max}"` : ""}>${t}</text>`;
}
// Wabenmuster wie auf dem Heft-Titel, rechts sichtbar, nach links auslaufend.
function waben(deckkraft = 0.18) {
const r = 22, h = r * Math.sqrt(3);
const sechseck = (cx, cy) => {
const p = [];
for (let i = 0; i < 6; i++) { const w = (Math.PI / 3) * i; p.push(`${z2(cx + r * Math.cos(w))},${z2(cy + r * Math.sin(w))}`); }
return `<polygon points="${p.join(" ")}"/>`;
};
const kachel = [sechseck(0, 0), sechseck(3 * r, 0), sechseck(1.5 * r, h / 2), sechseck(0, h), sechseck(3 * r, h)].join("");
return `<svg class="waben" width="1200" height="600"><defs>
<pattern id="wabe" width="${3 * r}" height="${z2(h)}" patternUnits="userSpaceOnUse"><g fill="none" stroke="#F1B729" stroke-width="1.3">${kachel}</g></pattern>
<linearGradient id="aus" x1="0" x2="1"><stop offset="0.35" stop-color="#fff" stop-opacity="0"/><stop offset="1" stop-color="#fff" stop-opacity="1"/></linearGradient>
<mask id="maske"><rect width="1200" height="600" fill="url(#aus)"/></mask></defs>
<rect width="1200" height="600" fill="url(#wabe)" mask="url(#maske)" opacity="${deckkraft}"/></svg>`;
}
// ------------------------------------------------------------ Motive
const svg = (inhalt, b = 520, h = 470) => `<svg viewBox="0 0 ${b} ${h}" xmlns="http://www.w3.org/2000/svg">${inhalt}</svg>`;
// Kalenderblatt mit dem Webinar-Termin.
function kalender({ tag = "8.", wochentag = "Dienstag", monat = "Dezember", zeit = "18 Uhr" } = {}) {
return svg(`
${kasten(90, 60, 340, 380, { start: 11, fuellung: "#fff" })}
<rect x="94" y="64" width="332" height="86" fill="#F1B729"/>
${kasten(90, 60, 340, 90, { start: 12 })}
${linie(170, 30, 170, 86, zufall(3), 1).replace(/^/, '<path d="').concat('" stroke="#1A1A1A" stroke-width="9" stroke-linecap="round" fill="none"/>')}
${linie(350, 30, 350, 86, zufall(4), 1).replace(/^/, '<path d="').concat('" stroke="#1A1A1A" stroke-width="9" stroke-linecap="round" fill="none"/>')}
${text(260, 124, monat, { gr: 50, anker: "middle" })}
${text(260, 214, wochentag, { gr: 46, anker: "middle" })}
${text(260, 352, tag, { schrift: "manrope", gr: 150, gew: 800, anker: "middle" })}
${text(260, 418, zeit, { gr: 50, anker: "middle", farbe: "#8A6800" })}
`);
}
// Uhr auf 18 Uhr, der kleine Zeiger in Gold.
function uhr({ farbe = "#1A1A1A", gold = "#F1B729", unter = "18 Uhr", flaeche = "#fff" } = {}) {
const st = [];
for (let i = 0; i < 12; i++) {
const w = (i / 12) * Math.PI * 2, a = i % 3 === 0 ? 150 : 162;
st.push(`<line x1="${z2(260 + Math.sin(w) * a)}" y1="${z2(215 - Math.cos(w) * a)}" x2="${z2(260 + Math.sin(w) * 178)}" y2="${z2(215 - Math.cos(w) * 178)}" stroke="${farbe}" stroke-width="${i % 3 === 0 ? 8 : 4}" stroke-linecap="round"/>`);
}
return svg(`
${kreis(260, 215, 196, { start: 21, strich: farbe, dicke: 7, fuellung: flaeche })}
${st.join("")}
<line x1="260" y1="215" x2="262" y2="70" stroke="${farbe}" stroke-width="10" stroke-linecap="round"/>
<line x1="260" y1="215" x2="258" y2="318" stroke="${gold}" stroke-width="16" stroke-linecap="round"/>
<circle cx="260" cy="215" r="13" fill="${farbe}"/>
${unter ? text(260, 462, unter, { gr: 50, anker: "middle", farbe }) : ""}
`, 520, 480);
}
// K4: dieselbe Anfrage dreimal getippt.
function dreimal() {
return svg(`
${text(510, 46, "3× dieselben Daten", { gr: 48, anker: "end", farbe: "#8A6800" })}
${kasten(10, 90, 220, 110, { start: 31, fuellung: "#fff" })}
${text(120, 160, "Zettel", { gr: 54, anker: "middle" })}
${kasten(150, 225, 220, 110, { start: 32, fuellung: "#fff" })}
${text(260, 295, "CRM", { gr: 54, anker: "middle" })}
${kasten(290, 360, 220, 110, { start: 33, fuellung: "#F1B729" })}
${text(400, 430, "KWP", { gr: 54, anker: "middle" })}
${pfeil(60, 210, 140, 270, { bogen: -30 })}
${pfeil(200, 345, 280, 405, { bogen: -30 })}
`, 520, 480);
}
// B4c: die drei Zahlen aus dem Heft.
function dreiZahlen() {
const zeilen = [["1", "Orte, an denen Infos liegen"], ["2", "Angebote ohne Anruf"], ["3", "Stunden am Tag für Mails"]];
return svg(zeilen.map(([n, t], i) => {
const y = 10 + i * 152;
return kasten(0, y, 520, 126, { start: 40 + i, fuellung: "#fff" }) +
kreis(66, y + 63, 40, { start: 50 + i, fuellung: "#F1B729", dicke: 5 }) +
text(66, y + 82, n, { schrift: "manrope", gr: 54, gew: 800, anker: "middle" }) +
text(128, y + 78, t, { gr: 42, max: 370 });
}).join(""), 520, 470);
}
// B5: zwei Wege.
function zweiWege() {
return svg(`
${kasten(0, 10, 520, 196, { start: 61, fuellung: "#fff" })}
${text(34, 70, "Weg 1", { gr: 46 })}
${text(34, 150, "Selbst bauen, so wie ich.", { schrift: "literata", gr: 38, gew: 600, max: 452 })}
${kasten(0, 252, 520, 196, { start: 62, fuellung: "#F1B729" })}
${text(34, 312, "Weg 2", { gr: 46 })}
${text(34, 392, "Nehmen, was ich gebaut habe.", { schrift: "literata", gr: 38, gew: 600, max: 452 })}
`, 520, 470);
}
// GET Nord: die beiden Stände aus dem Hallenplan, um 45° gedreht wie dort,
// unserer in Gold, dazu „Hier sind wir!“ mit Pfeil.
function stand() {
const r = zufall(71);
const quadrat = (x, y, f, st) => `<g transform="rotate(45 260 245)">${kasten(x, y, 150, 150, { start: st, fuellung: f })}</g>`;
return svg(`
${text(30, 60, "Halle B1 · Erdgeschoss", { gr: 42 })}
${quadrat(110, 170, "#fff", 72)}
${quadrat(260, 170, "#F1B729", 73)}
${text(207, 205, "BrickUp", { gr: 34, anker: "middle", farbe: "#5C5C57" })}
${text(313, 300, "HiveGrid", { schrift: "manrope", gr: 30, gew: 800, anker: "middle" })}
${text(313, 338, "103.22", { gr: 38, anker: "middle" })}
${text(500, 150, "Hier sind wir!", { gr: 46, anker: "end", farbe: "#8A6800" })}
${pfeil(470, 172, 400, 236, { farbe: "#8A6800", bogen: 26 })}
`, 520, 470);
}
const bildDatei = (datei, karte = false) => karte
? `<div class="karte"><img src="zeichnungen/${datei}" alt=""></div>`
: `<img src="zeichnungen/${datei}" alt="">`;
// ------------------------------------------------------------ Bilder
// ton: hell, dunkel oder gold. Titel: <s>Wort</s> wird golden unterstrichen,
// <mark>Wort</mark> liegt auf Gold wie auf dem Heft-Titel.
const BILDER = {
k01: { ton: "hell", kicker: "Wie es bei mir war", titel: "Ich war nicht der Chef, ich war der <s>Engpass.</s>", bild: bildDatei("schreibtisch.jpg") },
k02: { ton: "dunkel", kicker: "Das Heft aus unserem Betrieb", breite: 640, titel: "Jede Frage lief<br><span style=\"white-space:nowrap\">über <mark>meinen Tisch</mark></span>", unter: "33 Seiten · 22 Minuten · ohne Anmeldung", bild: `<img class="heft" src="zeichnungen/heft-titel.png" alt="">`, waben: true },
k03: { ton: "hell", kicker: "Warum das so war", titel: "Jedes Programm war eine <s>Insel.</s>", bild: bildDatei("inseln.jpg") },
k04: { ton: "hell", kicker: "Rund 140 Anfragen im Monat", titel: "Eine Anfrage, <s>dreimal</s> getippt.", bild: dreimal() },
k07: { ton: "hell", kicker: "Das Programm am 8. Dezember", titel: "In zehn <s>Tagen.</s>", unter: "Dienstag, 18 Uhr, live im Browser. Eine Stunde, Fragen ausdrücklich erwünscht.", bild: kalender() },
k08: { ton: "hell", stapel: true, kicker: "Ein Auftrag, netto 30.000 €", titel: "Lebenslauf einer <s>Wärmepumpe.</s>", bild: bildDatei("tafel.png") },
k09: { ton: "dunkel", kicker: "Klingt gut, oder?", titel: "Und dann wurde es ein <s>Kartenhaus.</s>", bild: bildDatei("kartenhaus.jpg", true), waben: true },
k10: { ton: "hell", kicker: "13 Programme, ein Kopf", titel: "Trotzdem lief alles über <s>meinen Tisch.</s>", bild: bildDatei("landkarte.png") },
k11: { ton: "dunkel", kicker: "Letzte Einladung", titel: "Morgen Abend, <s>18 Uhr.</s>", unter: "Dienstag, 8. Dezember · live im Browser · eine Stunde", bild: `<div class="karte">${kalender()}</div>`, waben: true },
b4a: { ton: "hell", kicker: "Nach dem Webinar", titel: "<s>Danke</s> für gestern Abend.", unter: "Eine Stunde nach einem vollen Arbeitstag. Das weiß ich zu schätzen.", foto: { datei: "noah-buehne.png", hoehe: 560 } },
b4b: { ton: "hell", kicker: "Kein Vorwurf", titel: "Wir haben <s>ohne dich</s> angefangen.", bild: uhr() },
b4c: { ton: "hell", kicker: "Was jetzt zählt", titel: "Deine <s>drei Zahlen.</s>", bild: dreiZahlen() },
b5: { ton: "hell", kicker: "Wie es weitergeht", titel: "Du hast <s>zwei Wege.</s>", bild: zweiWege() },
b6: { ton: "dunkel", kicker: "Seit 1948, vierte Generation", titel: "Letzte Mail vor <s>Weihnachten.</s>", unter: "Frohe Weihnachten dir und deiner Familie.", foto: { datei: "noah-cover.png", hoehe: 600 }, waben: true },
// Manuell vom Vertrieb verschickt, nicht über Mailjet
getnord: { ton: "dunkel", breite: 640, kicker: "19. bis 21. November in Hamburg", titel: "Triff uns auf der<br><mark>GET Nord</mark>", unter: "Halle B1, Erdgeschoss · Stand 103.22", foto: { datei: "haris-buehne.png", hoehe: 560 }, waben: true },
// Für WebinarGeek (macht Dejan)
b0: { ton: "hell", kicker: "Dein Platz ist sicher", titel: "Du bist <s>dabei.</s>", unter: "Dienstag, 8. Dezember, 18 Uhr. Live im Browser, eine Stunde.", bild: kalender() },
b1: { ton: "dunkel", kicker: "Erinnerung", titel: "Morgen Abend, <s>18 Uhr.</s>", unter: "Dein Zugangslink steht in dieser Mail.", bild: `<div class="karte">${kalender()}</div>`, waben: true },
b2: { ton: "dunkel", kicker: "Heute ist es so weit", titel: "Heute Abend, <s>18 Uhr.</s>", unter: "Leg dir deine drei Zahlen neben den Rechner.", bild: `<div class="karte">${uhr()}</div>`, waben: true },
b3: { ton: "gold", kicker: "Gleich geht's los", titel: "In einer <s>Stunde.</s>", unter: "Um 18 Uhr fangen wir pünktlich an.", bild: uhr({ gold: "#fff", flaeche: "#F1B729", unter: "" }) },
};
function banner(id) {
const b = BILDER[id];
const titel = b.titel.replace(/<s>/g, '<span class="strich">').replace(/<\/s>/g, "</span>");
const foto = b.foto ? `<div class="foto" style="height:${b.foto.hoehe}px"><img src="zeichnungen/${b.foto.datei}" alt=""></div>` : "";
return `<div class="banner ${b.ton}${b.stapel ? " stapel" : ""}">
${b.waben ? waben() : ""}
<div class="text"${b.breite ? ` style="width:${b.breite}px"` : ""}><div class="kicker">${b.kicker}</div><h1 class="titel">${titel}</h1>${b.unter ? `<p class="unter">${b.unter}</p>` : ""}</div>
${b.bild ? `<div class="bild">${b.bild}</div>` : ""}${foto}
</div>`;
}
const BAUSTEINE = {
logo: () => `<div class="logo"><img src="logo/hivegrid.svg" alt=""></div>`,
// Logo ohne Hintergrund, für Kopfbereiche in anderer Farbe (z. B. im Mailjet-Editor)
logofrei: () => { document.documentElement.style.background = document.body.style.background = "transparent"; return `<div class="logo" style="background:transparent"><img src="logo/hivegrid.svg" alt=""></div>`; },
signatur: () => `<div class="signatur"><div class="rund"><img src="zeichnungen/noah-kopf.png" alt=""></div>
<div><b>Noah Geerkens</b><span>Inhaber Geerkens GmbH, Rheinberg</span><i>Vierte Generation, seit 1948</i></div></div>`,
signaturharis: () => `<div class="signatur"><div class="rund"><img src="zeichnungen/haris-kopf.png" alt=""></div>
<div><b>Haris Sejmen</b><span>Vertrieb, HiveGrid</span><i>Von der ersten Frage bis zur Demo</i></div></div>`,
heftklein: () => `<div class="heftklein"><img src="zeichnungen/heft-titel.png" alt=""></div>`,
};
// Titel verkleinern, bis der Textblock in den Platz passt; Skizzentexte auf ihre Breite begrenzen.
function einpassen() {
const t = document.querySelector(".titel");
const block = document.querySelector(".text");
if (t && block) {
const stapel = document.querySelector(".stapel");
let gr = 68;
const zuGross = () => stapel ? block.offsetHeight > 190 : block.offsetHeight > 480 || t.scrollWidth > block.clientWidth;
while (zuGross() && gr > 40) { gr -= 2; t.style.fontSize = gr + "px"; }
}
for (const el of document.querySelectorAll("text[data-max]")) {
const max = Number(el.dataset.max);
if (el.getComputedTextLength() > max) { el.setAttribute("textLength", max); el.setAttribute("lengthAdjust", "spacingAndGlyphs"); }
}
}
const id = new URLSearchParams(location.search).get("id") || "k03";
document.getElementById("ziel").innerHTML = BILDER[id] ? banner(id) : (BAUSTEINE[id] ? BAUSTEINE[id]() : `Unbekannt: ${id}`);
document.fonts.ready.then(() => { einpassen(); document.body.dataset.fertig = "1"; });
</script>
</body>
</html>