fix: Restore all files lost during destructive rebase
A previous `git pull --rebase origin main` dropped 177 local commits,
losing 3400+ files across admin-v2, backend, studio-v2, website,
klausur-service, and many other services. The partial restore attempt
(660295e2) only recovered some files.
This commit restores all missing files from pre-rebase ref 98933f5e
while preserving post-rebase additions (night-scheduler, night-mode UI,
NightModeWidget dashboard integration).
Restored features include:
- AI Module Sidebar (FAB), OCR Labeling, OCR Compare
- GPU Dashboard, RAG Pipeline, Magic Help
- Klausur-Korrektur (8 files), Abitur-Archiv (5+ files)
- Companion, Zeugnisse-Crawler, Screen Flow
- Full backend, studio-v2, website, klausur-service
- All compliance SDKs, agent-core, voice-service
- CI/CD configs, documentation, scripts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
312
h5p-service/editors/fill-blanks-editor.html
Normal file
312
h5p-service/editors/fill-blanks-editor.html
Normal file
@@ -0,0 +1,312 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Fill in the Blanks Editor - BreakPilot H5P</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
||||
background: #f5f5f5;
|
||||
padding: 20px;
|
||||
}
|
||||
.container {
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
||||
padding: 30px;
|
||||
max-width: 900px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
h1 {
|
||||
color: #333;
|
||||
margin-bottom: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
.info-box {
|
||||
background: #f0f9ff;
|
||||
border-left: 4px solid #3b82f6;
|
||||
padding: 16px;
|
||||
margin-bottom: 24px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.info-box h3 {
|
||||
color: #1e40af;
|
||||
margin-bottom: 8px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.info-box p {
|
||||
color: #475569;
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.form-group {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
label {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
color: #374151;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
input[type="text"], textarea {
|
||||
width: 100%;
|
||||
padding: 10px 14px;
|
||||
border: 2px solid #e5e7eb;
|
||||
border-radius: 6px;
|
||||
font-size: 14px;
|
||||
font-family: inherit;
|
||||
transition: border-color 0.2s;
|
||||
}
|
||||
input[type="text"]:focus, textarea:focus {
|
||||
outline: none;
|
||||
border-color: #667eea;
|
||||
}
|
||||
textarea {
|
||||
resize: vertical;
|
||||
min-height: 120px;
|
||||
font-family: monospace;
|
||||
}
|
||||
.preview {
|
||||
background: #f9fafb;
|
||||
border: 2px solid #e5e7eb;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.preview h3 {
|
||||
color: #374151;
|
||||
margin-bottom: 12px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.preview-text {
|
||||
font-size: 16px;
|
||||
line-height: 1.8;
|
||||
color: #1f2937;
|
||||
}
|
||||
.blank {
|
||||
display: inline-block;
|
||||
background: #667eea;
|
||||
color: white;
|
||||
padding: 2px 12px;
|
||||
border-radius: 4px;
|
||||
font-weight: 600;
|
||||
margin: 0 4px;
|
||||
}
|
||||
.btn {
|
||||
padding: 10px 20px;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.btn-primary {
|
||||
background: #667eea;
|
||||
color: white;
|
||||
}
|
||||
.btn-primary:hover {
|
||||
background: #5568d3;
|
||||
}
|
||||
.btn-secondary {
|
||||
background: #e5e7eb;
|
||||
color: #374151;
|
||||
}
|
||||
.btn-secondary:hover {
|
||||
background: #d1d5db;
|
||||
}
|
||||
.btn-group {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
.success-message {
|
||||
background: #d1fae5;
|
||||
border: 2px solid #10b981;
|
||||
color: #065f46;
|
||||
padding: 16px;
|
||||
border-radius: 6px;
|
||||
margin-bottom: 20px;
|
||||
display: none;
|
||||
}
|
||||
.example {
|
||||
background: #fef3c7;
|
||||
border-left: 4px solid #f59e0b;
|
||||
padding: 12px;
|
||||
border-radius: 4px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.example strong {
|
||||
color: #92400e;
|
||||
}
|
||||
.example code {
|
||||
background: #fffbeb;
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
font-family: monospace;
|
||||
color: #78350f;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>
|
||||
<span>📝</span>
|
||||
Fill in the Blanks Editor
|
||||
</h1>
|
||||
|
||||
<div class="success-message" id="successMessage">
|
||||
✅ Lückentext erfolgreich gespeichert!
|
||||
</div>
|
||||
|
||||
<div class="info-box">
|
||||
<h3>💡 Wie funktioniert es?</h3>
|
||||
<p>
|
||||
Erstelle einen Text mit Lücken. Markiere die Wörter, die als Lücke erscheinen sollen, mit Sternchen: *Wort*
|
||||
</p>
|
||||
<div class="example">
|
||||
<strong>Beispiel:</strong><br>
|
||||
<code>Berlin ist die *Hauptstadt* von *Deutschland*.</code><br>
|
||||
→ Wird zu: "Berlin ist die _____ von _____."
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="title">Titel</label>
|
||||
<input type="text" id="title" placeholder="z.B. Geografie Quiz - Deutsche Städte">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="instructions">Anleitung (optional)</label>
|
||||
<input type="text" id="instructions" placeholder="z.B. Fülle die Lücken mit den richtigen Wörtern aus.">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="text">Text mit Lücken</label>
|
||||
<textarea id="text" oninput="updatePreview()"
|
||||
placeholder="Beispiel: Die *Sonne* ist ein *Stern*. Sie ist etwa *150* Millionen Kilometer von der Erde entfernt.">Die *Sonne* ist ein *Stern*. Sie ist etwa *150* Millionen Kilometer von der *Erde* entfernt.</textarea>
|
||||
</div>
|
||||
|
||||
<div class="preview">
|
||||
<h3>👁️ Vorschau (wie es für Lernende aussieht):</h3>
|
||||
<div class="preview-text" id="previewText"></div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-primary" onclick="saveFillBlanks()">💾 Speichern</button>
|
||||
<button class="btn btn-secondary" onclick="previewFillBlanks()">👁️ Testen</button>
|
||||
<button class="btn btn-secondary" onclick="window.history.back()">← Zurück</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function updatePreview() {
|
||||
const text = document.getElementById('text').value;
|
||||
const previewEl = document.getElementById('previewText');
|
||||
|
||||
if (!text) {
|
||||
previewEl.innerHTML = '<em style="color: #9ca3af;">Gib oben einen Text ein...</em>';
|
||||
return;
|
||||
}
|
||||
|
||||
// Replace *word* with blank placeholder
|
||||
const previewText = text.replace(/\*([^*]+)\*/g, (match, word) => {
|
||||
return `<span class="blank">_____</span>`;
|
||||
});
|
||||
|
||||
previewEl.innerHTML = previewText;
|
||||
}
|
||||
|
||||
function extractBlanks(text) {
|
||||
const blanks = [];
|
||||
const regex = /\*([^*]+)\*/g;
|
||||
let match;
|
||||
|
||||
while ((match = regex.exec(text)) !== null) {
|
||||
blanks.push({
|
||||
word: match[1],
|
||||
position: match.index
|
||||
});
|
||||
}
|
||||
|
||||
return blanks;
|
||||
}
|
||||
|
||||
function saveFillBlanks() {
|
||||
const title = document.getElementById('title').value;
|
||||
const instructions = document.getElementById('instructions').value;
|
||||
const text = document.getElementById('text').value;
|
||||
|
||||
if (!title) {
|
||||
alert('Bitte gib einen Titel ein!');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!text) {
|
||||
alert('Bitte gib einen Text ein!');
|
||||
return;
|
||||
}
|
||||
|
||||
const blanks = extractBlanks(text);
|
||||
|
||||
if (blanks.length === 0) {
|
||||
alert('Bitte markiere mindestens ein Wort mit Sternchen (*Wort*) als Lücke!');
|
||||
return;
|
||||
}
|
||||
|
||||
const fillBlanksData = {
|
||||
type: 'fill-blanks',
|
||||
title,
|
||||
instructions,
|
||||
text,
|
||||
blanks,
|
||||
created: new Date().toISOString()
|
||||
};
|
||||
|
||||
const contentId = 'fillblanks_' + Date.now();
|
||||
localStorage.setItem(contentId, JSON.stringify(fillBlanksData));
|
||||
|
||||
const successMsg = document.getElementById('successMessage');
|
||||
successMsg.style.display = 'block';
|
||||
setTimeout(() => {
|
||||
successMsg.style.display = 'none';
|
||||
}, 3000);
|
||||
|
||||
console.log('Fill in the Blanks gespeichert:', fillBlanksData);
|
||||
}
|
||||
|
||||
function previewFillBlanks() {
|
||||
const title = document.getElementById('title').value;
|
||||
const text = document.getElementById('text').value;
|
||||
|
||||
if (!title || !text) {
|
||||
alert('Bitte fülle erst Titel und Text aus!');
|
||||
return;
|
||||
}
|
||||
|
||||
const blanks = extractBlanks(text);
|
||||
|
||||
if (blanks.length === 0) {
|
||||
alert('Bitte markiere mindestens ein Wort mit Sternchen (*Wort*) als Lücke!');
|
||||
return;
|
||||
}
|
||||
|
||||
const previewData = encodeURIComponent(JSON.stringify({
|
||||
title,
|
||||
instructions: document.getElementById('instructions').value,
|
||||
text,
|
||||
blanks
|
||||
}));
|
||||
|
||||
window.open(`/h5p/player/fill-blanks?data=${previewData}`, '_blank');
|
||||
}
|
||||
|
||||
// Initialize preview
|
||||
updatePreview();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user