feat: add new song library files and supporting application configuration

This commit is contained in:
joel
2026-08-12 07:08:26 +02:00
commit 467287c6d7
360 changed files with 158123 additions and 0 deletions
+121
View File
@@ -0,0 +1,121 @@
<?php
// settings.php — Globale Einstellungen
$configFile = __DIR__ . DIRECTORY_SEPARATOR . 'config.php';
// Speichern
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$newData = [
'slide_strip_width' => max(50, (int)($_POST['width'] ?? 190)),
'slide_strip_height' => max(30, (int)($_POST['height'] ?? 105)),
'slide_strip_font_size' => max(0.1, (float)($_POST['font_size'] ?? 0.75)),
'base_font_scale' => max(0.3, (float)($_POST['base_font_scale'] ?? 1.0)),
'color1' => $_POST['color1'] ?? '#ffffff',
'color2' => $_POST['color2'] ?? '#5fa8ff',
'color3' => $_POST['color3'] ?? '#ffff00',
'color4' => $_POST['color4'] ?? '#00ff00',
];
$code = "<?php\n\n// Web SongBeamer Globale Konfiguration\n\nreturn " . var_export($newData, true) . ";\n";
file_put_contents($configFile, $code);
header('Location: settings.php?saved=1');
exit;
}
$config = file_exists($configFile) ? include($configFile) : [];
$width = $config['slide_strip_width'] ?? 190;
$height = $config['slide_strip_height'] ?? 105;
$fontSize = $config['slide_strip_font_size'] ?? 0.75;
$baseFontScale = $config['base_font_scale'] ?? 1.0;
$color1 = $config['color1'] ?? '#ffffff';
$color2 = $config['color2'] ?? '#5fa8ff';
$color3 = $config['color3'] ?? '#ffff00';
$color4 = $config['color4'] ?? '#00ff00';
$saved = isset($_GET['saved']);
?>
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SongBeamer Settings</title>
<style>
:root { --bg: #0b0d10; --fg: #e8edf2; --border: #26303a; --btn: #2b3540; --btn-hover: #3b4856; --primary: #5fa8ff; }
body { background: var(--bg); color: var(--fg); font-family: system-ui, sans-serif; padding: 2rem; }
h1 { font-size: 1.5rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: .5rem; }
.card { background: #14181d; border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; max-width: 500px; }
.form-group { margin-bottom: 1.2rem; }
label { display: block; margin-bottom: .4rem; font-weight: bold; font-size: 0.9rem; color: #93a1ad; }
input[type="number"], input[type="text"] { width: 100%; padding: .6rem; border-radius: 4px; border: 1px solid var(--border); background: #000; color: var(--fg); font-size: 1rem; box-sizing: border-box; }
input[type="color"] { border: 1px solid var(--border); background: #000; border-radius: 4px; height: 38px; cursor: pointer; padding: 0 4px; }
.color-row { display: flex; gap: 1rem; align-items: center; margin-bottom: .5rem; }
.color-row input { flex-shrink: 0; }
button { background: var(--primary); color: #000; border: none; padding: .6rem 1.2rem; border-radius: 4px; cursor: pointer; font-weight: bold; font-size: 1rem; width: 100%; margin-top: 1rem; }
button:hover { opacity: 0.9; }
.success { background: rgba(0, 255, 0, 0.1); border: 1px solid #00ff00; color: #00ff00; padding: .8rem; border-radius: 4px; margin-bottom: 1.5rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
</style>
</head>
<body>
<h1>
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>
Globale Einstellungen
</h1>
<div style="margin-bottom: 1rem;"><a href="control.php">← Zurück zur Steuerung</a></div>
<div class="card">
<?php if ($saved): ?>
<div class="success">Einstellungen erfolgreich gespeichert! <a href="control.php" style="color:#00ff00;text-decoration:underline;">Steuerung öffnen</a></div>
<?php endif; ?>
<form method="POST">
<h2 style="font-size:1.1rem; margin-top:0;">Folien-Galerie (Slide Strip)</h2>
<div class="form-group">
<label>Kärtchen-Breite (Pixel)</label>
<input type="number" name="width" value="<?= htmlspecialchars((string)$width) ?>" required>
</div>
<div class="form-group">
<label>Kärtchen-Mindesthöhe (Pixel)</label>
<input type="number" name="height" value="<?= htmlspecialchars((string)$height) ?>" required>
</div>
<div class="form-group">
<label>Kärtchen-Schriftgröße (rem, Standard: 0.75)</label>
<input type="text" name="font_size" value="<?= htmlspecialchars((string)$fontSize) ?>" required>
</div>
<hr>
<h2 style="font-size:1.1rem; margin-top:0;">Anzeige-Einstellungen</h2>
<div class="form-group">
<label>Basis-Schriftgröße (Skalierungsfaktor, Standard: 1.0)</label>
<input type="number" step="0.05" min="0.3" max="2.0" name="base_font_scale" value="<?= htmlspecialchars((string)$baseFontScale) ?>" required>
</div>
<div class="form-group">
<label>Farben für mehrsprachige Lieder</label>
<div class="color-row">
<input type="color" name="color1" value="<?= htmlspecialchars((string)$color1) ?>">
<span>Sprache 1 (Standard: Weiß)</span>
</div>
<div class="color-row">
<input type="color" name="color2" value="<?= htmlspecialchars((string)$color2) ?>">
<span>Sprache 2 (Standard: Blau)</span>
</div>
<div class="color-row">
<input type="color" name="color3" value="<?= htmlspecialchars((string)$color3) ?>">
<span>Sprache 3 (Standard: Gelb)</span>
</div>
<div class="color-row">
<input type="color" name="color4" value="<?= htmlspecialchars((string)$color4) ?>">
<span>Sprache 4 (Standard: Grün)</span>
</div>
</div>
<button type="submit">Speichern</button>
</form>
</div>
</body>
</html>