Chore: Remove legacy PHP and flat JSON files

This commit is contained in:
kobold-ai
2026-09-21 13:11:56 +02:00
parent cf89cd31c7
commit 16bffa3be8
25 changed files with 0 additions and 802 deletions
-25
View File
@@ -1,25 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Fragen-Admin</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/style.css">
</head>
<body class="light-theme">
<h1>Fragen-Editor</h1>
<div id="fragen"></div>
<h2>Neue Frage hinzufügen</h2>
<div class="box">
<input id="newFrage" placeholder="Frage">
<input id="newAntwort" placeholder="Antwort">
<input id="newTipp" placeholder="Tipp">
<button onclick="addFrage()">Hinzufügen</button>
</div>
<script src="js/admin.js"></script>
</body>
</html>
-160
View File
@@ -1,160 +0,0 @@
:root {
--bg: #0b0b15;
--fg: #f5f5f5;
--accent: #c9a86a;
--accent-soft: #e6c98f;
--box-bg: rgba(255,255,255,0.05);
}
body {
background: var(--bg);
color: var(--fg);
font-family: "Georgia", serif;
text-align: center;
padding: 20px;
}
.hidden { display: none; }
.box {
border: 2px solid var(--accent);
padding: 20px;
margin: 20px auto;
width: 90%;
max-width: 600px;
background: var(--box-bg);
border-radius: 10px;
}
input, textarea {
padding: 10px;
border-radius: 5px;
border: none;
margin-top: 10px;
width: 80%;
max-width: 250px;
text-align: center;
}
button {
padding: 10px 20px;
background: var(--accent);
border: none;
border-radius: 5px;
cursor: pointer;
margin-top: 10px;
font-weight: bold;
color: #000;
}
button:hover {
background: var(--accent-soft);
}
/* Fortschrittsleiste */
.progress-container {
width: 90%;
max-width: 600px;
margin: 10px auto;
background: rgba(255,255,255,0.1);
border-radius: 10px;
border: 1px solid var(--accent);
overflow: hidden;
}
.progress-bar {
height: 14px;
background: linear-gradient(90deg, #c9a86a, #e6c98f);
width: 0%;
transition: width 0.3s;
}
/* Briefumschlag */
.intro-envelope {
position: relative;
width: 220px;
height: 150px;
margin: 0 auto 20px;
}
.envelope-body {
width: 100%;
height: 100%;
background: #f5f5dc;
border-radius: 5px;
border: 2px solid #c9a86a;
position: relative;
overflow: hidden;
z-index: 1;
}
.envelope-flap {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #e6d8a8;
clip-path: polygon(0 0, 50% 60%, 100% 0);
transform-origin: top;
transition: transform 0.8s ease-in-out;
z-index: 2;
}
.open .envelope-flap {
transform: rotateX(180deg);
}
.sparkle::after {
content: "";
position: absolute;
top: -10px;
left: 50%;
width: 6px;
height: 6px;
border-radius: 50%;
background: #ffeaa7;
box-shadow:
0 0 8px #ffeaa7,
-20px -10px 6px rgba(255,255,255,0.6),
15px -5px 6px rgba(255,255,255,0.5),
-10px 10px 6px rgba(255,255,255,0.4),
20px 15px 6px rgba(255,255,255,0.5);
animation: sparkle 0.7s ease-out forwards;
}
@keyframes sparkle {
from { opacity: 1; transform: translate(-50%, 0) scale(1); }
to { opacity: 0; transform: translate(-50%, -20px) scale(0.5); }
}
/* loesungen.html */
.loesungen-list .box {
background: #222;
border-left: 4px solid var(--accent);
border: none;
}
/* vorschlag.html & admin.html */
body.light-theme {
background: #f5f5f5;
color: #000;
}
body.light-theme .box {
background: white;
box-shadow: 0 0 5px rgba(0,0,0,0.1);
}
textarea {
resize: vertical;
font-family: Arial, sans-serif;
}
label {
display: block;
margin-top: 15px;
text-align: left;
font-weight: bold;
}
/* admin.html */
.box strong {
display: block;
margin-bottom: 10px;
}
-20
View File
@@ -1,20 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>400 – Verirrter Zauber</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body { background:#0b0b15;color:#f5f5f5;font-family:Georgia,serif;text-align:center;padding:20px; }
.box { border:2px solid #c9a86a;padding:20px;margin:20px auto;width:90%;max-width:600px;background:rgba(255,255,255,0.05);border-radius:10px; }
a { color:#c9a86a;text-decoration:none;font-weight:bold; }
</style>
</head>
<body>
<div class="box">
<h1>400 – Verirrter Zauber</h1>
<p>Der letzte Zauberspruch war etwas durcheinander geraten.</p>
<p><a href="index.html">Zurück zum magischen Quiz</a></p>
</div>
</body>
</html>
-20
View File
@@ -1,20 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>401 – Zutritt nur für Zauberer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body { background:#0b0b15;color:#f5f5f5;font-family:Georgia,serif;text-align:center;padding:20px; }
.box { border:2px solid #c9a86a;padding:20px;margin:20px auto;width:90%;max-width:600px;background:rgba(255,255,255,0.05);border-radius:10px; }
a { color:#c9a86a;text-decoration:none;font-weight:bold; }
</style>
</head>
<body>
<div class="box">
<h1>401 – Zutritt nur für Zauberer</h1>
<p>Für diesen Bereich brauchst du noch eine magische Legitimation.</p>
<p><a href="index.html">Zurück zum magischen Quiz</a></p>
</div>
</body>
</html>
-20
View File
@@ -1,20 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>403 – Verbotener Bereich</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body { background:#0b0b15;color:#f5f5f5;font-family:Georgia,serif;text-align:center;padding:20px; }
.box { border:2px solid #c9a86a;padding:20px;margin:20px auto;width:90%;max-width:600px;background:rgba(255,255,255,0.05);border-radius:10px; }
a { color:#c9a86a;text-decoration:none;font-weight:bold; }
</style>
</head>
<body>
<div class="box">
<h1>403 – Verbotener Bereich</h1>
<p>Dieser Teil der Zauberwelt ist streng geschützt.</p>
<p><a href="index.html">Zurück zum magischen Quiz</a></p>
</div>
</body>
</html>
-20
View File
@@ -1,20 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>404 – Karte des Rumtreibers leer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body { background:#0b0b15;color:#f5f5f5;font-family:Georgia,serif;text-align:center;padding:20px; }
.box { border:2px solid #c9a86a;padding:20px;margin:20px auto;width:90%;max-width:600px;background:rgba(255,255,255,0.05);border-radius:10px; }
a { color:#c9a86a;text-decoration:none;font-weight:bold; }
</style>
</head>
<body>
<div class="box">
<h1>404 – Seite nicht gefunden</h1>
<p>Die Karte des Rumtreibers zeigt hier nichts an.</p>
<p><a href="index.html">Zurück zum magischen Quiz</a></p>
</div>
</body>
</html>
-20
View File
@@ -1,20 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>405 – Unzulässiger Zauber</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body { background:#0b0b15;color:#f5f5f5;font-family:Georgia,serif;text-align:center;padding:20px; }
.box { border:2px solid #c9a86a;padding:20px;margin:20px auto;width:90%;max-width:600px;background:rgba(255,255,255,0.05);border-radius:10px; }
a { color:#c9a86a;text-decoration:none;font-weight:bold; }
</style>
</head>
<body>
<div class="box">
<h1>405 – Unzulässiger Zauber</h1>
<p>Diese Art von Zauberspruch ist hier nicht erlaubt.</p>
<p><a href="index.html">Zurück zum magischen Quiz</a></p>
</div>
</body>
</html>
-20
View File
@@ -1,20 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>500 – Explosion im Zaubertrank-Labor</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body { background:#0b0b15;color:#f5f5f5;font-family:Georgia,serif;text-align:center;padding:20px; }
.box { border:2px solid #c9a86a;padding:20px;margin:20px auto;width:90%;max-width:600px;background:rgba(255,255,255,0.05);border-radius:10px; }
a { color:#c9a86a;text-decoration:none;font-weight:bold; }
</style>
</head>
<body>
<div class="box">
<h1>500 – Explosion im Zaubertrank-Labor</h1>
<p>Irgendetwas ist gründlich schiefgegangen. Die Hauselfen räumen schon auf.</p>
<p><a href="index.html">Zurück zum magischen Quiz</a></p>
</div>
</body>
</html>
-20
View File
@@ -1,20 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>502 – Fehlgeleiteter Eulenflug</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body { background:#0b0b15;color:#f5f5f5;font-family:Georgia,serif;text-align:center;padding:20px; }
.box { border:2px solid #c9a86a;padding:20px;margin:20px auto;width:90%;max-width:600px;background:rgba(255,255,255,0.05);border-radius:10px; }
a { color:#c9a86a;text-decoration:none;font-weight:bold; }
</style>
</head>
<body>
<div class="box">
<h1>502 – Fehlgeleiteter Eulenflug</h1>
<p>Die Nachricht hat das Ziel nicht richtig erreicht.</p>
<p><a href="index.html">Zurück zum magischen Quiz</a></p>
</div>
</body>
</html>
-20
View File
@@ -1,20 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>503 – Zaubereiministerium beschäftigt</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body { background:#0b0b15;color:#f5f5f5;font-family:Georgia,serif;text-align:center;padding:20px; }
.box { border:2px solid #c9a86a;padding:20px;margin:20px auto;width:90%;max-width:600px;background:rgba(255,255,255,0.05);border-radius:10px; }
a { color:#c9a86a;text-decoration:none;font-weight:bold; }
</style>
</head>
<body>
<div class="box">
<h1>503 – Zaubereiministerium beschäftigt</h1>
<p>Die magischen Dienste sind gerade ausgelastet. Versuche es später erneut.</p>
<p><a href="index.html">Zurück zum magischen Quiz</a></p>
</div>
</body>
</html>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

-28
View File
@@ -1,28 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Finale – Magisches Quiz</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="box">
<h1>🎉 Happy Birthday Schatz 🎉</h1>
<p id="scoreText"></p>
<h2>💛 Der Gewinn ist ein schöner Abend Zuhause 💛</h2>
<p>
Wir holen uns lecker essen und machen es uns gemütlich, entspannen, lachen und genießen die Zeit zusammen.
Wir kaufen ein Online escape game. Nach deiner Wahl, da ich nicht mehr weiß welche wir hatten.
</p>
<p>Ich freue mich auf unseren Abend.</p>
<button onclick="window.location.href='index.html'">Erneut spielen</button>
</div>
<script src="js/finale.js"></script>
</body>
</html>
-77
View File
@@ -1,77 +0,0 @@
[
{
"frage": "Wie lautet der zweite Vorname von Harry?",
"antwort": "james",
"tipp": "Er stammt von seinem Vater."
},
{
"frage": "Wie heißt die Hüterin der verbotenen Abteilung?",
"antwort": "madam pince",
"tipp": "Ihr Nachname klingt wie 'zwicken'."
},
{
"frage": "Welches magische Wesen bewacht die Kammer des Schreckens?",
"antwort": "basilisk",
"tipp": "Ein tödlicher Blick."
},
{
"frage": "Wie lautet der Vorname von Dumbledores Bruder?",
"antwort": "aberforth",
"tipp": "Er betreibt den Eberkopf."
},
{
"frage": "Welcher Zauber versiegelt Türen?",
"antwort": "colloportus",
"tipp": "Kommt im fünften Band häufig vor."
},
{
"frage": "Wie heißt der Hauself der Familie Black?",
"antwort": "kreacher",
"tipp": "Er ist nicht besonders freundlich."
},
{
"frage": "Wie lautet der Zauber, der Gegner entwaffnet?",
"antwort": "expelliarmus",
"tipp": "Harry benutzt ihn ständig."
},
{
"frage": "Mein Lieblingsessen?",
"antwort": "Raclette",
"tipp": "Käse :)"
},
{
"frage": "Dein Lieblingsessen?",
"antwort": "Ravioli",
"tipp": "Gefüllt ist's. "
},
{
"frage": "Wo haben wir uns das erste mal geküsst?",
"antwort": "Olching",
"tipp": "Nur der Ort ist wichtig"
},
{
"frage": "Mein erster Geburtstagskuchen für dich?",
"antwort": "Donauwelle",
"tipp": "Erst gestern war es witztig"
},
{
"frage": "Erster Urlaub?",
"antwort": "Den Haag",
"tipp": "Nicht das land sondern der Ort"
},
{
"frage": "Lieblingskörperstelle?",
"antwort": "Ombelico",
"tipp": "Es hat so schön geprickelt"
},
{
"frage": "Als filmpaar sind wir am ehesten?",
"antwort": "Monroe&Rosalee",
"tipp": "Grimm ist die Serie"
},
{
"frage": "Wie heißt unser erster Hund?",
"antwort": "Molly",
"tipp": "mal was einfaches"
}
]
-7
View File
@@ -1,7 +0,0 @@
[
{
"frage": "Hagrid schlüsselbund hat wie viele Schlüssel?",
"antwort": "7",
"tipp": "weil es immer 3,5 oder 7 sind."
}
]
-34
View File
@@ -1,34 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Magisches Harry-Potter-Escape-Quiz</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<audio id="bgm" src="music.mp3" loop></audio>
<h1>✨ Magisches Spatzi-Quiz ✨</h1>
<div class="progress-container">
<div id="progressBar" class="progress-bar"></div>
</div>
<div id="progressLabel">Hauspunkte: 0</div>
<div id="intro" class="box">
<div class="intro-envelope" id="envelope">
<div class="envelope-body">
<div class="envelope-flap"></div>
</div>
</div>
<p>Ein verzauberter Briefumschlag ist vor dir erschienen.</p>
<button onclick="startGame()">Brief öffnen</button>
</div>
<div id="questions"></div>
<script src="js/index.js"></script>
</body>
</html>
-54
View File
@@ -1,54 +0,0 @@
let daten = [];
async function load() {
const res = await fetch("fragen.json");
daten = await res.json();
render();
}
function render() {
const container = document.getElementById("fragen");
container.innerHTML = "";
daten.forEach((f, i) => {
container.innerHTML += `
<div class="box">
<strong>Frage ${i+1}</strong>
<input value="${f.frage}" onchange="edit(${i}, 'frage', this.value)">
<input value="${f.antwort}" onchange="edit(${i}, 'antwort', this.value)">
<input value="${f.tipp}" onchange="edit(${i}, 'tipp', this.value)">
<button onclick="removeFrage(${i})">Löschen</button>
</div>
`;
});
}
function edit(i, field, value) {
daten[i][field] = value;
save();
}
function addFrage() {
daten.push({
frage: document.getElementById("newFrage").value,
antwort: document.getElementById("newAntwort").value,
tipp: document.getElementById("newTipp").value
});
save();
}
function removeFrage(i) {
daten.splice(i, 1);
save();
}
async function save() {
await fetch("save.php", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(daten)
});
load();
}
load();
-10
View File
@@ -1,10 +0,0 @@
function getParam(name) {
const params = new URLSearchParams(window.location.search);
return params.get(name);
}
const score = getParam("score") || 0;
const max = getParam("max") || 10;
document.getElementById("scoreText").innerText =
`Du hast ${score} von ${max} möglichen Hauspunkten erreicht.`;
-110
View File
@@ -1,110 +0,0 @@
function levenshtein(a, b) {
const matrix = Array.from({ length: a.length + 1 }, (_, i) =>
Array.from({ length: b.length + 1 }, (_, j) =>
i === 0 ? j : j === 0 ? i : 0
)
);
for (let i = 1; i <= a.length; i++) {
for (let j = 1; j <= b.length; j++) {
matrix[i][j] = Math.min(
matrix[i - 1][j] + 1,
matrix[i][j - 1] + 1,
matrix[i - 1][j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1)
);
}
}
return matrix[a.length][b.length];
}
let fragen = [];
let index = 0;
let punkte = 0;
let versuche = [];
function startGame() {
document.getElementById("envelope").classList.add("open");
setTimeout(() => {
document.getElementById("intro").classList.add("hidden");
document.getElementById("bgm").play();
loadQuestions();
}, 900);
}
async function loadQuestions() {
const res = await fetch("fragen.json");
fragen = await res.json();
versuche = Array(fragen.length).fill(0);
renderFrage();
updateProgress();
}
function renderFrage() {
const f = fragen[index];
document.getElementById("questions").innerHTML = `
<div class="box" id="frageBox">
<h2>Frage ${index + 1}</h2>
<p>${f.frage}</p>
<input id="antwort">
<button onclick="check()">Prüfen</button>
<button onclick="showTip()">Tipp</button>
<p class="tip hidden" id="tipp">${f.tipp}</p>
<p id="versuche">Versuche: 0 / 3</p>
<p id="feedback"></p>
</div>
`;
}
function showTip() {
document.getElementById("tipp").classList.remove("hidden");
}
function check() {
const input = document.getElementById("antwort").value.toLowerCase().trim();
const korrekt = fragen[index].antwort.toLowerCase().trim();
versuche[index]++;
document.getElementById("versuche").innerText = `Versuche: ${versuche[index]} / 3`;
const dist = levenshtein(input, korrekt);
if (dist <= 2) {
punkte++;
addSparkle();
next();
return;
}
if (versuche[index] >= 3) {
next();
return;
}
document.getElementById("feedback").innerText = "Leider falsch.";
}
function addSparkle() {
const el = document.getElementById("frageBox");
el.classList.add("sparkle");
setTimeout(() => el.classList.remove("sparkle"), 700);
}
function next() {
index++;
updateProgress();
if (index >= fragen.length) {
window.location.href = `finale.html?score=${punkte}&max=${fragen.length}`;
return;
}
renderFrage();
}
function updateProgress() {
const percent = (index / fragen.length) * 100;
document.getElementById("progressBar").style.width = percent + "%";
document.getElementById("progressLabel").innerText = `Hauspunkte: ${punkte}`;
}
-17
View File
@@ -1,17 +0,0 @@
async function load() {
const res = await fetch("fragen.json");
const fragen = await res.json();
const container = document.getElementById("loesungen");
fragen.forEach((f, i) => {
container.innerHTML += `
<div class="box">
${i + 1}. ${f.frage}<br>
<strong>${f.antwort}</strong>
</div>
`;
});
}
load();
-31
View File
@@ -1,31 +0,0 @@
async function send() {
const frage = document.getElementById("frage").value.trim();
const antwort = document.getElementById("antwort").value.trim();
const tipp = document.getElementById("tipp").value.trim();
if (!frage || !antwort) {
alert("Bitte mindestens Frage und Antwort ausfüllen.");
return;
}
const payload = {
frage: frage,
antwort: antwort,
tipp: tipp
};
const res = await fetch("save_vorschlag.php", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload)
});
if (res.ok) {
alert("Danke! Dein Vorschlag wurde gespeichert.");
document.getElementById("frage").value = "";
document.getElementById("antwort").value = "";
document.getElementById("tipp").value = "";
} else {
alert("Fehler beim Speichern. Bitte später erneut versuchen.");
}
}
-15
View File
@@ -1,15 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Lösungen – Magisches Quiz</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<h1>🔐 Lösungen zum Harry-Potter-Escape-Quiz</h1>
<div id="loesungen" class="loesungen-list"></div>
<script src="js/loesungen.js"></script>
</body>
</html>
-1
View File
@@ -1 +0,0 @@
User-agent: *
-5
View File
@@ -1,5 +0,0 @@
<?php
$data = file_get_contents("php://input");
file_put_contents("fragen.json", $data);
echo "OK";
?>
-37
View File
@@ -1,37 +0,0 @@
<?php
header("Content-Type: application/json");
// Datei, in die gespeichert wird
$file = "fragen_vorschlaege.json";
// Eingehende Daten lesen
$input = file_get_contents("php://input");
$data = json_decode($input, true);
if (!$data || !isset($data["frage"]) || !isset($data["antwort"])) {
http_response_code(400);
echo json_encode(["error" => "Ungültige Daten"]);
exit;
}
// Existierende Vorschläge laden
$existing = [];
if (file_exists($file)) {
$json = file_get_contents($file);
$existing = json_decode($json, true);
if (!is_array($existing)) {
$existing = [];
}
}
// Neuen Vorschlag anhängen
$existing[] = $data;
// Datei speichern
if (file_put_contents($file, json_encode($existing, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE))) {
echo json_encode(["success" => true]);
} else {
http_response_code(500);
echo json_encode(["error" => "Konnte Datei nicht schreiben"]);
}
?>
-31
View File
@@ -1,31 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Frage vorschlagen</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/style.css">
</head>
<body class="light-theme">
<h1>✨ Frage vorschlagen ✨</h1>
<p>Hier kannst du eine neue Frage für das Quiz vorschlagen.
Die Frage wird gespeichert und später geprüft.</p>
<div class="box">
<label>Frage:</label>
<textarea id="frage" rows="2" placeholder="Deine Frage..."></textarea>
<label>Antwort:</label>
<input id="antwort" placeholder="Die richtige Antwort...">
<label>Tipp (optional):</label>
<input id="tipp" placeholder="Hinweis für die Spieler...">
<button onclick="send()">Vorschlag einreichen</button>
</div>
<script src="js/vorschlag.js"></script>
</body>
</html>