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>
292 lines
7.0 KiB
HTML
292 lines
7.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Flashcards 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;
|
|
}
|
|
.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: 100px;
|
|
}
|
|
.card {
|
|
background: #f9fafb;
|
|
border: 2px solid #e5e7eb;
|
|
border-radius: 8px;
|
|
padding: 20px;
|
|
margin-bottom: 16px;
|
|
}
|
|
.card-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 16px;
|
|
}
|
|
.card-number {
|
|
font-weight: 600;
|
|
color: #667eea;
|
|
font-size: 16px;
|
|
}
|
|
.card-sides {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 16px;
|
|
}
|
|
.card-side {
|
|
background: white;
|
|
padding: 16px;
|
|
border-radius: 6px;
|
|
border: 2px solid #e5e7eb;
|
|
}
|
|
.card-side h4 {
|
|
color: #6b7280;
|
|
font-size: 12px;
|
|
text-transform: uppercase;
|
|
margin-bottom: 8px;
|
|
}
|
|
.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-danger {
|
|
background: #ef4444;
|
|
color: white;
|
|
}
|
|
.btn-danger:hover {
|
|
background: #dc2626;
|
|
}
|
|
.btn-group {
|
|
display: flex;
|
|
gap: 12px;
|
|
margin-top: 24px;
|
|
}
|
|
.add-card-btn {
|
|
width: 100%;
|
|
padding: 16px;
|
|
border: 2px dashed #9ca3af;
|
|
background: transparent;
|
|
color: #6b7280;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
transition: all 0.2s;
|
|
}
|
|
.add-card-btn:hover {
|
|
border-color: #667eea;
|
|
color: #667eea;
|
|
background: #f9fafb;
|
|
}
|
|
.success-message {
|
|
background: #d1fae5;
|
|
border: 2px solid #10b981;
|
|
color: #065f46;
|
|
padding: 16px;
|
|
border-radius: 6px;
|
|
margin-bottom: 20px;
|
|
display: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>
|
|
<span>🃏</span>
|
|
Flashcards Editor
|
|
</h1>
|
|
|
|
<div class="success-message" id="successMessage">
|
|
✅ Flashcards erfolgreich gespeichert!
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="title">Titel des Kartensatzes</label>
|
|
<input type="text" id="title" placeholder="z.B. Englisch Vokabeln Kapitel 3">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="description">Beschreibung (optional)</label>
|
|
<textarea id="description" placeholder="Kurze Beschreibung der Lernkarten..."></textarea>
|
|
</div>
|
|
|
|
<div id="cardsContainer"></div>
|
|
|
|
<button class="add-card-btn" onclick="addCard()">
|
|
+ Neue Karte hinzufügen
|
|
</button>
|
|
|
|
<div class="btn-group">
|
|
<button class="btn btn-primary" onclick="saveFlashcards()">💾 Speichern</button>
|
|
<button class="btn btn-secondary" onclick="window.history.back()">← Zurück</button>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
let cards = [];
|
|
|
|
function addCard() {
|
|
const cardId = Date.now();
|
|
cards.push({
|
|
id: cardId,
|
|
front: '',
|
|
back: ''
|
|
});
|
|
renderCards();
|
|
}
|
|
|
|
function removeCard(cardId) {
|
|
if (confirm('Karte wirklich löschen?')) {
|
|
cards = cards.filter(c => c.id !== cardId);
|
|
renderCards();
|
|
}
|
|
}
|
|
|
|
function updateCard(cardId, side, value) {
|
|
const card = cards.find(c => c.id === cardId);
|
|
if (card) {
|
|
card[side] = value;
|
|
}
|
|
}
|
|
|
|
function renderCards() {
|
|
const container = document.getElementById('cardsContainer');
|
|
container.innerHTML = '';
|
|
|
|
cards.forEach((card, index) => {
|
|
const cardEl = document.createElement('div');
|
|
cardEl.className = 'card';
|
|
cardEl.innerHTML = `
|
|
<div class="card-header">
|
|
<span class="card-number">Karte ${index + 1}</span>
|
|
<button class="btn btn-danger" onclick="removeCard(${card.id})">🗑️ Löschen</button>
|
|
</div>
|
|
<div class="card-sides">
|
|
<div class="card-side">
|
|
<h4>Vorderseite</h4>
|
|
<textarea
|
|
onchange="updateCard(${card.id}, 'front', this.value)"
|
|
placeholder="z.B. 'Hello'">${card.front}</textarea>
|
|
</div>
|
|
<div class="card-side">
|
|
<h4>Rückseite</h4>
|
|
<textarea
|
|
onchange="updateCard(${card.id}, 'back', this.value)"
|
|
placeholder="z.B. 'Hallo'">${card.back}</textarea>
|
|
</div>
|
|
</div>
|
|
`;
|
|
container.appendChild(cardEl);
|
|
});
|
|
}
|
|
|
|
function saveFlashcards() {
|
|
const title = document.getElementById('title').value;
|
|
const description = document.getElementById('description').value;
|
|
|
|
if (!title) {
|
|
alert('Bitte gib einen Titel ein!');
|
|
return;
|
|
}
|
|
|
|
if (cards.length === 0) {
|
|
alert('Bitte füge mindestens eine Karte hinzu!');
|
|
return;
|
|
}
|
|
|
|
for (let i = 0; i < cards.length; i++) {
|
|
if (!cards[i].front || !cards[i].back) {
|
|
alert(`Karte ${i + 1} ist nicht vollständig ausgefüllt!`);
|
|
return;
|
|
}
|
|
}
|
|
|
|
const flashcardsData = {
|
|
type: 'flashcards',
|
|
title,
|
|
description,
|
|
cards,
|
|
created: new Date().toISOString()
|
|
};
|
|
|
|
const contentId = 'flashcards_' + Date.now();
|
|
localStorage.setItem(contentId, JSON.stringify(flashcardsData));
|
|
|
|
const successMsg = document.getElementById('successMessage');
|
|
successMsg.style.display = 'block';
|
|
setTimeout(() => {
|
|
successMsg.style.display = 'none';
|
|
}, 3000);
|
|
|
|
console.log('Flashcards gespeichert:', flashcardsData);
|
|
}
|
|
|
|
// Initialize with 3 cards
|
|
addCard();
|
|
addCard();
|
|
addCard();
|
|
</script>
|
|
</body>
|
|
</html>
|