index: klausurfolien/klausurfragen-karten per-kurs schaltbar; 223015b klausurfolien freigeschaltet, 223015c klausurfragen
This commit is contained in:
@@ -124,6 +124,14 @@ DISABLED_FULL["223015b"]="speichermedien-schnittstellen distribution-apis-zukunf
|
|||||||
# For course C: all chapters fully active
|
# For course C: all chapters fully active
|
||||||
DISABLED_BUTTONS["223015c"]=""
|
DISABLED_BUTTONS["223015c"]=""
|
||||||
|
|
||||||
|
# Courses where the "Klausurrelevante Folien" card should be active (clickable)
|
||||||
|
declare -A KLAUSURFOLIEN_ACTIVE
|
||||||
|
KLAUSURFOLIEN_ACTIVE["223015b"]=1
|
||||||
|
|
||||||
|
# Courses where the "Klausurfragen" card should be active (clickable)
|
||||||
|
declare -A KLAUSURFRAGEN_ACTIVE
|
||||||
|
KLAUSURFRAGEN_ACTIVE["223015c"]=1
|
||||||
|
|
||||||
cat > "$BUILD_DIR/index.html" << HEADER
|
cat > "$BUILD_DIR/index.html" << HEADER
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
@@ -404,13 +412,29 @@ LINK
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Add klausurfolien entry if it exists (disabled — wird noch überarbeitet)
|
# Add klausurfolien entry if it exists (active per KLAUSURFOLIEN_ACTIVE, else disabled)
|
||||||
if [[ -f "$BUILD_DIR/klausurfolien.html" ]]; then
|
if [[ -f "$BUILD_DIR/klausurfolien.html" ]]; then
|
||||||
|
if [[ "${KLAUSURFOLIEN_ACTIVE[$COURSE]}" == "1" ]]; then
|
||||||
|
pdf_active=""
|
||||||
|
if [[ -f "$BUILD_DIR/klausurfolien.pdf" ]]; then
|
||||||
|
pdf_active="<a href=\"klausurfolien.pdf\" class=\"btn btn-pdf\">PDF</a>"
|
||||||
|
fi
|
||||||
|
cat >> "$BUILD_DIR/index.html" << KLAUSUR
|
||||||
|
<div class="kapitel-card" style="border-left: 3px solid $ACCENT_COLOR;">
|
||||||
|
<a href="klausurfolien.html" class="kapitel-link">
|
||||||
|
<div class="kapitel-label">Prüfung</div>
|
||||||
|
<div class="kapitel-title">Klausurrelevante Folien</div>
|
||||||
|
</a>
|
||||||
|
<a href="klausurfolien.html" class="btn btn-slides">Folien</a>
|
||||||
|
$pdf_active
|
||||||
|
</div>
|
||||||
|
KLAUSUR
|
||||||
|
else
|
||||||
pdf_disabled=""
|
pdf_disabled=""
|
||||||
if [[ -f "$BUILD_DIR/klausurfolien.pdf" ]]; then
|
if [[ -f "$BUILD_DIR/klausurfolien.pdf" ]]; then
|
||||||
pdf_disabled="<span class=\"btn btn-pdf btn-disabled\">PDF</span>"
|
pdf_disabled="<span class=\"btn btn-pdf btn-disabled\">PDF</span>"
|
||||||
fi
|
fi
|
||||||
cat >> "$BUILD_DIR/index.html" << KLAUSUR
|
cat >> "$BUILD_DIR/index.html" << KLAUSUROFF
|
||||||
<div class="kapitel-card disabled" style="border-left: 3px solid $ACCENT_COLOR;">
|
<div class="kapitel-card disabled" style="border-left: 3px solid $ACCENT_COLOR;">
|
||||||
<div class="kapitel-link">
|
<div class="kapitel-link">
|
||||||
<div class="kapitel-label">Prüfung</div>
|
<div class="kapitel-label">Prüfung</div>
|
||||||
@@ -419,11 +443,13 @@ if [[ -f "$BUILD_DIR/klausurfolien.html" ]]; then
|
|||||||
<span class="btn btn-slides btn-disabled">Folien</span>
|
<span class="btn btn-slides btn-disabled">Folien</span>
|
||||||
$pdf_disabled
|
$pdf_disabled
|
||||||
</div>
|
</div>
|
||||||
KLAUSUR
|
KLAUSUROFF
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add klausurfragen entry if it exists (active)
|
# Add klausurfragen entry if it exists (active per KLAUSURFRAGEN_ACTIVE, else disabled)
|
||||||
if [[ -f "$BUILD_DIR/klausurfragen.html" ]] || [[ -f "$BUILD_DIR/klausurfragen.pdf" ]]; then
|
if [[ -f "$BUILD_DIR/klausurfragen.html" ]] || [[ -f "$BUILD_DIR/klausurfragen.pdf" ]]; then
|
||||||
|
if [[ "${KLAUSURFRAGEN_ACTIVE[$COURSE]}" == "1" ]]; then
|
||||||
pdf_active=""
|
pdf_active=""
|
||||||
if [[ -f "$BUILD_DIR/klausurfragen.pdf" ]]; then
|
if [[ -f "$BUILD_DIR/klausurfragen.pdf" ]]; then
|
||||||
pdf_active="<a href=\"klausurfragen.pdf\" class=\"btn btn-pdf\">PDF</a>"
|
pdf_active="<a href=\"klausurfragen.pdf\" class=\"btn btn-pdf\">PDF</a>"
|
||||||
@@ -442,6 +468,26 @@ if [[ -f "$BUILD_DIR/klausurfragen.html" ]] || [[ -f "$BUILD_DIR/klausurfragen.p
|
|||||||
$pdf_active
|
$pdf_active
|
||||||
</div>
|
</div>
|
||||||
KLAUSURFRAGEN
|
KLAUSURFRAGEN
|
||||||
|
else
|
||||||
|
pdf_disabled=""
|
||||||
|
if [[ -f "$BUILD_DIR/klausurfragen.pdf" ]]; then
|
||||||
|
pdf_disabled="<span class=\"btn btn-pdf btn-disabled\">PDF</span>"
|
||||||
|
fi
|
||||||
|
slides_disabled=""
|
||||||
|
if [[ -f "$BUILD_DIR/klausurfragen.html" ]]; then
|
||||||
|
slides_disabled="<span class=\"btn btn-slides btn-disabled\">Folien</span>"
|
||||||
|
fi
|
||||||
|
cat >> "$BUILD_DIR/index.html" << KLAUSURFRAGENOFF
|
||||||
|
<div class="kapitel-card disabled" style="border-left: 3px solid $ACCENT_COLOR;">
|
||||||
|
<div class="kapitel-link">
|
||||||
|
<div class="kapitel-label">Prüfung</div>
|
||||||
|
<div class="kapitel-title">Klausurfragen</div>
|
||||||
|
</div>
|
||||||
|
$slides_disabled
|
||||||
|
$pdf_disabled
|
||||||
|
</div>
|
||||||
|
KLAUSURFRAGENOFF
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat >> "$BUILD_DIR/index.html" << FOOTER
|
cat >> "$BUILD_DIR/index.html" << FOOTER
|
||||||
|
|||||||
Reference in New Issue
Block a user