Webinar-Seite: alle Varianten der Webinar-Anzeige (Post 9)

Fünf Varianten als Carousel je Zeile, Bilder und Videos in 1:1, exportiert
aus PostGrid mit posts/post9-hub.mjs. Damit Noah sie auf
hivegrid-marketing.pages.dev sieht. Neu exportieren, wenn sich die
Varianten ändern.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dejanandClaude Opus 5.5 committed 2026-11-04 17:44:18 +01:00
1 parent 1ba55a2fca
commit 1b0129d690
25 files changed
+171 -1

No files matched your search

+33 -1
View File
@@ -8,6 +8,8 @@ import { S } from "../app.js";
import { esc, langDatum, dokLink, pille } from "../hilfen.js";
const SLIDES = "/webinar/slides";
// Die Anzeigen fürs Webinar, exportiert aus PostGrid (posts/post9-hub.mjs).
const ANZEIGEN = "/webinar/anzeigen/post9";
const url = (pfad) => "/" + pfad.split("/").map(encodeURIComponent).join("/");
// Reihenfolge, Teile und Titel der Slides. Fehlt etwas, bleibt der Block leer
@@ -30,6 +32,34 @@ async function deckLesen() {
}
}
// Liste der Varianten. Fehlt sie, entfällt der Block.
async function anzeigenLesen() {
try {
return await fetch(`${ANZEIGEN}/varianten.json`, { cache: "no-store" }).then((r) => r.json());
} catch {
return null;
}
}
function anzeigenBlock(a) {
if (!a) return "";
const element = (s, i) => {
const pfad = `${ANZEIGEN}/${s.datei}`;
const bild = s.art === "video"
? `<video src="${pfad}" muted loop autoplay playsinline preload="metadata"></video>`
: `<img src="${pfad}" alt="" loading="lazy">`;
return `<a class="anzeige-element" href="${pfad}" target="_blank" rel="noopener">
${bild}<span><span class="nr">${i + 1}</span>${s.art === "video" ? "Video" : "Bild"}</span></a>`;
};
return `<section class="block"><h2>Anzeigen <span class="neben">${esc(a.titel)}, ${a.varianten.length} Varianten, Stand ${esc(a.stand.split("-").reverse().join("."))}</span></h2>
<p class="klein">${esc(a.hinweis)} Zum Vergrößern anklicken.</p>
${a.varianten.map((v) => `
<div class="folien-teil">Variante ${v.nr} · ${esc(v.name)}</div>
<p class="klein anzeige-text">${esc(v.text)}</p>
<div class="anzeige-reihe">${v.slides.map(element).join("")}</div>`).join("")}
</section>`;
}
function unterlage(u) {
const knoepfe = [];
if (u.art === "ansehen") knoepfe.push(`<a class="knopf" href="${url(u.pfad)}" target="_blank" rel="noopener">Ansehen</a>`);
@@ -67,7 +97,7 @@ export async function zeichnen(main) {
main.innerHTML = `<section class="block warnung"><h2>Keine Webinar-Daten</h2><p>daten/webinar.json fehlt.</p></section>`;
return;
}
const deck = await deckLesen();
const [deck, anzeigen] = await Promise.all([deckLesen(), anzeigenLesen()]);
const nrVon = (id) => deck.folien.find((f) => f.id === id)?.nr;
const ablauf = w.ablauf.map((a, i) => {
const von = nrVon(a.start);
@@ -97,6 +127,8 @@ export async function zeichnen(main) {
</section>
</div>
${anzeigenBlock(anzeigen)}
<section class="block"><h2>Ablauf <span class="neben">${esc(w.dauer)}</span></h2>
<div class="tab"><table class="daten">
<thead><tr><th>Minute</th><th>Teil</th><th>Wer</th><th>Knackpunkt</th><th>Slides</th></tr></thead>