This commit is contained in:
team3
2026-06-18 16:45:33 +02:00
parent 9c0f622e0c
commit d067cb8b54
27 changed files with 329 additions and 327 deletions

View File

@@ -33,6 +33,13 @@ async function load() {
}
}
// Baustein relevant = hat ≥1 relevanten Subbaustein (gleiche Regel wie ProGuide).
// Ohne Relevanz-Daten (Alt-Themen) nicht dimmen.
function relevant(b) {
const mitRelevanz = (b.subbausteine || []).filter((s) => s.relevanz)
return !mitRelevanz.length || mitRelevanz.some((s) => s.relevanz === 'relevant')
}
// Nur nicht-leere Stufen-Gruppen je Baustein (v-if + v-for nicht auf einem Element)
function gruppen(b) {
return STUFEN
@@ -58,7 +65,13 @@ const subTotal = computed(() => items.value.reduce((n, b) => n + (b.subbausteine
<div v-else-if="!items.length" class="bk-empty-state">Noch keine Bausteine.</div>
<div v-else class="bk-grid">
<article v-for="b in items" :key="b.num" class="bk-card">
<article
v-for="b in items"
:key="b.num"
class="bk-card"
:class="{ 'bk-irrelevant': !relevant(b) }"
:title="relevant(b) ? null : 'Nicht relevant — nur im FullGuide'"
>
<h3 class="bk-title"><span class="bk-num">{{ b.num }}</span>{{ b.titel }}</h3>
<p v-if="b.beschreibung" class="bk-desc">{{ b.beschreibung }}</p>
<div v-if="b.subbausteine && b.subbausteine.length" class="bk-stufen">
@@ -136,6 +149,8 @@ const subTotal = computed(() => items.value.reduce((n, b) => n + (b.subbausteine
border-radius: 10px;
padding: 1rem 1.1rem;
}
/* Nicht relevante Bausteine (kein relevanter Subbaustein) gedimmt */
.bk-card.bk-irrelevant { opacity: 0.5; }
.bk-title {
display: flex;
@@ -182,18 +197,17 @@ const subTotal = computed(() => items.value.reduce((n, b) => n + (b.subbausteine
color: var(--st);
}
.bk-stufe ul {
list-style: none;
list-style: disc;
margin: 0.25rem 0 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 2px;
padding-left: 1.15rem;
}
.bk-stufe li {
font-size: 0.85rem;
color: var(--text);
line-height: 1.35;
margin-bottom: 2px;
}
.bk-stufe li::marker { color: var(--text-faint); }
.bk-stufe li.rand { color: var(--text-faint); }
.rand-tag {
margin-left: 0.4rem;