Quiz: Layout von Countdown und Bauchbinden per Drag & Drop
- Layout-Editor über der Live-Vorschau in der Moderator-Steuerung: verschieben, Größe und Breite über Griffe, Schieberegler, Einrasten in der Mitte, Standard wiederherstellen - automatisch gespeichert, OBS-Overlay übernimmt es innerhalb 1 s; Prozentwerte, unabhängig von der Auflösung - neue Runden übernehmen das Layout der letzten Runde - QuizRunde.layout (Migration quiz 0002) mit serverseitiger Begrenzung - 5 neue Tests (75 insgesamt), README und Changelog aktualisiert Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
03085f9062
commit
2862f32724
11 files changed
+428
-8
No files matched your search
@@ -12,6 +12,26 @@
|
||||
.st-liste .btn { min-width: 2.6rem; }
|
||||
.st-liste .btn.aktuell { box-shadow: 0 0 0 3px #0d6efd; }
|
||||
kbd { font-size: .75em; }
|
||||
|
||||
/* Layout-Editor: Rahmen über der Vorschau zum Verschieben und Skalieren */
|
||||
.st-layout-ebene { position: absolute; inset: 0; z-index: 2; }
|
||||
.st-griff {
|
||||
position: absolute; border: 2px dashed #f9c80e; border-radius: 6px;
|
||||
background: rgba(249, 200, 14, .08); cursor: move; touch-action: none;
|
||||
}
|
||||
.st-griff:hover, .st-griff.aktiv { border-style: solid; background: rgba(249, 200, 14, .15); }
|
||||
.st-griff-label {
|
||||
position: absolute; top: -1.35rem; left: 0; padding: 0 .35rem; border-radius: 3px;
|
||||
background: #f9c80e; color: #0f2a4a; font-size: .7rem; font-weight: 700; white-space: nowrap;
|
||||
}
|
||||
.st-anfasser {
|
||||
position: absolute; width: 14px; height: 14px; border: 2px solid #0f2a4a; border-radius: 3px;
|
||||
background: #f9c80e; touch-action: none;
|
||||
}
|
||||
.st-anfasser--groesse { right: -8px; bottom: -8px; cursor: nwse-resize; }
|
||||
.st-anfasser--breite { right: -8px; top: 50%; margin-top: -7px; cursor: ew-resize; }
|
||||
.st-anfasser--hoehe { left: 50%; top: -8px; margin-left: -7px; cursor: ns-resize; }
|
||||
.st-mittellinie { position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px dashed rgba(255, 255, 255, .7); }
|
||||
</style>
|
||||
|
||||
<nav aria-label="breadcrumb">
|
||||
@@ -38,8 +58,57 @@
|
||||
<div class="col-lg-7">
|
||||
<div class="quiz-buehne quiz-vorschau mb-2">
|
||||
<iframe src="{% url 'quiz:overlay' runde.token %}" title="Vorschau des OBS-Overlays"></iframe>
|
||||
<div class="st-layout-ebene" id="st-layout-ebene" hidden>
|
||||
<div class="st-mittellinie" id="st-mittellinie" hidden></div>
|
||||
<div class="st-griff" data-teil="countdown" title="Countdown verschieben">
|
||||
<span class="st-griff-label">Countdown</span>
|
||||
<span class="st-anfasser st-anfasser--groesse" data-art="groesse" title="Größe ändern"></span>
|
||||
</div>
|
||||
<div class="st-griff" data-teil="bauchbinden" title="Bauchbinden verschieben">
|
||||
<span class="st-griff-label">Bauchbinden</span>
|
||||
<span class="st-anfasser st-anfasser--hoehe" data-art="hoehe" title="Schriftgröße ändern"></span>
|
||||
<span class="st-anfasser st-anfasser--breite" data-art="breite" title="Breite ändern"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between align-items-center mb-3 gap-2">
|
||||
<p class="small text-muted mb-0">Vorschau: genau das, was die OBS-Browserquelle zeigt (dort mit transparentem Hintergrund).</p>
|
||||
<button type="button" class="btn btn-sm btn-outline-dark flex-shrink-0" id="st-layout-start">
|
||||
<i class="bi bi-arrows-move"></i> Layout anpassen
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="card shadow-sm border-warning mb-3" id="st-layout-panel" hidden>
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<span class="fw-bold"><i class="bi bi-arrows-move me-1"></i>Layout anpassen</span>
|
||||
<span class="small text-muted" id="st-layout-status"></span>
|
||||
</div>
|
||||
<p class="small text-muted">
|
||||
Rahmen in der Vorschau mit der Maus verschieben. Gelbe Griffe: Größe (Countdown: Ecke,
|
||||
Bauchbinden: oben) und Breite (Bauchbinden: rechts). Wird automatisch gespeichert;
|
||||
neue Runden übernehmen dieses Layout.
|
||||
</p>
|
||||
<div class="row g-2 small">
|
||||
<div class="col-sm-4">
|
||||
<label class="form-label mb-0" for="st-layout-cd-groesse">Countdown-Größe <span data-wert-fuer="st-layout-cd-groesse"></span></label>
|
||||
<input type="range" class="form-range" id="st-layout-cd-groesse" min="40" max="300" step="1">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<label class="form-label mb-0" for="st-layout-bb-groesse">Bauchbinden-Größe <span data-wert-fuer="st-layout-bb-groesse"></span></label>
|
||||
<input type="range" class="form-range" id="st-layout-bb-groesse" min="40" max="300" step="1">
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<label class="form-label mb-0" for="st-layout-bb-breite">Bauchbinden-Breite <span data-wert-fuer="st-layout-bb-breite"></span></label>
|
||||
<input type="range" class="form-range" id="st-layout-bb-breite" min="20" max="100" step="1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex gap-2 mt-2">
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary" id="st-layout-standard">Standard wiederherstellen</button>
|
||||
<button type="button" class="btn btn-sm btn-warning fw-bold ms-auto" id="st-layout-fertig">Fertig</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="small text-muted mb-3">Vorschau: genau das, was die OBS-Browserquelle zeigt (dort mit transparentem Hintergrund).</p>
|
||||
|
||||
<div class="card shadow-sm border-0">
|
||||
<div class="card-body">
|
||||
|
||||
Reference in new issue
Block a user