This commit is contained in:
2026-03-04 23:54:36 +01:00
parent 7d73c570c9
commit c600458959
16 changed files with 26 additions and 62 deletions

View File

@@ -0,0 +1,47 @@
<?php
$themes = [
'light' => 'Light',
'ocean' => 'Ocean',
'graphite' => 'Graphite',
];
require_auth();
$current = user_theme();
$notice = null;
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$theme = (string)($_POST['theme'] ?? 'light');
if (!isset($themes[$theme])) {
$theme = 'light';
}
set_user_theme($theme);
$current = $theme;
$notice = 'Theme gespeichert.';
}
?>
<div class="card">
<div class="pill">Einstellungen</div>
<h1 style="margin-top:.75rem;">User-Design</h1>
<p class="muted">Wähle deine persönliche Farbpalette.</p>
<?php if ($notice): ?>
<div class="card" style="margin-top:1rem; border-color:var(--accent-2);">
<?= e($notice) ?>
</div>
<?php endif; ?>
<form method="post" style="margin-top:1rem; display:grid; gap:12px; max-width:360px;">
<label class="muted" style="display:grid; gap:6px;">
<span>Farbpalette</span>
<select name="theme">
<?php foreach ($themes as $key => $label): ?>
<option value="<?= e($key) ?>" <?= $current === $key ? 'selected' : '' ?>>
<?= e($label) ?>
</option>
<?php endforeach; ?>
</select>
</label>
<button class="cta-button" type="submit">Speichern</button>
</form>
</div>