mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-07 03:29:19 +02:00
fix: remove broken flash-messages include from admin footer; make repertoire columns scrollable
This commit is contained in:
32
app/public/admin/toast-fragment.php
Normal file
32
app/public/admin/toast-fragment.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Toast fragment endpoint — HTMX target.
|
||||
*
|
||||
* Reads flash messages from the session and returns the toast markup.
|
||||
* Returns an empty 204 when there is nothing to show.
|
||||
* Called via hx-get on the #toast-region aside in the admin footer.
|
||||
*/
|
||||
require_once __DIR__ . '/../../bootstrap.php';
|
||||
require_once __DIR__ . '/../../src/AdminAuth.php';
|
||||
|
||||
AdminAuth::requireLogin();
|
||||
|
||||
$flash = App::consumeFlash();
|
||||
|
||||
if (!$flash['error'] && !$flash['success']) {
|
||||
http_response_code(204);
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<?php if ($flash['error']): ?>
|
||||
<p class="toast toast--error" role="alert">
|
||||
<span class="toast__icon" aria-hidden="true">⚠</span>
|
||||
<?= htmlspecialchars($flash['error']) ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php if ($flash['success']): ?>
|
||||
<p class="toast toast--success" role="status">
|
||||
<span class="toast__icon" aria-hidden="true">✓</span>
|
||||
<?= htmlspecialchars($flash['success']) ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
@@ -52,11 +52,11 @@ body > header nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: var(--step-2);
|
||||
}
|
||||
|
||||
.nav-logo {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--step-2);
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
color: var(--accent-foreground);
|
||||
@@ -74,6 +74,7 @@ body > header nav {
|
||||
|
||||
.nav-left-links,
|
||||
.nav-right-links {
|
||||
font-family: var(--font-display);
|
||||
display: flex;
|
||||
gap: var(--space-l);
|
||||
align-items: center;
|
||||
@@ -84,7 +85,7 @@ body > header nav {
|
||||
|
||||
body > header nav > a {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--step-0);
|
||||
/*font-size: var(--step-0);*/
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
color: var(--accent-foreground);
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
.search-main {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ---- 6-column index layout ---- */
|
||||
@@ -17,7 +16,7 @@
|
||||
grid-template-columns: 0.7fr 1.2fr 1.4fr 0.9fr 1.4fr 1fr;
|
||||
gap: 0;
|
||||
padding: 0 var(--space-m);
|
||||
min-height: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
@@ -56,6 +55,8 @@
|
||||
|
||||
.repertoire-col {
|
||||
padding: var(--space-xs) var(--space-2xs) var(--space-l);
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.repertoire-col:last-child {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
@font-face {
|
||||
font-family: "Ductus";
|
||||
src: url("/assets/fonts/DuctusRegular.otf") format("opentype");
|
||||
src: url("../fonts/DuctusRegular.otf") format("opentype");
|
||||
font-style: normal;
|
||||
font-weight: 398;
|
||||
font-display: swap;
|
||||
|
||||
Reference in New Issue
Block a user