init py server

This commit is contained in:
derlole
2025-04-14 08:29:20 +00:00
parent fb5df93da5
commit 7e8b74ffd4
5 changed files with 94 additions and 1 deletions

14
static/script.js Normal file
View File

@@ -0,0 +1,14 @@
document.getElementById('befehlForm').addEventListener('submit', function(event) {
event.preventDefault(); // Seite nicht neu laden!
const befehl = document.getElementById('befehl').value;
fetch(`/send?befehl=${encodeURIComponent(befehl)}`)
.then(response => response.text())
.then(text => {
document.getElementById('status').textContent = text;
})
.catch(err => {
document.getElementById('status').textContent = 'Fehler beim Senden.';
});
});

12
static/style.css Normal file
View File

@@ -0,0 +1,12 @@
body {
font-family: sans-serif;
padding: 2rem;
background-color: #f4f4f4;
}
form {
background: #fff;
padding: 1rem;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}