Buch ↔ Glossar verbunden: 80 neue Glossar-Einträge, ~390 Tooltips, Rückverlinkung

- 13 Kapitel: alle Fachbegriffe per g()-Tooltip verlinkt, fehlende Begriffe als
  vollwertige Glossar-Einträge angelegt (short/text + Leichte-Sprache-Felder,
  glossar:-Querverweise, ohne Bild — Bild-Batch folgt)
- Modul-Mappings vervollständigt: jeder Buch-Begriff erscheint auf glossar?module=<sim>
  (kofferdetektiv erstmals gemappt, 31 Begriffe; klima auf beide module_ids)
- Ergänzende Erklärsätze im Buch, wo Begriffe bisher nur genannt wurden
- glossar.php: Chip „📖 Zum Schulbuch-Kapitel" bei aktivem Modul-Filter (BUCH_LINK-Map,
  klima-3d → buch-klima)
- SQL idempotent (INSERT IGNORE, Mappings per key_slug-Subquery, keine harten IDs):
  App/Don_t_Deploy/2026-07-15-buch-glossar-*.sql

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-15 17:40:56 +02:00
parent f91f3f26de
commit 78a1cdca24
27 changed files with 1231 additions and 102 deletions
+15
View File
@@ -41,6 +41,14 @@ foreach ($modDb as $m) {
];
$moduleOrder[] = $m['module_id'];
}
// Schulbuch-Kapitel je Modul (für den 📖-Link bei aktivem Modul-Filter)
$buchLink = [];
$buchAlias = ['klima-3d' => 'klima'];
foreach (array_keys($moduleMeta) as $mid) {
$ziel = $buchAlias[$mid] ?? $mid;
if (is_file(__DIR__ . '/buch-' . $ziel . '.php')) $buchLink[$mid] = 'buch-' . $ziel;
}
?><!DOCTYPE html>
<html lang="de">
<head>
@@ -136,6 +144,7 @@ foreach ($modDb as $m) {
white-space: nowrap;
}
.gl-chip.active { background: var(--ggs-fjord); color: var(--ggs-white); border-color: var(--ggs-fjord); }
a.gl-chip.gl-buch { background: var(--ggs-forest, #1f4b37); color: var(--ggs-white); border-color: var(--ggs-forest, #1f4b37); text-decoration: none; }
@media (hover: hover) {
.gl-chip:hover { border-color: var(--ggs-fjord); color: var(--ggs-fjord); }
}
@@ -650,6 +659,7 @@ const INIT_MODULE = <?= json_encode($module) ?>;
// Aus DB-Tabelle module_info (Admin-pflegbar, Source-of-Truth)
const MODULE_META = <?= json_encode($moduleMeta, JSON_UNESCAPED_UNICODE) ?>;
const MODULE_ORDER = <?= json_encode($moduleOrder, JSON_UNESCAPED_UNICODE) ?>;
const BUCH_LINK = <?= json_encode($buchLink, JSON_UNESCAPED_UNICODE) ?>; // Modul → Schulbuch-Kapitel
const CATEGORY_LABEL = {
klima: 'Klima',
einheit: 'Einheit',
@@ -799,6 +809,11 @@ function renderFilters() {
</button>`;
});
// Schulbuch-Link, wenn ein Modul mit Kapitel gefiltert ist
if (STATE.filter.module && BUCH_LINK[STATE.filter.module]) {
html += `<a class="gl-chip gl-buch" href="<?= $bp ?>/${BUCH_LINK[STATE.filter.module]}">📖 Zum Schulbuch-Kapitel</a>`;
}
wrap.innerHTML = html;
wrap.querySelectorAll('.gl-chip').forEach(btn => {