293 lines
6.8 KiB
HTML
Executable File
293 lines
6.8 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html lang="de">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Dein Zeichen im Wald 🌿</title>
|
|
<style>
|
|
/* ✂️ SCHNIPPSI'S CSS LABOR ✂️ */
|
|
:root {
|
|
--bg-color: #121212;
|
|
--text-color: #e0e0e0;
|
|
--glass-bg: rgba(255, 255, 255, 0.1);
|
|
--glass-border: rgba(255, 255, 255, 0.2);
|
|
--accent: #4caf50;
|
|
/* Waldgrün */
|
|
--accent-hover: #66bb6a;
|
|
--shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
height: 100vh;
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
background: var(--bg-color);
|
|
color: var(--text-color);
|
|
|
|
/* Zentrierung: Das Herz des Layouts */
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
|
|
/* Ein bisschen Wald-Atmosphäre */
|
|
background-image: radial-gradient(circle at 50% 50%, #1e2820 0%, #0a0e0b 100%);
|
|
}
|
|
|
|
/* Der Container für dein Zeichen */
|
|
.forest-container {
|
|
text-align: center;
|
|
}
|
|
|
|
/* Das "Zeichen" (Der Button/Trigger) */
|
|
.sign-box {
|
|
background: var(--glass-bg);
|
|
backdrop-filter: blur(10px);
|
|
/* Der Glassmorphism Effekt */
|
|
-webkit-backdrop-filter: blur(10px);
|
|
border: 1px solid var(--glass-border);
|
|
border-radius: 20px;
|
|
padding: 40px 60px;
|
|
box-shadow: var(--shadow);
|
|
cursor: pointer;
|
|
transition: transform 0.3s ease, border-color 0.3s ease;
|
|
}
|
|
|
|
.sign-box:hover {
|
|
transform: translateY(-5px);
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.sign-icon {
|
|
font-size: 4rem;
|
|
margin-bottom: 10px;
|
|
display: block;
|
|
}
|
|
|
|
.sign-label {
|
|
font-size: 1.5rem;
|
|
font-weight: bold;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
/* 🌶️ DAS MODAL (Overlay) */
|
|
.modal-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.8);
|
|
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
/* Klick durchlassen wenn unsichtbar */
|
|
transition: opacity 0.3s ease;
|
|
z-index: 100;
|
|
}
|
|
|
|
.modal-overlay.active {
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.modal-content {
|
|
background: #1e1e1e;
|
|
border: 1px solid var(--accent);
|
|
border-radius: 15px;
|
|
padding: 30px;
|
|
width: 90%;
|
|
max-width: 400px;
|
|
box-shadow: 0 0 20px rgba(76, 175, 80, 0.2);
|
|
transform: scale(0.9);
|
|
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
}
|
|
|
|
.modal-overlay.active .modal-content {
|
|
transform: scale(1);
|
|
}
|
|
|
|
h3 {
|
|
margin-top: 0;
|
|
color: var(--accent);
|
|
}
|
|
|
|
label {
|
|
display: block;
|
|
margin: 15px 0 5px;
|
|
font-size: 0.9rem;
|
|
color: #aaa;
|
|
text-align: left;
|
|
}
|
|
|
|
input,
|
|
textarea {
|
|
width: 100%;
|
|
padding: 10px;
|
|
background: #2a2a2a;
|
|
border: 1px solid #444;
|
|
border-radius: 5px;
|
|
color: white;
|
|
font-family: inherit;
|
|
}
|
|
|
|
textarea {
|
|
height: 100px;
|
|
resize: none;
|
|
}
|
|
|
|
input:focus,
|
|
textarea:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.actions {
|
|
margin-top: 20px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
button {
|
|
padding: 10px 20px;
|
|
border: none;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
font-weight: bold;
|
|
transition: opacity 0.2s;
|
|
}
|
|
|
|
.btn-cancel {
|
|
background: transparent;
|
|
color: #aaa;
|
|
border: 1px solid #444;
|
|
}
|
|
|
|
.btn-cancel:hover {
|
|
color: white;
|
|
border-color: white;
|
|
}
|
|
|
|
.btn-send {
|
|
background: var(--accent);
|
|
color: white;
|
|
}
|
|
|
|
.btn-submit:hover {
|
|
opacity: 0.9;
|
|
}
|
|
|
|
/* Nachricht nach dem Senden */
|
|
#status {
|
|
position: absolute;
|
|
bottom: 20px;
|
|
font-size: 0.9rem;
|
|
color: var(--accent);
|
|
opacity: 0;
|
|
transition: opacity 0.5s;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<!-- 🏛️ TEMPLATUS DOM STRUKTUR -->
|
|
<div class="forest-container">
|
|
<div class="sign-box" id="openModalBtn">
|
|
<span class="sign-icon">🌲</span>
|
|
<span class="sign-label">ZEICHEN SETZEN</span>
|
|
</div>
|
|
<div id="status">Daten kopiert! Zurück zum Terminal.</div>
|
|
</div>
|
|
|
|
<!-- MODAL -->
|
|
<div class="modal-overlay" id="modal">
|
|
<div class="modal-content">
|
|
<h3>Dein Zeichen im Wald</h3>
|
|
<p>Hinterlasse eine Nachricht für die anderen Krümel.</p>
|
|
|
|
<label for="inpName">Dein Name (oder Pseudonym)</label>
|
|
<input type="text" id="inpName" placeholder="z.B. Wanderer">
|
|
|
|
<label for="inpMsg">Deine Botschaft</label>
|
|
<textarea id="inpMsg" placeholder="Was hast du entdeckt?"></textarea>
|
|
|
|
<div class="actions">
|
|
<button class="btn-cancel" id="closeModalBtn">Abbrechen</button>
|
|
<button class="btn-send" id="sendBtn">🚀 Senden</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// 🌶️ PEPPER'S LOGIK LABOR
|
|
|
|
const modal = document.getElementById('modal');
|
|
const btnOpen = document.getElementById('openModalBtn');
|
|
const btnClose = document.getElementById('closeModalBtn');
|
|
const btnSend = document.getElementById('sendBtn');
|
|
|
|
const inpName = document.getElementById('inpName');
|
|
const inpMsg = document.getElementById('inpMsg');
|
|
const status = document.getElementById('status');
|
|
|
|
// Modal öffnen
|
|
btnOpen.addEventListener('click', () => {
|
|
modal.classList.add('active');
|
|
inpName.focus();
|
|
});
|
|
|
|
// Modal schließen
|
|
btnClose.addEventListener('click', () => {
|
|
modal.classList.remove('active');
|
|
});
|
|
|
|
// Klick auf Hintergrund schließt auch
|
|
modal.addEventListener('click', (e) => {
|
|
if (e.target === modal) modal.classList.remove('active');
|
|
});
|
|
|
|
// Senden & JSON bauen
|
|
btnSend.addEventListener('click', async () => {
|
|
const name = inpName.value.trim() || 'Unbekannt';
|
|
const msg = inpMsg.value.trim() || 'Stilles Rauschen...';
|
|
|
|
// Das Datenpaket für die Crew
|
|
const data = {
|
|
mission: "schnippsi_ui",
|
|
author: name,
|
|
message: msg,
|
|
timestamp: new Date().toISOString(),
|
|
style: "glassmorphism"
|
|
};
|
|
|
|
const jsonStr = JSON.stringify(data, null, 2);
|
|
|
|
try {
|
|
await navigator.clipboard.writeText(jsonStr);
|
|
|
|
// UI Feedback
|
|
modal.classList.remove('active');
|
|
status.textContent = "✨ Copied! Füge es jetzt im Terminal ein: ./missions/evaluate_sign.sh";
|
|
status.style.opacity = '1';
|
|
|
|
// Nach 3s ausblenden
|
|
setTimeout(() => { status.style.opacity = '0'; }, 5000);
|
|
|
|
} catch (err) {
|
|
alert("Fehler beim Kopieren: " + err);
|
|
}
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html> |