From 7d2e64dfd7e0d23ad30246cddbe277d5daf02bf2 Mon Sep 17 00:00:00 2001 From: Dogfather Date: Wed, 28 Oct 2026 10:32:27 +0100 Subject: [PATCH] Startseite: DogTag haengt an der Reaction-Kachel (Kette, Oese, Marke, Karte) Co-Authored-By: Claude Opus 5.5 --- server/pruef-dogtag-seite.mjs | 21 +++++++-- workspace/anleitung.html | 28 ++++++------ workspace/anruf-probe.html | 10 ++--- workspace/assets/css/start.css | 77 +++++++++++++++++++++++++++++---- workspace/assets/js/start.js | 5 ++- workspace/aufgaben.html | 38 ++++++++-------- workspace/automation.html | 32 +++++++------- workspace/befinden.html | 34 +++++++-------- workspace/bereich.html | 48 ++++++++++---------- workspace/bewerben.html | 38 ++++++++-------- workspace/bewerbungen.html | 36 +++++++-------- workspace/buehne.html | 6 +-- workspace/calls.html | 34 +++++++-------- workspace/chat.html | 48 ++++++++++---------- workspace/content.html | 34 +++++++-------- workspace/crew-index.html | 12 ++--- workspace/dateien.html | 34 +++++++-------- workspace/dogtags.html | 36 +++++++-------- workspace/entwicklung.html | 36 +++++++-------- workspace/hilfe.html | 30 ++++++------- workspace/index.html | 10 ++--- workspace/kalender.html | 34 +++++++-------- workspace/leistung.html | 32 +++++++------- workspace/manager-ziele.html | 30 ++++++------- workspace/material.html | 32 +++++++------- workspace/notizen.html | 28 ++++++------ workspace/personen.html | 32 +++++++------- workspace/profil.html | 36 +++++++-------- workspace/reaktion-foyer.html | 34 +++++++-------- workspace/reaktion.html | 62 +++++++++++++------------- workspace/rechte.html | 34 +++++++-------- workspace/report.html | 36 +++++++-------- workspace/scouting.html | 32 +++++++------- workspace/start.html | 40 ++++++++--------- workspace/startcheck.html | 34 +++++++-------- workspace/steckbrief.html | 36 +++++++-------- workspace/support.html | 32 +++++++------- workspace/tafel.html | 10 ++--- workspace/talente.html | 36 +++++++-------- workspace/team.html | 32 +++++++------- workspace/teamlage.html | 34 +++++++-------- workspace/teilen.html | 30 ++++++------- workspace/treff-moderation.html | 32 +++++++------- workspace/treff-regeln.html | 32 +++++++------- workspace/uebersicht.html | 32 +++++++------- workspace/unsere-seiten.html | 30 ++++++------- workspace/unterstuetzen.html | 32 +++++++------- workspace/werdegang.html | 32 +++++++------- workspace/willkommen.html | 2 +- workspace/wissen.html | 34 +++++++-------- 50 files changed, 827 insertions(+), 752 deletions(-) diff --git a/server/pruef-dogtag-seite.mjs b/server/pruef-dogtag-seite.mjs index 4980a843..f5560120 100644 --- a/server/pruef-dogtag-seite.mjs +++ b/server/pruef-dogtag-seite.mjs @@ -121,7 +121,7 @@ for (let i = 1; i <= 25; i++) d.prepare("INSERT INTO dogtag_heulen (person_id, t d.prepare("INSERT INTO spenden (betrag_cent, name, person_id, herkunft, stand, erstellt, bestaetigt_am) VALUES (100,'x',?,'gemeldet','bestaetigt',?,?)").run(IDS.Kai, nun, nun); melde("\n=== Die Kachel auf der Startseite ==="); -for (const [lagename, b, h] of [["Rechner", 1400, 900], ["Handy", 360, 780]]) { +for (const [lagename, b, h] of [["Rechner", 1400, 900], ["Breit", 1920, 1000], ["Handy", 360, 780]]) { const s = await seiteAls("g2", b, h); await s.seite.goto(`${BASIS}/workspace/start.html`, { waitUntil: "domcontentloaded" }); const da = await s.seite.waitForFunction(() => document.querySelector(".kachel__dogtag")?.getBoundingClientRect().height > 20, null, { timeout: 12000 }) @@ -131,9 +131,13 @@ for (const [lagename, b, h] of [["Rechner", 1400, 900], ["Handy", 360, 780]]) { if (!z) return null; const r = z.getBoundingClientRect(); const kachel = z.closest(".kachel").getBoundingClientRect(); - const stoert = [...z.closest(".kachel").querySelectorAll(".kachel__name, .kachel__unter, .kachel__titel, h2, h3, .kachel__leute")] - .filter((e) => { const q = e.getBoundingClientRect(); return q.width > 2 && !(r.right <= q.left || r.left >= q.right || r.bottom <= q.top || r.top >= q.bottom); }) - .map((e) => e.className); + /* GEMESSEN WIRD DER TEXT, NICHT SEIN KASTEN: Der Kasten des Namens + reicht über die ganze Kachel, die Schrift nur über ihre Zeichen. */ + const zeichen = (e) => { const rg = document.createRange(); rg.selectNodeContents(e); return rg.getBoundingClientRect(); }; + const stoert = [...z.closest(".kachel").querySelectorAll(".kachel__name, .kachel__unter, .kachel__titel, h2, h3")] + .map((e) => [e, zeichen(e)]).concat([...z.closest(".kachel").querySelectorAll(".kachel__leute")].map((e) => [e, e.getBoundingClientRect()])) + .filter(([, q]) => q.width > 2 && !(r.right <= q.left || r.left >= q.right || r.bottom <= q.top || r.top >= q.bottom)) + .map(([e]) => e.className); const ring = z.querySelector(".kdt-ring__fuell"); return { text: z.textContent, href: z.getAttribute("href"), drin: r.left >= kachel.left && r.right <= kachel.right && r.top >= kachel.top && r.bottom <= kachel.bottom, stoert, h: Math.round(r.height), w: Math.round(r.width), ring: !!ring && getComputedStyle(ring).strokeDashoffset === "0px", @@ -141,6 +145,15 @@ for (const [lagename, b, h] of [["Rechner", 1400, 900], ["Handy", 360, 780]]) { }); ok(da && !!m && /DogTag liegt bereit/.test(m.text) && /Jetzt heulen · 25 Nächte halten/.test(m.text) && m.href === "dogtags.html", `${lagename}: „${m?.text}“ in der Reaction-Kachel, führt zur Seite`); ok(!!m && m.drin && m.stoert.length === 0, `${lagename}: ganz in der Kachel, über keinem Text (${m?.stoert.join(",") || "frei"})`); + if (lagename === "Breit") { + const haengt = await s.seite.evaluate(() => { + const z = document.querySelector(".kachel__dogtag"); + const k = z.closest(".kachel").getBoundingClientRect(); + const kette = z.querySelector(".kdt-kette").getBoundingClientRect(); + return { abKante: Math.round(kette.top - k.top), rechts: Math.round(k.right - z.getBoundingClientRect().right), kachelH: Math.round(k.height) }; + }); + ok(haengt.abKante <= 2 && haengt.kachelH < 200, `Breit: der DogTag hängt an der oberen Kachelkante (Kette ab ${haengt.abKante} px, Kachel ${haengt.kachelH} hoch)`); + } ok(!!m && m.h >= 56 && m.marke && m.ring && m.titel === "Dein DogTag liegt bereit", `${lagename}: die Marke zum Anfassen — ${m?.w}×${m?.h} Punkte, Marke im vollen Ring, „${m?.titel}“`); await s.seite.waitForTimeout(3200); diff --git a/workspace/anleitung.html b/workspace/anleitung.html index 9548e031..e0a3c719 100644 --- a/workspace/anleitung.html +++ b/workspace/anleitung.html @@ -7,17 +7,17 @@ - - - - - + + + + + - - + + @@ -289,16 +289,16 @@ Und anleitung.js braucht es doppelt: Symbol, Farbe, Name und Adresse jeder Karte kommen von dort, nicht vom Server. --> - + - - - - - - + + + + + + diff --git a/workspace/anruf-probe.html b/workspace/anruf-probe.html index 9232424e..24fc3946 100644 --- a/workspace/anruf-probe.html +++ b/workspace/anruf-probe.html @@ -16,8 +16,8 @@ verdeckt. Gefunden hat es pruef-struktur. Richtig sind `gate.css` (die Farbwerte des Hauses) und `haus.css`. --> - - + + - +