Enhance layout flexibility by adding wrap classes for full and wide views

This commit is contained in:
Fabian Schieder 2026-02-28 22:07:37 +01:00
parent d491c1901f
commit cd047d057f
3 changed files with 16 additions and 5 deletions

View File

@ -13,6 +13,7 @@
--radius: 16px; --radius: 16px;
--transition: 0.25s ease; --transition: 0.25s ease;
--accent: #6366f1; --accent: #6366f1;
--wrap-max: 900px;
} }
html { scroll-behavior: smooth; overflow-x: hidden; } html { scroll-behavior: smooth; overflow-x: hidden; }
@ -84,7 +85,16 @@ body::before {
/* ── LAYOUT ───────────────────────────────────── */ /* ── LAYOUT ───────────────────────────────────── */
.wrap { .wrap {
width: 100%; width: 100%;
max-width: 900px; max-width: var(--wrap-max);
}
/* Full width nur für die Tabellen-Ansicht */
.wrap.wrap--wide {
max-width: 1400px;
}
.wrap.wrap--full {
max-width: 100%;
} }
/* ── ANIMATIONS ───────────────────────────────── */ /* ── ANIMATIONS ───────────────────────────────── */

View File

@ -476,14 +476,15 @@ try {
$body .= '</div>'; // right col $body .= '</div>'; // right col
$body .= '</div>'; // admin-grid $body .= '</div>'; // admin-grid
admin_layout('DB-Verwaltung', $body, h($dbName)); admin_layout('DB-Verwaltung', $body, h($dbName), 'wrap--full');
} catch (Throwable $e) { } catch (Throwable $e) {
admin_logout(); admin_logout();
admin_layout('DB-Verwaltung', admin_layout('DB-Verwaltung',
'<div class="notice notice-err">' . h($e->getMessage()) . '</div>' '<div class="notice notice-err">' . h($e->getMessage()) . '</div>'
. '<p style="margin-top:1rem;text-align:center"><a class="btn btn-ghost btn-sm" href="/adminer">Zurück zum Login</a></p>', . '<p style="margin-top:1rem;text-align:center"><a class="btn btn-ghost btn-sm" href="/adminer">Zurück zum Login</a></p>',
'Fehler' 'Fehler',
'wrap--wide'
); );
} }

View File

@ -6,7 +6,7 @@ function h($s)
return htmlspecialchars((string)$s, ENT_QUOTES); return htmlspecialchars((string)$s, ENT_QUOTES);
} }
function admin_layout($title, $bodyHtml, $subtitle = 'Datenbankverwaltung') function admin_layout($title, $bodyHtml, $subtitle = 'Datenbankverwaltung', string $wrapClass = '')
{ {
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
@ -26,7 +26,7 @@ function admin_layout($title, $bodyHtml, $subtitle = 'Datenbankverwaltung')
<div class="orb orb-4"></div> <div class="orb orb-4"></div>
<div class="background-blur"></div> <div class="background-blur"></div>
<div class="wrap"> <div class="wrap <?= h($wrapClass) ?>">
<div class="admin-header"> <div class="admin-header">
<div class="admin-avatar">FS</div> <div class="admin-avatar">FS</div>