- Interactive mission selector with metadata-driven design - 5 educational missions (basics + advanced) - AI assistant roles (Deepbit, Bugsy, Schnippsi, Tobi) - SnakeCam gesture recognition system - Token tracking utilities - CLAUDE.md documentation - .gitignore for logs and secrets
104 lines
2.5 KiB
HTML
Executable File
104 lines
2.5 KiB
HTML
Executable File
<!DOCTYPE html>
|
||
<html lang="de">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<title>Schnippsis Live-Editor 🧁</title>
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<style>
|
||
body {
|
||
font-family: sans-serif;
|
||
margin: 0;
|
||
padding: 0;
|
||
background: #fefce8;
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
grid-template-rows: auto 1fr;
|
||
height: 100vh;
|
||
}
|
||
|
||
header {
|
||
grid-column: 1 / -1;
|
||
background: #ffb6b9;
|
||
color: #222;
|
||
padding: 1rem;
|
||
text-align: center;
|
||
font-weight: bold;
|
||
}
|
||
|
||
textarea {
|
||
width: 100%;
|
||
height: 100%;
|
||
padding: 1rem;
|
||
font-family: monospace;
|
||
font-size: 0.9rem;
|
||
border: none;
|
||
outline: none;
|
||
resize: none;
|
||
}
|
||
|
||
iframe {
|
||
width: 100%;
|
||
height: 100%;
|
||
border: none;
|
||
background: white;
|
||
}
|
||
|
||
.editor-section {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
.code-inputs {
|
||
flex: 1;
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr 1fr;
|
||
}
|
||
|
||
.code-inputs textarea {
|
||
border-right: 1px solid #ddd;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<header>
|
||
🧁 Schnippsis Web-Baukasten – HTML, CSS & JS live!
|
||
</header>
|
||
|
||
<div class="editor-section">
|
||
<div class="code-inputs">
|
||
<textarea id="htmlCode" placeholder="💡 HTML hier..."></textarea>
|
||
<textarea id="cssCode" placeholder="🎨 CSS hier..."></textarea>
|
||
<textarea id="jsCode" placeholder="⚙️ JavaScript hier..."></textarea>
|
||
</div>
|
||
</div>
|
||
|
||
<iframe id="preview"></iframe>
|
||
|
||
<script>
|
||
const htmlInput = document.getElementById('htmlCode');
|
||
const cssInput = document.getElementById('cssCode');
|
||
const jsInput = document.getElementById('jsCode');
|
||
const previewFrame = document.getElementById('preview');
|
||
|
||
function updatePreview() {
|
||
const html = htmlInput.value;
|
||
const css = `<style>${cssInput.value}</style>`;
|
||
const js = `<script>${jsInput.value}<\/script>`;
|
||
|
||
previewFrame.srcdoc = html + css + js;
|
||
}
|
||
|
||
[htmlInput, cssInput, jsInput].forEach(el => {
|
||
el.addEventListener('input', updatePreview);
|
||
});
|
||
|
||
// Schnippsi-Vorschlag (Startzustand)
|
||
htmlInput.value = `<h1>Hallo Krümel! 🌼</h1>\n<p>Dies ist dein erstes HTML im Editor!</p>`;
|
||
cssInput.value = `body { font-family: sans-serif; background: #fff8dc; color: #333; padding: 2rem; }`;
|
||
jsInput.value = `console.log("Krümel hat gerade Schnippsis Editor benutzt! 🧁");`;
|
||
|
||
updatePreview();
|
||
</script>
|
||
</body>
|
||
</html>
|