Drink it cold: Terminplanung für Kühlanhänger
46
web/.htaccess
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# Drink it cold – Apache-Konfiguration für die Subdomain.
|
||||
# Öffentlich ist nur dieses Verzeichnis; app/, views/, sql/ und storage/
|
||||
# liegen zwar im selben FTP-Baum, sind aber zusätzlich per .htaccess gesperrt.
|
||||
|
||||
Options -Indexes
|
||||
DirectoryIndex index.php index.html
|
||||
AddDefaultCharset UTF-8
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
|
||||
# Immer HTTPS. Der Hoster kann TLS terminieren, daher auch der Proxy-Header.
|
||||
RewriteCond %{HTTPS} !=on
|
||||
RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]
|
||||
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
|
||||
|
||||
# Interne Verzeichnisse nie ausliefern.
|
||||
RewriteRule ^(app|views|sql|storage|tools)(/|$) - [F,L]
|
||||
RewriteCond %{REQUEST_URI} !^/\.well-known/
|
||||
RewriteRule (^|/)\. - [F,L]
|
||||
|
||||
# Nicht vorhandene Pfade an den Front Controller.
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^ index.php [QSA,L]
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_headers.c>
|
||||
Header always set X-Content-Type-Options "nosniff"
|
||||
Header always set X-Frame-Options "DENY"
|
||||
Header always set Referrer-Policy "same-origin"
|
||||
<FilesMatch "\.(css|js|svg|png|jpg|jpeg|webp|ico|woff2)$">
|
||||
Header set Cache-Control "public, max-age=604800"
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
|
||||
<FilesMatch "^(\.env|\.git.*|composer\..*)$">
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
</FilesMatch>
|
||||
|
||||
<IfModule mod_php.c>
|
||||
php_flag display_errors off
|
||||
php_flag log_errors on
|
||||
</IfModule>
|
||||
897
web/assets/app.css
Normal file
|
|
@ -0,0 +1,897 @@
|
|||
/* ==========================================================================
|
||||
Drink it cold – Terminplanung
|
||||
Design: Eisblau (#196abc) + Weiß, Schriften Manrope/Inter (lokal)
|
||||
========================================================================== */
|
||||
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 400 700;
|
||||
font-display: swap;
|
||||
src: url('fonts/inter-latin.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Manrope';
|
||||
font-style: normal;
|
||||
font-weight: 400 800;
|
||||
font-display: swap;
|
||||
src: url('fonts/manrope-latin.woff2') format('woff2');
|
||||
}
|
||||
|
||||
:root {
|
||||
--brand: #196abc;
|
||||
--brand-600: #1560ab;
|
||||
--brand-700: #12528f;
|
||||
--brand-800: #0d3d6d;
|
||||
--brand-900: #0a2c4e;
|
||||
--ice-50: #f4f9fe;
|
||||
--ice-100: #e6f1fc;
|
||||
--ice-200: #d3e6f9;
|
||||
--ice-300: #b9daf6;
|
||||
--ink: #0e1b26;
|
||||
--ink-2: #31485a;
|
||||
--muted: #667b8a;
|
||||
--line: #dbe6f0;
|
||||
--line-soft: #eaf2f9;
|
||||
--white: #fff;
|
||||
--green: #2e7d32;
|
||||
--green-soft: #eaf6ea;
|
||||
--red: #bb3a2f;
|
||||
--red-soft: #fdeeec;
|
||||
--amber: #b16d0a;
|
||||
--amber-soft: #fff5e3;
|
||||
|
||||
--radius-sm: 8px;
|
||||
--radius: 12px;
|
||||
--radius-lg: 18px;
|
||||
--radius-xl: 24px;
|
||||
|
||||
--shadow-sm: 0 1px 2px rgba(10, 44, 78, .05);
|
||||
--shadow: 0 2px 8px rgba(10, 44, 78, .06), 0 12px 28px rgba(10, 44, 78, .06);
|
||||
--shadow-lg: 0 10px 30px rgba(10, 44, 78, .12), 0 30px 60px rgba(10, 44, 78, .12);
|
||||
|
||||
--font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
|
||||
--font-display: 'Manrope', 'Inter', system-ui, sans-serif;
|
||||
|
||||
--topbar-h: 68px;
|
||||
--page-max: 1520px;
|
||||
--gutter: clamp(1rem, 2.6vw, 2rem);
|
||||
}
|
||||
|
||||
*, *::before, *::after { box-sizing: border-box; }
|
||||
html { -webkit-text-size-adjust: 100%; }
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: var(--font-body);
|
||||
font-size: 1rem;
|
||||
line-height: 1.55;
|
||||
color: var(--ink-2);
|
||||
background:
|
||||
radial-gradient(1200px 500px at 100% -10%, #e9f3fd 0%, rgba(233, 243, 253, 0) 60%),
|
||||
var(--ice-50);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
min-height: 100vh;
|
||||
}
|
||||
img, svg { display: block; max-width: 100%; }
|
||||
a { color: var(--brand); text-decoration: none; }
|
||||
a:hover { color: var(--brand-700); }
|
||||
button, input, select, textarea { font: inherit; color: inherit; }
|
||||
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.18; margin: 0; letter-spacing: -.02em; }
|
||||
h1 { font-size: clamp(1.55rem, 2.6vw, 2.15rem); font-weight: 800; }
|
||||
h2 { font-size: 1.12rem; font-weight: 800; }
|
||||
h3 { font-size: .98rem; font-weight: 800; }
|
||||
p { margin: 0; }
|
||||
hr { border: 0; border-top: 1px solid var(--line-soft); margin: 16px 0; }
|
||||
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
|
||||
a .ico, button .ico { pointer-events: none; }
|
||||
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
|
||||
.muted { color: var(--muted); }
|
||||
.small { font-size: .82rem; }
|
||||
.ta-right { text-align: right; }
|
||||
.inline { display: inline; }
|
||||
.optional { font-weight: 500; color: var(--muted); }
|
||||
|
||||
.skip-link {
|
||||
position: fixed; left: 12px; top: -60px; z-index: 999;
|
||||
background: var(--white); color: var(--ink); padding: 10px 16px; border-radius: 10px;
|
||||
box-shadow: var(--shadow); transition: top .2s;
|
||||
}
|
||||
.skip-link:focus { top: 12px; }
|
||||
|
||||
/* --------------------------------------------------------------- Topbar */
|
||||
.topbar {
|
||||
position: sticky; top: 0; z-index: 40;
|
||||
background: rgba(255, 255, 255, .92);
|
||||
backdrop-filter: blur(14px);
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
.topbar__inner {
|
||||
max-width: var(--page-max); margin: 0 auto;
|
||||
min-height: var(--topbar-h);
|
||||
padding: 0 var(--gutter);
|
||||
display: flex; align-items: center; gap: 22px;
|
||||
}
|
||||
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; color: var(--ink); }
|
||||
.brand:hover { color: var(--ink); }
|
||||
.brand__mark { width: 44px; height: 32px; }
|
||||
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
|
||||
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.02rem; letter-spacing: -.02em; }
|
||||
.brand__sub { font-size: .68rem; text-transform: uppercase; letter-spacing: .13em; color: var(--muted); margin-top: 3px; }
|
||||
|
||||
.mainnav { display: flex; align-items: center; gap: 2px; flex: 1 1 auto; min-width: 0; }
|
||||
.mainnav a {
|
||||
display: inline-flex; align-items: center; gap: 7px;
|
||||
padding: 9px 12px; border-radius: 10px;
|
||||
font-weight: 600; font-size: .88rem; color: var(--ink-2);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.mainnav a:hover { background: var(--ice-50); color: var(--brand-700); }
|
||||
.mainnav a[aria-current="page"] { background: var(--ice-100); color: var(--brand-700); }
|
||||
.mainnav .ico { width: 18px; height: 18px; }
|
||||
.nav-short { display: none; }
|
||||
.nav-badge {
|
||||
min-width: 19px; height: 19px; padding: 0 6px; border-radius: 99px;
|
||||
background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700;
|
||||
display: inline-flex; align-items: center; justify-content: center; line-height: 1;
|
||||
}
|
||||
|
||||
.topbar__tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
|
||||
.global-search {
|
||||
position: relative; display: flex; align-items: center;
|
||||
}
|
||||
.global-search .ico { position: absolute; left: 10px; width: 17px; height: 17px; color: var(--muted); }
|
||||
.global-search input {
|
||||
width: 190px; height: 38px; padding: 0 12px 0 34px;
|
||||
border: 1px solid var(--line); border-radius: 10px; background: var(--ice-50);
|
||||
outline: none; font-size: .86rem;
|
||||
}
|
||||
.global-search input:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(25, 106, 188, .12); }
|
||||
|
||||
.user-menu { position: relative; }
|
||||
.user-menu summary {
|
||||
list-style: none; display: flex; align-items: center; gap: 8px;
|
||||
cursor: pointer; padding: 4px 6px 4px 4px; border-radius: 99px;
|
||||
border: 1px solid transparent; user-select: none;
|
||||
}
|
||||
.user-menu summary::-webkit-details-marker { display: none; }
|
||||
.user-menu summary:hover { background: var(--ice-50); }
|
||||
.avatar {
|
||||
width: 34px; height: 34px; border-radius: 50%;
|
||||
background: linear-gradient(145deg, var(--brand), var(--brand-700));
|
||||
color: #fff; font-weight: 700; font-size: .78rem;
|
||||
display: inline-flex; align-items: center; justify-content: center;
|
||||
letter-spacing: .02em; flex: 0 0 auto;
|
||||
}
|
||||
.avatar--small { width: 30px; height: 30px; font-size: .7rem; }
|
||||
.user-menu__name { font-weight: 600; font-size: .87rem; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.user-menu .chev { width: 14px; height: 14px; transform: rotate(-90deg); color: var(--muted); transition: transform .2s; }
|
||||
.user-menu[open] .chev { transform: rotate(90deg); }
|
||||
.user-menu__panel {
|
||||
position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
|
||||
width: 248px; padding: 8px; background: #fff;
|
||||
border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
|
||||
}
|
||||
.user-menu__who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; display: flex; flex-direction: column; }
|
||||
.user-menu__who strong { color: var(--ink); font-size: .9rem; }
|
||||
.user-menu__who span { font-size: .76rem; color: var(--muted); }
|
||||
.user-menu__panel a, .menu-button {
|
||||
display: flex; align-items: center; gap: 9px; width: 100%;
|
||||
padding: 9px 10px; border-radius: 8px; border: 0; background: none;
|
||||
color: var(--ink-2); font-size: .87rem; font-weight: 500; text-align: left; cursor: pointer;
|
||||
}
|
||||
.user-menu__panel a:hover, .menu-button:hover { background: var(--ice-50); color: var(--brand-700); }
|
||||
.user-menu__panel form { margin: 0; }
|
||||
.user-menu__panel .ico { width: 17px; height: 17px; color: var(--muted); }
|
||||
|
||||
/* --------------------------------------------------------------- Flashes */
|
||||
.flash-wrap { max-width: var(--page-max); margin: 0 auto; padding: 14px var(--gutter) 0; display: grid; gap: 8px; }
|
||||
.flash {
|
||||
display: flex; align-items: flex-start; gap: 10px;
|
||||
padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
|
||||
background: #fff; color: var(--ink-2); box-shadow: var(--shadow-sm); font-size: .9rem;
|
||||
}
|
||||
.flash .ico { width: 18px; height: 18px; margin-top: 1px; }
|
||||
.flash--success { border-color: #bfe3bf; background: var(--green-soft); color: #1f5a23; }
|
||||
.flash--error { border-color: #f0c4be; background: var(--red-soft); color: #7d241b; }
|
||||
.flash--info { border-color: var(--ice-200); background: var(--ice-50); color: var(--brand-800); }
|
||||
.flash__close { margin-left: auto; border: 0; background: none; color: inherit; opacity: .55; cursor: pointer; padding: 2px; }
|
||||
.flash__close:hover { opacity: 1; }
|
||||
.flash__close .ico { width: 16px; height: 16px; }
|
||||
|
||||
/* --------------------------------------------------------------- Layout */
|
||||
.page { max-width: var(--page-max); margin: 0 auto; padding: clamp(18px, 2.4vw, 30px) var(--gutter) 48px; }
|
||||
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
|
||||
.page-head--compact { margin-bottom: 18px; }
|
||||
.page-head h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
|
||||
.page-head__lede { margin-top: 6px; color: var(--muted); max-width: 62ch; }
|
||||
.page-head__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
|
||||
.page-head__actions form { margin: 0; }
|
||||
.eyebrow {
|
||||
font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
|
||||
color: var(--brand); margin-bottom: 7px;
|
||||
}
|
||||
.footer {
|
||||
max-width: var(--page-max); margin: 0 auto; padding: 20px var(--gutter) 30px;
|
||||
display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
|
||||
border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem;
|
||||
}
|
||||
.footer__hint { color: #8a9aa7; }
|
||||
|
||||
/* --------------------------------------------------------------- Buttons */
|
||||
.btn {
|
||||
display: inline-flex; align-items: center; justify-content: center; gap: 7px;
|
||||
min-height: 40px; padding: 9px 15px;
|
||||
border: 1px solid var(--line); border-radius: 10px;
|
||||
background: #fff; color: var(--ink-2); font-weight: 600; font-size: .87rem;
|
||||
cursor: pointer; text-decoration: none; white-space: nowrap;
|
||||
transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
|
||||
}
|
||||
.btn:hover { background: var(--ice-50); border-color: var(--ice-300); color: var(--brand-700); }
|
||||
.btn:active { transform: translateY(1px); }
|
||||
.btn .ico { width: 17px; height: 17px; }
|
||||
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 5px 14px rgba(25, 106, 188, .2); }
|
||||
.btn.primary:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
|
||||
.btn.small { min-height: 32px; padding: 5px 11px; font-size: .8rem; border-radius: 8px; }
|
||||
.btn.small .ico { width: 15px; height: 15px; }
|
||||
.btn--block { width: 100%; }
|
||||
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
|
||||
.btn.danger:hover { background: #9e2f25; border-color: #9e2f25; color: #fff; }
|
||||
.btn.danger-ghost { background: transparent; border-color: #e7b8b2; color: #9e2f25; }
|
||||
.btn.danger-ghost:hover { background: var(--red-soft); border-color: var(--red); color: #7d241b; }
|
||||
.btn:focus-visible, .icon-btn:focus-visible, a:focus-visible, summary:focus-visible {
|
||||
outline: 3px solid rgba(25, 106, 188, .3); outline-offset: 2px;
|
||||
}
|
||||
.icon-btn {
|
||||
width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line);
|
||||
background: #fff; display: inline-flex; align-items: center; justify-content: center;
|
||||
color: var(--ink-2); cursor: pointer;
|
||||
}
|
||||
.icon-btn:hover { background: var(--ice-50); color: var(--brand-700); border-color: var(--ice-300); }
|
||||
.icon-btn .ico { width: 18px; height: 18px; }
|
||||
.link-button {
|
||||
border: 0; background: none; padding: 0; color: var(--brand);
|
||||
font-weight: 600; font-size: .85rem; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
|
||||
}
|
||||
.link-button:hover { color: var(--brand-700); text-decoration: underline; }
|
||||
.link-button .ico { width: 15px; height: 15px; }
|
||||
.link-arrow { display: inline-flex; align-items: center; gap: 4px; font-size: .84rem; font-weight: 600; white-space: nowrap; }
|
||||
.link-arrow .ico { width: 15px; height: 15px; }
|
||||
|
||||
/* --------------------------------------------------------------- Bits */
|
||||
.pill {
|
||||
display: inline-flex; align-items: center; gap: 4px;
|
||||
padding: 2px 8px; border-radius: 99px;
|
||||
font-size: .7rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
|
||||
background: var(--ice-100); color: var(--brand-700);
|
||||
}
|
||||
.pill .ico { width: 12px; height: 12px; }
|
||||
.pill--green { background: var(--green-soft); color: #246328; }
|
||||
.pill--red { background: var(--red-soft); color: #9e2f25; }
|
||||
.pill--amber { background: var(--amber-soft); color: #8a5507; }
|
||||
.pill--blue { background: var(--ice-100); color: var(--brand-700); }
|
||||
.pill--grey { background: #eef2f5; color: #556a78; }
|
||||
.trailer-dot {
|
||||
width: 11px; height: 11px; border-radius: 3px; flex: 0 0 auto;
|
||||
background: var(--trailer, var(--brand));
|
||||
box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
|
||||
}
|
||||
.trailer-chip {
|
||||
display: inline-flex; align-items: center; gap: 7px;
|
||||
background: var(--trailer); color: var(--trailer-text);
|
||||
padding: 4px 10px; border-radius: 99px; font-weight: 600; font-size: .8rem;
|
||||
}
|
||||
.panel, .card {
|
||||
background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
.panel { padding: 20px; }
|
||||
.card { padding: 22px; }
|
||||
.panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
|
||||
.panel__head p, .card__head p { color: var(--muted); font-size: .84rem; margin-top: 4px; }
|
||||
.card__head { margin-bottom: 18px; }
|
||||
.card__head--row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
|
||||
.card h2 { margin-bottom: 0; }
|
||||
.empty-state {
|
||||
text-align: center; padding: 38px 20px; color: var(--muted);
|
||||
border: 1px dashed var(--ice-300); border-radius: var(--radius); background: var(--ice-50);
|
||||
}
|
||||
.empty-state .ico { width: 34px; height: 34px; color: var(--brand); margin: 0 auto 10px; }
|
||||
.empty-state h3 { color: var(--ink); margin-bottom: 5px; }
|
||||
.empty-state p { max-width: 50ch; margin: 0 auto 14px; font-size: .88rem; }
|
||||
.empty-state.small { padding: 20px 14px; }
|
||||
.empty-state.small .ico { width: 26px; height: 26px; }
|
||||
.empty-state.small h3 { font-size: .9rem; }
|
||||
.empty-state--plain { border: 0; background: transparent; padding: 60px 20px; }
|
||||
.alert {
|
||||
display: flex; align-items: flex-start; gap: 11px;
|
||||
padding: 13px 15px; border-radius: 12px; margin-bottom: 16px;
|
||||
border: 1px solid var(--ice-200); background: var(--ice-50); color: var(--brand-800);
|
||||
font-size: .88rem;
|
||||
}
|
||||
.alert .ico { width: 19px; height: 19px; margin-top: 1px; }
|
||||
.alert--warning { background: var(--amber-soft); border-color: #f2d6a4; color: #754805; }
|
||||
.alert--error { background: var(--red-soft); border-color: #f0c4be; color: #7d241b; }
|
||||
.alert p { margin-top: 3px; }
|
||||
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--muted); margin-bottom: 14px; }
|
||||
.breadcrumb a { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
|
||||
.breadcrumb .ico { width: 14px; height: 14px; }
|
||||
.stack { display: grid; gap: 14px; }
|
||||
.stack-actions { display: grid; gap: 8px; }
|
||||
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
|
||||
.card--note { background: linear-gradient(160deg, #fff, var(--ice-50)); }
|
||||
.card--note p { margin-top: 6px; color: var(--muted); font-size: .86rem; }
|
||||
.list-summary { font-size: .84rem; color: var(--muted); margin: -4px 0 16px; }
|
||||
|
||||
/* --------------------------------------------------------------- KPI + Dashboard */
|
||||
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
|
||||
.kpi {
|
||||
display: flex; align-items: center; gap: 12px;
|
||||
background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
|
||||
padding: 14px 16px; box-shadow: var(--shadow-sm);
|
||||
}
|
||||
.kpi__icon {
|
||||
width: 40px; height: 40px; border-radius: 11px; flex: 0 0 auto;
|
||||
display: inline-flex; align-items: center; justify-content: center;
|
||||
}
|
||||
.kpi__icon .ico { width: 20px; height: 20px; }
|
||||
.kpi__icon--blue { background: var(--ice-100); color: var(--brand); }
|
||||
.kpi__icon--green { background: var(--green-soft); color: var(--green); }
|
||||
.kpi__icon--amber { background: var(--amber-soft); color: var(--amber); }
|
||||
.kpi__icon--red { background: var(--red-soft); color: var(--red); }
|
||||
.kpi strong { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); line-height: 1.1; }
|
||||
.kpi span { font-size: .78rem; color: var(--muted); }
|
||||
|
||||
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, .85fr); gap: 18px; align-items: start; }
|
||||
.dash-main, .dash-side { display: grid; gap: 18px; min-width: 0; }
|
||||
.trailer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
|
||||
.trailer-card {
|
||||
border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 13px;
|
||||
background: #fff; position: relative; overflow: hidden;
|
||||
}
|
||||
.trailer-card::before {
|
||||
content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--trailer);
|
||||
}
|
||||
.trailer-card.is-rented { background: linear-gradient(180deg, #fff, #fbfdff); }
|
||||
.trailer-card.is-own { box-shadow: 0 0 0 2px rgba(25, 106, 188, .28); }
|
||||
.trailer-card__head { display: flex; align-items: center; gap: 8px; }
|
||||
.trailer-card__name { display: flex; flex-direction: column; line-height: 1.15; }
|
||||
.trailer-card__name strong { color: var(--ink); font-size: .9rem; }
|
||||
.trailer-card__name small { color: var(--muted); font-size: .7rem; }
|
||||
.trailer-card__head .pill { margin-left: auto; }
|
||||
.trailer-card__bookings { list-style: none; margin: 9px 0 0; padding: 0; display: grid; gap: 6px; }
|
||||
.trailer-card__bookings a { display: flex; flex-direction: column; padding: 6px 8px; border-radius: 8px; background: var(--ice-50); }
|
||||
.trailer-card__bookings a:hover { background: var(--ice-100); }
|
||||
.trailer-card__bookings strong { font-size: .82rem; color: var(--ink); }
|
||||
.trailer-card__bookings span { font-size: .72rem; color: var(--muted); }
|
||||
.trailer-card__free { font-size: .78rem; color: var(--muted); margin-top: 9px; }
|
||||
|
||||
.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
|
||||
.event-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
|
||||
.event-row:first-child { border-top: 0; }
|
||||
.event-row__icon {
|
||||
width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto;
|
||||
display: inline-flex; align-items: center; justify-content: center;
|
||||
}
|
||||
.event-row__icon.is-handover { background: var(--ice-100); color: var(--brand); }
|
||||
.event-row__icon.is-return { background: var(--amber-soft); color: var(--amber); }
|
||||
.event-row__date { width: 120px; flex: 0 0 auto; line-height: 1.2; }
|
||||
.event-row__date strong { display: block; font-size: .82rem; color: var(--ink); }
|
||||
.event-row__date span { font-size: .72rem; color: var(--muted); }
|
||||
.event-row__date .is-today { color: var(--brand); font-weight: 700; }
|
||||
.event-row__main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
|
||||
.event-row__main strong { font-size: .88rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.event-row__main span { font-size: .76rem; color: var(--muted); }
|
||||
|
||||
.panel--reminders .mini-reminders { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
|
||||
.mini-reminder { border: 1px solid var(--line-soft); background: var(--ice-50); border-radius: 11px; padding: 10px 11px; }
|
||||
.mini-reminder.is-overdue { border-color: #f0c4be; background: var(--red-soft); }
|
||||
.mini-reminder__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
|
||||
.mini-reminder__date { font-size: .74rem; font-weight: 700; color: var(--ink); }
|
||||
.mini-reminder > strong { font-size: .84rem; color: var(--ink); display: block; }
|
||||
.mini-reminder p { font-size: .77rem; color: var(--muted); margin-top: 2px; }
|
||||
.mini-reminder__meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; font-size: .72rem; color: var(--muted); }
|
||||
.mini-reminder__actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
|
||||
.mini-reminder__actions a { font-size: .76rem; font-weight: 600; }
|
||||
.mini-reminder__actions form { margin: 0; }
|
||||
.panel--quick { display: grid; gap: 4px; }
|
||||
.panel--quick h2 { margin-bottom: 8px; }
|
||||
.quick-link { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-top: 1px solid var(--line-soft); border-radius: 8px; }
|
||||
.quick-link:first-of-type { border-top: 0; }
|
||||
.quick-link:hover { background: var(--ice-50); }
|
||||
.quick-link__icon { width: 34px; height: 34px; border-radius: 9px; background: var(--ice-100); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
|
||||
.quick-link__icon .ico { width: 17px; height: 17px; }
|
||||
.quick-link > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
|
||||
.quick-link strong { font-size: .84rem; color: var(--ink); }
|
||||
.quick-link small { font-size: .72rem; color: var(--muted); }
|
||||
.quick-link .chev { margin-left: auto; width: 15px; height: 15px; color: var(--muted); }
|
||||
|
||||
/* --------------------------------------------------------------- Calendar */
|
||||
.cal-toolbar {
|
||||
display: flex; align-items: center; justify-content: space-between; gap: 10px;
|
||||
flex-wrap: wrap; padding: 9px 10px; margin-bottom: 12px;
|
||||
background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm);
|
||||
}
|
||||
.cal-toolbar__left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
|
||||
.segmented { display: inline-flex; padding: 3px; background: var(--ice-50); border: 1px solid var(--line-soft); border-radius: 10px; gap: 2px; }
|
||||
.segmented a {
|
||||
padding: 6px 13px; border-radius: 8px; font-size: .82rem; font-weight: 600; color: var(--ink-2);
|
||||
}
|
||||
.segmented a:hover { color: var(--brand-700); }
|
||||
.segmented a.is-active { background: #fff; color: var(--brand-700); box-shadow: 0 1px 3px rgba(10, 44, 78, .12); }
|
||||
.cal-nav { display: flex; align-items: center; gap: 5px; }
|
||||
.date-jump { display: flex; align-items: center; gap: 5px; margin-left: 3px; }
|
||||
.date-jump input[type="date"] {
|
||||
height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: .8rem;
|
||||
}
|
||||
.cal-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }
|
||||
.inline-field { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
|
||||
.inline-field select {
|
||||
height: 32px; padding: 0 26px 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: .8rem; color: var(--ink-2);
|
||||
}
|
||||
.cal-filters__submit { display: inline-flex; }
|
||||
.check { display: inline-flex; align-items: flex-start; gap: 8px; font-size: .86rem; color: var(--ink-2); cursor: pointer; }
|
||||
.check input,
|
||||
.check input[type="checkbox"],
|
||||
.check input[type="radio"],
|
||||
.field .check input {
|
||||
width: 16px; height: 16px; min-width: 16px; min-height: 16px;
|
||||
margin: 2px 0 0; padding: 0; flex: 0 0 auto;
|
||||
accent-color: var(--brand); box-shadow: none; border-radius: 3px;
|
||||
}
|
||||
.check--small { font-size: .78rem; }
|
||||
.check--boxed { display: flex; align-items: flex-start; width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--ice-50); }
|
||||
.check--boxed .check span { font-weight: 500; }
|
||||
|
||||
.cal-scroll-hint {
|
||||
display: none; align-items: center; gap: 6px; margin: -2px 0 10px;
|
||||
color: var(--muted); font-size: .76rem;
|
||||
}
|
||||
.cal-scroll-hint .ico { width: 14px; height: 14px; }
|
||||
|
||||
.cal-shell { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
|
||||
.cal-scroll { overflow-x: auto; overflow-y: hidden; }
|
||||
.cal { --lane: 150px; display: grid; grid-template-columns: var(--lane) minmax(0, 1fr); }
|
||||
.cal-corner {
|
||||
position: sticky; left: 0; z-index: 6; background: #fff;
|
||||
border-bottom: 1px solid var(--line); padding: 10px 12px;
|
||||
display: flex; flex-direction: column; justify-content: center;
|
||||
}
|
||||
.cal-corner__title { font-family: var(--font-display); font-weight: 800; font-size: .86rem; color: var(--ink); }
|
||||
.cal-corner__hint { font-size: .67rem; color: var(--muted); margin-top: 1px; }
|
||||
.cal-head {
|
||||
display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
|
||||
border-bottom: 1px solid var(--line); background: #fff;
|
||||
}
|
||||
.cal-head__day {
|
||||
padding: 8px 4px 7px; text-align: center; border-left: 1px solid var(--line-soft);
|
||||
display: flex; flex-direction: column; align-items: center; line-height: 1.1; min-width: 0;
|
||||
}
|
||||
.cal-head__weekday { font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
|
||||
.cal-head__num { font-family: var(--font-display); font-size: 1rem; font-weight: 800; color: var(--ink); margin-top: 2px; }
|
||||
.cal-head__month { font-size: .6rem; color: var(--muted); margin-top: 1px; white-space: nowrap; }
|
||||
.cal-head__day.is-weekend { background: #fbfdff; }
|
||||
.cal-head__day.is-today { background: var(--ice-100); }
|
||||
.cal-head__day.is-today .cal-head__num, .cal-head__day.is-today .cal-head__weekday { color: var(--brand-700); }
|
||||
|
||||
.cal-label {
|
||||
position: sticky; left: 0; z-index: 5; background: #fff;
|
||||
height: var(--row-h); border-top: 1px solid var(--line);
|
||||
display: flex; align-items: center; gap: 9px; padding: 0 12px;
|
||||
}
|
||||
.cal-label__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
|
||||
.cal-label__text strong { font-size: .85rem; color: var(--ink); }
|
||||
.cal-label__text small { font-size: .68rem; color: var(--muted); }
|
||||
.cal-label__add {
|
||||
margin-left: auto; width: 23px; height: 23px; border-radius: 6px;
|
||||
display: inline-flex; align-items: center; justify-content: center;
|
||||
color: var(--brand); font-size: 1rem; font-weight: 700; line-height: 1;
|
||||
opacity: 0; transition: opacity .15s, background .15s;
|
||||
}
|
||||
.cal-label:hover .cal-label__add { opacity: 1; }
|
||||
.cal-label__add:hover { background: var(--ice-100); }
|
||||
.cal-track { position: relative; height: var(--row-h); border-top: 1px solid var(--line); min-width: 0; }
|
||||
.cal-cells { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
|
||||
.cal-cell { border-left: 1px solid var(--line-soft); background: #fff; transition: background .12s; }
|
||||
.cal-cell:hover { background: #f2f8ff; }
|
||||
.cal-cell.is-weekend { background: #fbfdff; }
|
||||
.cal-cell.is-weekend:hover { background: #f1f8ff; }
|
||||
.cal-cell.is-today { background: rgba(230, 241, 252, .5); }
|
||||
.cal-cell.is-today:hover { background: rgba(211, 230, 249, .7); }
|
||||
.cal-track.is-drop-target { background: rgba(25, 106, 188, .06); }
|
||||
|
||||
.cal-bar {
|
||||
position: absolute; z-index: 2; display: flex; flex-direction: column; justify-content: center;
|
||||
left: calc(var(--left) + 2px); width: calc(var(--width) - 4px);
|
||||
top: calc(var(--top) + 3px); height: calc(var(--height) - 6px);
|
||||
background: var(--bar); color: var(--bar-text);
|
||||
border-radius: 7px; padding: 3px 8px; min-width: 3px; overflow: hidden;
|
||||
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), 0 1px 2px rgba(10, 44, 78, .12);
|
||||
transition: filter .12s, box-shadow .12s, transform .12s;
|
||||
touch-action: pan-y;
|
||||
user-select: none;
|
||||
-webkit-user-drag: none;
|
||||
}
|
||||
.cal-bar:hover { filter: brightness(1.05); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), 0 4px 10px rgba(10, 44, 78, .18); color: var(--bar-text); z-index: 3; }
|
||||
.cal-bar.is-cut-start { border-top-left-radius: 2px; border-bottom-left-radius: 2px; }
|
||||
.cal-bar.is-cut-end { border-top-right-radius: 2px; border-bottom-right-radius: 2px; }
|
||||
.cal-bar.is-tiny { padding: 2px 5px; }
|
||||
.cal-bar.is-tiny .cal-bar__name { font-size: .68rem; }
|
||||
.cal-bar.is-cancelled {
|
||||
opacity: .58;
|
||||
background:
|
||||
repeating-linear-gradient(135deg, rgba(255, 255, 255, .22) 0 5px, rgba(255, 255, 255, 0) 5px 10px),
|
||||
var(--bar);
|
||||
}
|
||||
.cal-bar.is-cancelled .cal-bar__name { text-decoration: line-through; }
|
||||
.cal-bar.is-dragging { z-index: 50; opacity: .88; filter: brightness(1.06); cursor: grabbing; box-shadow: 0 10px 20px rgba(10, 44, 78, .3); transition: none; }
|
||||
.cal-bar__name { font-size: .76rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
|
||||
.cal-bar__meta { font-size: .63rem; font-weight: 500; opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
|
||||
.cal-bar__meta--soft { opacity: .72; }
|
||||
.cal-bar__flag { font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .9; }
|
||||
.cal-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 4px 0; color: var(--muted); font-size: .76rem; }
|
||||
.cal-foot p { display: flex; align-items: center; gap: 7px; max-width: 90ch; }
|
||||
.cal-foot__hint { font-style: italic; }
|
||||
.legend-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--brand); flex: 0 0 auto; }
|
||||
|
||||
/* --------------------------------------------------------------- Forms */
|
||||
.booking-form { margin: 0; }
|
||||
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
|
||||
.form-main { display: grid; gap: 16px; min-width: 0; }
|
||||
.form-side { display: grid; gap: 16px; position: sticky; top: calc(var(--topbar-h) + 16px); }
|
||||
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
|
||||
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
|
||||
.field--wide { grid-column: 1 / -1; }
|
||||
.field > span, .field > label > span { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
|
||||
.field input, .field select, .field textarea {
|
||||
width: 100%; height: 42px; padding: 0 11px;
|
||||
border: 1px solid var(--line); border-radius: 9px; background: #fff;
|
||||
font-size: .9rem; outline: none; color: var(--ink);
|
||||
transition: border-color .15s, box-shadow .15s;
|
||||
}
|
||||
.field textarea { height: auto; min-height: 90px; padding: 10px 11px; resize: vertical; }
|
||||
.field input:focus, .field select:focus, .field textarea:focus {
|
||||
border-color: var(--brand); box-shadow: 0 0 0 3px rgba(25, 106, 188, .12);
|
||||
}
|
||||
.field input::placeholder { color: #98a8b4; }
|
||||
.field.has-error input, .field.has-error select { border-color: #d26a5f; background: #fffafa; }
|
||||
.field-error { font-size: .75rem; color: #a43227; font-style: normal; }
|
||||
.field--trailer-preview { justify-content: flex-start; }
|
||||
.trailer-preview { display: inline-flex; align-items: center; gap: 7px; width: fit-content; padding: 9px 11px; border-radius: 9px; background: var(--ice-50); border: 1px solid var(--line-soft); font-size: .82rem; }
|
||||
.money-input { position: relative; display: flex; align-items: center; }
|
||||
.money-input input { padding-right: 30px; }
|
||||
.money-input > span { position: absolute; right: 11px; color: var(--muted); font-size: .84rem; pointer-events: none; }
|
||||
.due-output {
|
||||
height: 42px; display: flex; align-items: center; padding: 0 11px;
|
||||
background: var(--ice-50); border: 1px solid var(--ice-200); border-radius: 9px;
|
||||
font-family: var(--font-display); font-weight: 800; color: var(--brand-700); font-size: 1.05rem;
|
||||
}
|
||||
.segmented-radio { display: inline-flex; padding: 3px; background: var(--ice-50); border: 1px solid var(--line-soft); border-radius: 10px; gap: 2px; width: fit-content; }
|
||||
.segmented-radio label { position: relative; cursor: pointer; }
|
||||
.segmented-radio input { position: absolute; opacity: 0; pointer-events: none; }
|
||||
.segmented-radio span { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; padding: 7px 13px; border-radius: 8px; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
|
||||
.segmented-radio input:checked + span { background: #fff; color: var(--brand-700); box-shadow: 0 1px 3px rgba(10, 44, 78, .14); }
|
||||
.segmented-radio input:focus-visible + span { outline: 3px solid rgba(25, 106, 188, .25); }
|
||||
.conflict-hint { display: flex; gap: 8px; padding: 10px 12px; border-radius: 9px; background: var(--red-soft); border: 1px solid #f0c4be; color: #7d241b; font-size: .82rem; }
|
||||
.conflict-hint.is-ok { background: var(--green-soft); border-color: #bfe3bf; color: #1f5a23; }
|
||||
.conflict-hint[hidden] { display: none; }
|
||||
.form-actions { display: grid; gap: 8px; margin-top: 16px; }
|
||||
.card--summary { background: linear-gradient(180deg, #fff, #fbfdff); }
|
||||
.summary-list, .meta-list, .money-list { margin: 0; display: grid; gap: 0; }
|
||||
.summary-list > div, .meta-list > div, .money-list > div {
|
||||
display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
|
||||
padding: 8px 0; border-bottom: 1px solid var(--line-soft);
|
||||
}
|
||||
.summary-list > div:last-child, .meta-list > div:last-child, .money-list > div:last-child { border-bottom: 0; }
|
||||
.summary-list dt, .meta-list dt, .money-list dt { font-size: .78rem; color: var(--muted); }
|
||||
.summary-list dd, .meta-list dd, .money-list dd { margin: 0; font-size: .84rem; font-weight: 600; color: var(--ink); text-align: right; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
|
||||
.summary-list .is-strong dd, .money-list .is-strong dd { color: var(--brand-700); font-family: var(--font-display); font-size: 1rem; font-weight: 800; }
|
||||
.card--danger { margin-top: 16px; border-color: #efc9c4; background: #fffdfd; }
|
||||
.danger-actions { display: flex; gap: 10px; flex-wrap: wrap; }
|
||||
.danger-actions form { margin: 0; }
|
||||
|
||||
/* --------------------------------------------------------------- Detail */
|
||||
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 16px; align-items: start; }
|
||||
.detail-main, .detail-side { display: grid; gap: 16px; min-width: 0; }
|
||||
.detail-side { position: sticky; top: calc(var(--topbar-h) + 16px); }
|
||||
.detail-meta { margin: 0; }
|
||||
.card--copy { overflow: hidden; }
|
||||
.copy-source { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
|
||||
.copy-list { margin: 0; display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line-soft); }
|
||||
.copy-list__row { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 14px; padding: 9px 2px; border-bottom: 1px solid var(--line-soft); }
|
||||
.copy-list__row:last-child { border-bottom: 0; }
|
||||
.copy-list dt { margin: 0; font-size: .78rem; font-weight: 600; color: var(--muted); }
|
||||
.copy-list dd { margin: 0; font-size: .9rem; color: var(--ink); word-break: break-word; }
|
||||
.copy-list__row.is-strong dd { color: var(--brand-700); font-weight: 800; font-family: var(--font-display); }
|
||||
.copy-list--compact .copy-list__row { padding: 6px 0; grid-template-columns: 130px 1fr; }
|
||||
.copy-list--compact dd { font-size: .84rem; }
|
||||
.copy-hint { display: flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--muted); font-size: .76rem; }
|
||||
.copy-hint .ico { width: 14px; height: 14px; color: var(--green); }
|
||||
|
||||
.reminder-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
|
||||
.reminder-row {
|
||||
display: flex; align-items: flex-start; gap: 14px;
|
||||
padding: 12px; border: 1px solid var(--line-soft); border-radius: 11px; background: #fff;
|
||||
}
|
||||
.reminder-row.is-overdue { border-color: #f0c4be; background: #fffafa; }
|
||||
.reminder-row.is-done { opacity: .62; background: var(--ice-50); }
|
||||
.reminder-row__date { width: 90px; flex: 0 0 auto; display: flex; flex-direction: column; line-height: 1.2; }
|
||||
.reminder-row__date strong { font-size: .82rem; color: var(--ink); }
|
||||
.reminder-row__date span { font-size: .7rem; color: var(--muted); }
|
||||
.reminder-row.is-overdue .reminder-row__date span { color: #a43227; font-weight: 700; }
|
||||
.reminder-row__body { flex: 1; min-width: 0; }
|
||||
.reminder-row__body strong { font-size: .86rem; color: var(--ink); }
|
||||
.reminder-row__body p { font-size: .8rem; color: var(--muted); margin-top: 2px; }
|
||||
.reminder-row__action { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
|
||||
.reminder-row__action form { margin: 0; }
|
||||
|
||||
/* --------------------------------------------------------------- Panel dialog */
|
||||
.booking-dialog {
|
||||
width: min(720px, calc(100vw - 28px)); max-height: min(90vh, 900px);
|
||||
padding: 0; border: 0; border-radius: var(--radius-xl);
|
||||
background: #fff; box-shadow: var(--shadow-lg); color: var(--ink-2);
|
||||
}
|
||||
.booking-dialog::backdrop { background: rgba(6, 26, 46, .42); backdrop-filter: blur(3px); }
|
||||
.booking-dialog__inner { max-height: min(90vh, 900px); overflow-y: auto; }
|
||||
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line-soft); background: linear-gradient(180deg, var(--ice-50), #fff); }
|
||||
.panel-head__main { min-width: 0; }
|
||||
.panel-head__trailer { display: flex; align-items: center; gap: 7px; font-size: .76rem; font-weight: 700; color: var(--muted); }
|
||||
.panel-head h2 { font-size: 1.35rem; margin: 4px 0 3px; }
|
||||
.panel-head p { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
|
||||
.panel-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(220px, .9fr); gap: 18px; padding: 18px 22px; }
|
||||
.panel-copy__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
|
||||
.panel-copy h3 { font-size: .92rem; }
|
||||
.panel-meta .next-reminder { margin-top: 12px; padding: 10px 11px; border-radius: 10px; background: var(--ice-50); border: 1px solid var(--ice-200); }
|
||||
.panel-meta .next-reminder.is-overdue { background: var(--red-soft); border-color: #f0c4be; }
|
||||
.next-reminder > span { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
|
||||
.next-reminder strong { display: block; font-size: .82rem; color: var(--ink); margin-top: 2px; }
|
||||
.next-reminder p { font-size: .76rem; color: var(--muted); }
|
||||
.panel-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--line-soft); background: var(--ice-50); }
|
||||
.panel-actions form { margin: 0; }
|
||||
|
||||
/* --------------------------------------------------------------- Search */
|
||||
.search-hero {
|
||||
display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px;
|
||||
background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm);
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
.search-hero > .ico { width: 21px; height: 21px; color: var(--muted); }
|
||||
.search-hero input { flex: 1; border: 0; outline: none; height: 42px; font-size: 1rem; background: transparent; min-width: 0; }
|
||||
.result-list { list-style: none; margin: 0; padding: 0; }
|
||||
.result-row { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-top: 1px solid var(--line-soft); }
|
||||
.result-row:first-child { border-top: 0; }
|
||||
.result-row.is-cancelled { opacity: .62; }
|
||||
.result-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
|
||||
.result-row__main strong { font-size: .9rem; color: var(--ink); }
|
||||
.result-row__main span { font-size: .76rem; color: var(--muted); }
|
||||
.result-row__meta { display: flex; align-items: center; gap: 8px; font-size: .76rem; color: var(--muted); }
|
||||
|
||||
/* --------------------------------------------------------------- Reminders */
|
||||
.reminder-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
|
||||
.reminder-day { margin-bottom: 20px; }
|
||||
.reminder-day__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; padding: 0 2px; }
|
||||
.reminder-day__head h2 { font-size: .98rem; }
|
||||
.reminder-day.is-past .reminder-day__head h2 { color: #7d241b; }
|
||||
.reminder-day__count { margin-left: auto; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; background: var(--ice-100); color: var(--brand-700); font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
|
||||
.reminder-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
|
||||
.reminder-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px 15px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
|
||||
.reminder-card.is-overdue { border-color: #efc0ba; background: linear-gradient(180deg, #fff, #fffafa); }
|
||||
.reminder-card.is-done { opacity: .62; background: var(--ice-50); }
|
||||
.reminder-card__main { flex: 1; min-width: 0; }
|
||||
.reminder-card__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
|
||||
.reminder-card__employee { font-size: .75rem; color: var(--muted); margin-left: auto; }
|
||||
.reminder-card__message { font-size: .88rem; color: var(--ink-2); }
|
||||
.reminder-card__booking { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 7px; font-size: .76rem; color: var(--muted); }
|
||||
.reminder-card__booking strong { color: var(--ink); font-size: .8rem; }
|
||||
.reminder-card__actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
|
||||
.reminder-card__actions form { margin: 0; }
|
||||
.reminder-note { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--ice-50); border: 1px solid var(--ice-200); color: var(--brand-800); font-size: .82rem; max-width: 900px; }
|
||||
|
||||
/* --------------------------------------------------------------- Admin */
|
||||
.admin-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
|
||||
.admin-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; font-size: .84rem; font-weight: 600; color: var(--ink-2); }
|
||||
.admin-nav a:hover { background: var(--ice-50); color: var(--brand-700); }
|
||||
.admin-nav a.is-active { background: var(--ice-100); color: var(--brand-700); }
|
||||
.admin-nav .ico { width: 16px; height: 16px; }
|
||||
.table-wrap { overflow-x: auto; }
|
||||
.data-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
|
||||
.data-table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
|
||||
.data-table td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
|
||||
.data-table tr:last-child td { border-bottom: 0; }
|
||||
.data-table tr:hover td { background: #fbfdff; }
|
||||
.table-person { display: inline-flex; align-items: center; gap: 9px; }
|
||||
.table-person > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
|
||||
.table-person strong { color: var(--ink); font-size: .85rem; }
|
||||
.table-person small { color: var(--muted); font-size: .72rem; }
|
||||
.admin-split { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; align-items: start; }
|
||||
.trailer-admin { display: grid; gap: 0; border-top: 1px solid var(--line-soft); }
|
||||
.trailer-admin__head, .trailer-admin__row {
|
||||
display: grid; grid-template-columns: 150px minmax(110px, 1fr) minmax(100px, .8fr) 90px 170px;
|
||||
gap: 10px; align-items: center;
|
||||
}
|
||||
.trailer-admin__head { padding: 8px 2px; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
|
||||
.trailer-admin__row { padding: 9px 2px; border-top: 1px solid var(--line-soft); position: relative; }
|
||||
.trailer-admin__row.has-error { background: #fffafa; }
|
||||
.trailer-admin__row input[type="text"], .trailer-admin__row input[type="number"] {
|
||||
height: 38px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%; font-size: .84rem;
|
||||
}
|
||||
.trailer-admin__row input[type="number"] { width: 78px; }
|
||||
.trailer-admin__color { display: flex; align-items: center; gap: 7px; }
|
||||
.trailer-admin__color input[type="color"] { width: 38px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
|
||||
.trailer-admin__color .color-hex { width: 82px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; }
|
||||
.trailer-admin__preview { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; border-radius: 8px; background: var(--trailer); color: var(--trailer-text); font-size: .76rem; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
||||
.trailer-admin__row .field-error { grid-column: 1 / -1; }
|
||||
|
||||
/* --------------------------------------------------------------- Account */
|
||||
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
|
||||
|
||||
/* --------------------------------------------------------------- Auth */
|
||||
.auth-page { background: var(--white); margin: 0; }
|
||||
.auth-shell { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }
|
||||
.auth-visual { position: relative; overflow: hidden; background: var(--brand-900); }
|
||||
.auth-visual__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
|
||||
.auth-visual__shade {
|
||||
position: absolute; inset: 0;
|
||||
background: linear-gradient(150deg, rgba(6, 26, 46, .88) 0%, rgba(10, 44, 78, .74) 48%, rgba(25, 106, 188, .42) 100%);
|
||||
}
|
||||
.auth-visual__content { position: relative; z-index: 1; min-height: 100%; display: flex; flex-direction: column; padding: clamp(26px, 4vw, 54px); color: #fff; }
|
||||
.auth-brand { display: flex; align-items: center; gap: 11px; }
|
||||
.auth-brand span { display: flex; flex-direction: column; line-height: 1.05; }
|
||||
.auth-brand strong { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; }
|
||||
.auth-brand small { font-size: .68rem; letter-spacing: .13em; text-transform: uppercase; opacity: .72; margin-top: 4px; }
|
||||
.auth-visual__claim { margin: auto 0; max-width: 560px; padding: 30px 0; }
|
||||
.auth-visual__claim .eyebrow { color: #9ed2ff; }
|
||||
.auth-visual__claim h2 { color: #fff; font-size: clamp(2.1rem, 4.3vw, 3.8rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; margin-bottom: 16px; }
|
||||
.auth-visual__claim > p { color: #d6e8f9; font-size: clamp(.92rem, 1.1vw, 1.02rem); max-width: 44ch; }
|
||||
.auth-points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 9px; font-size: .88rem; color: #e8f3fd; }
|
||||
.auth-points li { display: flex; align-items: center; gap: 8px; }
|
||||
.auth-points .ico { width: 16px; height: 16px; color: #9ed2ff; }
|
||||
.auth-visual__foot { color: rgba(255, 255, 255, .54); font-size: .75rem; letter-spacing: .02em; }
|
||||
.auth-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: clamp(22px, 4vw, 56px); background: linear-gradient(160deg, #fff 20%, var(--ice-50)); }
|
||||
.auth-card { width: min(420px, 100%); }
|
||||
.auth-card__mobilebrand { display: none; align-items: center; gap: 9px; margin-bottom: 26px; color: var(--ink); font-family: var(--font-display); font-weight: 800; }
|
||||
.auth-card h1 { font-size: 2rem; margin-bottom: 8px; }
|
||||
.auth-card__lede { color: var(--muted); font-size: .9rem; margin-bottom: 22px; }
|
||||
.auth-form { display: grid; gap: 14px; }
|
||||
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
|
||||
.auth-form .field input { height: 46px; background: #fff; }
|
||||
.auth-form .btn { min-height: 46px; margin-top: 2px; }
|
||||
.auth-card__hint { display: flex; gap: 9px; align-items: flex-start; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; line-height: 1.5; }
|
||||
.auth-card__hint .ico { width: 17px; height: 17px; color: var(--brand); margin-top: 1px; }
|
||||
.auth-foot { position: absolute; bottom: 22px; color: #8a9aa7; font-size: .72rem; }
|
||||
.auth-panel { position: relative; }
|
||||
.auth-panel .flash { margin-bottom: 16px; }
|
||||
|
||||
/* --------------------------------------------------------------- Toast */
|
||||
.toast {
|
||||
position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
|
||||
z-index: 100; max-width: min(460px, calc(100vw - 32px));
|
||||
padding: 11px 16px; border-radius: 11px;
|
||||
background: var(--brand-900); color: #fff; font-size: .86rem;
|
||||
box-shadow: var(--shadow-lg);
|
||||
}
|
||||
.toast.is-error { background: #7d241b; }
|
||||
|
||||
/* --------------------------------------------------------------- Error page */
|
||||
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
|
||||
.error-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow); padding: 38px; max-width: 460px; text-align: center; }
|
||||
.error-card img { margin: 0 auto 14px; }
|
||||
.error-card h1 { margin-bottom: 8px; }
|
||||
.error-card p { color: var(--muted); margin-bottom: 18px; }
|
||||
|
||||
/* --------------------------------------------------------------- Responsive */
|
||||
@media (max-width: 1240px) {
|
||||
.dash-grid { grid-template-columns: 1fr; }
|
||||
.dash-side { grid-template-columns: 1fr 1fr; align-items: start; }
|
||||
.form-layout { grid-template-columns: 1fr; }
|
||||
.form-side { position: static; }
|
||||
.detail-grid { grid-template-columns: 1fr; }
|
||||
.detail-side { position: static; grid-template-columns: 1fr 1fr; align-items: start; }
|
||||
.detail-side > .detail-meta { grid-column: 1 / -1; }
|
||||
.admin-split { grid-template-columns: 1fr; }
|
||||
}
|
||||
@media (max-width: 1080px) {
|
||||
.global-search input { width: 150px; }
|
||||
.mainnav a span { font-size: .82rem; }
|
||||
.kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
||||
.account-grid { grid-template-columns: 1fr; }
|
||||
}
|
||||
@media (max-width: 960px) {
|
||||
.topbar__inner { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; gap: 8px 16px; }
|
||||
.brand { order: 1; }
|
||||
.topbar__tools { order: 2; margin-left: auto; }
|
||||
.mainnav { order: 3; flex-basis: 100%; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; gap: 0; }
|
||||
.mainnav::-webkit-scrollbar { display: none; }
|
||||
.mainnav a { padding: 9px 10px; gap: 6px; }
|
||||
.nav-long { display: none; }
|
||||
.nav-short { display: inline; }
|
||||
.global-search { display: none; }
|
||||
.dash-side { grid-template-columns: 1fr; }
|
||||
.detail-side { grid-template-columns: 1fr; }
|
||||
.info-grid { grid-template-columns: 1fr; }
|
||||
.auth-shell { grid-template-columns: 1fr; }
|
||||
.auth-visual { display: none; }
|
||||
.auth-card__mobilebrand { display: inline-flex; }
|
||||
.auth-panel { min-height: 100vh; }
|
||||
.auth-foot { position: static; margin-top: 28px; }
|
||||
}
|
||||
@media (max-width: 760px) {
|
||||
.cal { --lane: 112px; }
|
||||
.cal-label { padding: 0 9px; gap: 7px; }
|
||||
.cal-label__text strong { font-size: .8rem; }
|
||||
.cal-label__text small { font-size: .64rem; }
|
||||
.cal-label__add { display: none; }
|
||||
.cal-head__weekday { font-size: .6rem; }
|
||||
.cal-head__num { font-size: .92rem; }
|
||||
.trailer-grid { grid-template-columns: 1fr; }
|
||||
.event-row__date { width: 98px; }
|
||||
.event-row .btn { display: none; }
|
||||
.form-grid { grid-template-columns: 1fr; }
|
||||
.field--wide { grid-column: auto; }
|
||||
.panel, .card { padding: 16px; }
|
||||
.page { padding-bottom: 70px; }
|
||||
.reminder-card { flex-direction: column; }
|
||||
.reminder-card__actions { width: 100%; justify-content: flex-end; }
|
||||
.reminder-card__employee { margin-left: 0; }
|
||||
.copy-list__row { grid-template-columns: 120px 1fr; }
|
||||
.panel-body { grid-template-columns: 1fr; }
|
||||
.booking-dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: 20px 20px 0 0; }
|
||||
.booking-dialog__inner { max-height: 88vh; }
|
||||
.trailer-admin__head { display: none; }
|
||||
.trailer-admin__row { grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px 0; }
|
||||
.trailer-admin__row .trailer-admin__color { grid-column: 1 / -1; }
|
||||
.trailer-admin__row .trailer-admin__preview { grid-column: 1 / -1; }
|
||||
.trailer-admin__row input[type="number"] { width: 100%; }
|
||||
.admin-nav { overflow-x: auto; flex-wrap: nowrap; }
|
||||
.admin-nav a { flex: 0 0 auto; }
|
||||
.panel-head { padding: 16px 16px 12px; }
|
||||
.panel-head h2 { font-size: 1.15rem; }
|
||||
.panel-body { padding: 14px 16px; }
|
||||
.panel-actions { padding: 12px 16px; }
|
||||
.reminder-toolbar { align-items: flex-start; flex-direction: column; }
|
||||
.cal-toolbar { align-items: flex-start; }
|
||||
.cal-toolbar__left { width: 100%; justify-content: space-between; }
|
||||
.cal-filters { width: 100%; justify-content: flex-end; }
|
||||
.cal-scroll-hint { display: inline-flex; }
|
||||
.date-jump input[type="date"] { width: 124px; }
|
||||
.reminder-row { flex-wrap: wrap; }
|
||||
.reminder-row__action { margin-left: auto; }
|
||||
}
|
||||
@media (max-width: 520px) {
|
||||
.mainnav a { padding: 8px 5px; gap: 4px; font-size: .75rem; }
|
||||
.mainnav .ico { width: 16px; height: 16px; }
|
||||
.nav-badge { min-width: 17px; height: 17px; font-size: .64rem; padding: 0 5px; }
|
||||
.brand__sub { display: none; }
|
||||
.user-menu__name { display: none; }
|
||||
.user-menu summary { padding: 3px; }
|
||||
.page-head__actions { width: 100%; }
|
||||
.page-head__actions .btn { flex: 1; }
|
||||
.page-head__actions form { flex: 1; }
|
||||
.page-head__actions form .btn { width: 100%; }
|
||||
.kpi { padding: 11px 12px; }
|
||||
.kpi strong { font-size: 1.1rem; }
|
||||
.kpi span { font-size: .72rem; }
|
||||
.segmented a { padding: 6px 9px; font-size: .78rem; }
|
||||
.cal-toolbar { padding: 7px; }
|
||||
.date-jump .btn { display: none; }
|
||||
.auth-panel { padding: 20px; }
|
||||
.auth-card h1 { font-size: 1.7rem; }
|
||||
.field-row { grid-template-columns: 1fr; }
|
||||
.result-row__meta { display: none; }
|
||||
.copy-list__row { grid-template-columns: 110px 1fr; gap: 8px; }
|
||||
.footer { flex-direction: column; }
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------- Motion + Print */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
|
||||
}
|
||||
@media print {
|
||||
.topbar, .footer, .flash-wrap, .page-head__actions, .cal-toolbar, .cal-foot,
|
||||
.panel-actions, .breadcrumb, .detail-side .card:last-child, .toast, .booking-dialog { display: none !important; }
|
||||
body { background: #fff; }
|
||||
.page { padding: 0; max-width: none; }
|
||||
.card, .panel { box-shadow: none; border-color: #ccc; }
|
||||
.detail-grid { display: block; }
|
||||
.detail-main { display: block; }
|
||||
.card { margin-bottom: 12px; }
|
||||
}
|
||||
485
web/assets/app.js
Normal file
|
|
@ -0,0 +1,485 @@
|
|||
/* Drink it cold – Terminplanung: Interaktionen ohne Framework. */
|
||||
(() => {
|
||||
'use strict';
|
||||
|
||||
const csrf = document.querySelector('meta[name="csrf-token"]')?.content || '';
|
||||
let toastTimer = 0;
|
||||
|
||||
const toast = (message, isError = false) => {
|
||||
const el = document.getElementById('toast');
|
||||
if (!el) return;
|
||||
el.textContent = message;
|
||||
el.hidden = false;
|
||||
el.classList.toggle('is-error', isError);
|
||||
window.clearTimeout(toastTimer);
|
||||
toastTimer = window.setTimeout(() => { el.hidden = true; }, isError ? 5200 : 3200);
|
||||
};
|
||||
|
||||
try {
|
||||
const storedToast = window.sessionStorage.getItem('dic-toast');
|
||||
if (storedToast) {
|
||||
window.sessionStorage.removeItem('dic-toast');
|
||||
toast(storedToast);
|
||||
}
|
||||
} catch (error) { /* sessionStorage kann blockiert sein */ }
|
||||
|
||||
/* ------------------------------------------------------------- Meldungen */
|
||||
document.addEventListener('click', (event) => {
|
||||
const dismiss = event.target.closest('[data-dismiss]');
|
||||
if (dismiss) {
|
||||
dismiss.closest('.flash')?.remove();
|
||||
}
|
||||
});
|
||||
|
||||
/* --------------------------------------------------------------- Toasts */
|
||||
const flash = document.querySelector('.flash--success');
|
||||
if (flash) {
|
||||
// Server-Flash bleibt sichtbar; kein zusätzlicher Toast nötig.
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------- Formulare */
|
||||
document.addEventListener('change', (event) => {
|
||||
const control = event.target.closest('[data-autosubmit]');
|
||||
if (control) {
|
||||
const form = control.form;
|
||||
if (form) form.submit();
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('submit', (event) => {
|
||||
const form = event.target;
|
||||
if (!(form instanceof HTMLFormElement)) return;
|
||||
const message = form.dataset.confirm;
|
||||
if (message && !window.confirm(message)) {
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
const submitter = event.submitter;
|
||||
if (submitter && !submitter.disabled) {
|
||||
window.setTimeout(() => { submitter.disabled = true; }, 30);
|
||||
}
|
||||
});
|
||||
|
||||
/* ------------------------------------------------------------- Kopieren */
|
||||
const copyToClipboard = async (text) => {
|
||||
if (navigator.clipboard && window.isSecureContext) {
|
||||
await navigator.clipboard.writeText(text);
|
||||
return;
|
||||
}
|
||||
const helper = document.createElement('textarea');
|
||||
helper.value = text;
|
||||
helper.setAttribute('readonly', '');
|
||||
helper.style.position = 'fixed';
|
||||
helper.style.left = '-9999px';
|
||||
document.body.appendChild(helper);
|
||||
helper.select();
|
||||
document.execCommand('copy');
|
||||
helper.remove();
|
||||
};
|
||||
|
||||
document.addEventListener('click', async (event) => {
|
||||
const button = event.target.closest('[data-copy]');
|
||||
if (!button) return;
|
||||
const wrap = button.closest('[data-copy-wrap]');
|
||||
const source = wrap?.querySelector('.copy-source');
|
||||
if (!source) return;
|
||||
try {
|
||||
await copyToClipboard(source.value);
|
||||
toast('Buchungstext kopiert.');
|
||||
const original = button.innerHTML;
|
||||
button.innerHTML = '<svg class="ico" aria-hidden="true"><use href="#i-check"/></svg> Kopiert';
|
||||
window.setTimeout(() => { button.innerHTML = original; }, 1800);
|
||||
} catch (error) {
|
||||
toast('Kopieren nicht möglich. Bitte den Text markieren und manuell kopieren.', true);
|
||||
}
|
||||
});
|
||||
|
||||
/* --------------------------------------------------------- Buchungsdialog */
|
||||
const dialog = document.getElementById('booking-dialog');
|
||||
const dialogContent = document.getElementById('booking-dialog-content');
|
||||
|
||||
const closeDialog = () => {
|
||||
if (dialog?.open) dialog.close();
|
||||
};
|
||||
|
||||
document.addEventListener('click', async (event) => {
|
||||
const trigger = event.target.closest('a[data-panel]');
|
||||
if (!trigger || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;
|
||||
if (!dialog || !dialogContent || typeof dialog.showModal !== 'function') return;
|
||||
event.preventDefault();
|
||||
const id = trigger.dataset.panel;
|
||||
try {
|
||||
const response = await fetch(trigger.href.replace(/\/?$/, '') + '/panel', {
|
||||
headers: { 'Accept': 'text/html', 'X-Requested-With': 'fetch' },
|
||||
credentials: 'same-origin'
|
||||
});
|
||||
if (!response.ok || response.url.includes('/login')) {
|
||||
window.location.href = trigger.href;
|
||||
return;
|
||||
}
|
||||
dialogContent.innerHTML = await response.text();
|
||||
dialog.showModal();
|
||||
dialogContent.querySelector('[data-close-dialog]')?.focus();
|
||||
} catch (error) {
|
||||
window.location.href = trigger.href;
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('click', (event) => {
|
||||
if (event.target.closest('[data-close-dialog]')) closeDialog();
|
||||
});
|
||||
|
||||
if (dialog) {
|
||||
dialog.addEventListener('click', (event) => {
|
||||
if (event.target === dialog) closeDialog();
|
||||
});
|
||||
dialog.addEventListener('close', () => {
|
||||
if (dialogContent) dialogContent.innerHTML = '';
|
||||
});
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------- Nutzermenü */
|
||||
document.addEventListener('click', (event) => {
|
||||
document.querySelectorAll('details.user-menu[open]').forEach((menu) => {
|
||||
if (!menu.contains(event.target)) menu.removeAttribute('open');
|
||||
});
|
||||
});
|
||||
|
||||
/* ------------------------------------------------------------ Buchungsformular */
|
||||
const bookingForm = document.querySelector('[data-booking-form]');
|
||||
if (bookingForm) {
|
||||
const trailerSelect = bookingForm.querySelector('[data-trailer-select]');
|
||||
const employeeSelect = bookingForm.querySelector('select[name="employee_id"]');
|
||||
const startInput = bookingForm.querySelector('[data-date-start]');
|
||||
const endInput = bookingForm.querySelector('[data-date-end]');
|
||||
const depositInput = bookingForm.querySelector('[data-money="deposit"]');
|
||||
const totalInput = bookingForm.querySelector('[data-money="total"]');
|
||||
const dueOutput = bookingForm.querySelector('[data-due]');
|
||||
const conflictBox = bookingForm.querySelector('[data-conflict]');
|
||||
const availabilityUrl = bookingForm.dataset.availabilityUrl;
|
||||
const excludeId = bookingForm.dataset.exclude || '0';
|
||||
|
||||
const parseMoney = (value) => {
|
||||
let text = String(value || '').replace(/[^\d,.\-]/g, '');
|
||||
if (text.includes(',')) {
|
||||
text = text.replace(/\./g, '').replace(',', '.');
|
||||
} else if (/^\d{1,3}(\.\d{3})+$/.test(text)) {
|
||||
text = text.replace(/\./g, '');
|
||||
}
|
||||
const number = Number.parseFloat(text || '0');
|
||||
return Number.isFinite(number) ? Math.round(number * 100) : 0;
|
||||
};
|
||||
const formatMoney = (cents) => {
|
||||
return (cents / 100).toLocaleString('de-DE', { minimumFractionDigits: 2, maximumFractionDigits: 2 }) + ' €';
|
||||
};
|
||||
const formatDate = (iso) => {
|
||||
if (!/^\d{4}-\d{2}-\d{2}$/.test(iso)) return '–';
|
||||
const [y, m, d] = iso.split('-');
|
||||
return `${d}.${m}.${y}`;
|
||||
};
|
||||
const formatRange = (a, b) => {
|
||||
if (!a || !b) return '–';
|
||||
return a === b ? formatDate(a) : `${formatDate(a)} – ${formatDate(b)}`;
|
||||
};
|
||||
const contrast = (hex) => {
|
||||
const clean = String(hex || '').replace('#', '');
|
||||
if (clean.length !== 6) return '#ffffff';
|
||||
const channels = [0, 2, 4].map((i) => {
|
||||
const c = Number.parseInt(clean.slice(i, i + 2), 16) / 255;
|
||||
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
||||
});
|
||||
const luminance = 0.2126 * channels[0] + 0.7152 * channels[1] + 0.0722 * channels[2];
|
||||
return luminance > 0.46 ? '#10202c' : '#ffffff';
|
||||
};
|
||||
|
||||
const updateTrailer = () => {
|
||||
if (!trailerSelect) return;
|
||||
const option = trailerSelect.selectedOptions[0];
|
||||
if (!option) return;
|
||||
const color = option.dataset.color || '#196abc';
|
||||
const name = option.dataset.colorName || '';
|
||||
const label = option.textContent.split('·')[0].trim();
|
||||
const preview = bookingForm.querySelector('[data-trailer-preview]');
|
||||
if (preview) {
|
||||
preview.style.setProperty('--trailer', color);
|
||||
preview.style.setProperty('--trailer-text', contrast(color));
|
||||
const dot = preview.querySelector('.trailer-dot');
|
||||
if (dot) dot.style.setProperty('--trailer', color);
|
||||
const text = preview.querySelector('[data-trailer-preview-label]');
|
||||
if (text) text.textContent = `${label} · ${name}`;
|
||||
}
|
||||
const summary = bookingForm.querySelector('[data-summary-trailer]');
|
||||
if (summary) summary.textContent = label;
|
||||
};
|
||||
|
||||
const updateTotals = () => {
|
||||
const deposit = parseMoney(depositInput?.value);
|
||||
const total = parseMoney(totalInput?.value);
|
||||
const due = total - deposit;
|
||||
if (dueOutput) dueOutput.textContent = formatMoney(due);
|
||||
const totalSummary = bookingForm.querySelector('[data-summary-total]');
|
||||
const depositSummary = bookingForm.querySelector('[data-summary-deposit]');
|
||||
const dueSummary = bookingForm.querySelector('[data-summary-due]');
|
||||
if (totalSummary) totalSummary.textContent = formatMoney(total);
|
||||
if (depositSummary) depositSummary.textContent = formatMoney(deposit);
|
||||
if (dueSummary) dueSummary.textContent = formatMoney(due);
|
||||
};
|
||||
|
||||
const updateSummary = () => {
|
||||
const dates = bookingForm.querySelector('[data-summary-dates]');
|
||||
if (dates) dates.textContent = formatRange(startInput?.value, endInput?.value);
|
||||
const employee = bookingForm.querySelector('[data-summary-employee]');
|
||||
if (employee && employeeSelect) {
|
||||
employee.textContent = employeeSelect.selectedOptions[0]?.textContent.trim() || '–';
|
||||
}
|
||||
};
|
||||
|
||||
const showConflict = (html, ok = false) => {
|
||||
if (!conflictBox) return;
|
||||
if (!html) {
|
||||
conflictBox.hidden = true;
|
||||
conflictBox.innerHTML = '';
|
||||
conflictBox.classList.remove('is-ok');
|
||||
return;
|
||||
}
|
||||
conflictBox.hidden = false;
|
||||
conflictBox.innerHTML = html;
|
||||
conflictBox.classList.toggle('is-ok', ok);
|
||||
};
|
||||
|
||||
let availabilityTimer = 0;
|
||||
const checkAvailability = () => {
|
||||
if (!availabilityUrl || !trailerSelect || !startInput || !endInput) return;
|
||||
const start = startInput.value;
|
||||
const end = endInput.value;
|
||||
if (!start || !end || end < start) {
|
||||
showConflict('');
|
||||
return;
|
||||
}
|
||||
window.clearTimeout(availabilityTimer);
|
||||
availabilityTimer = window.setTimeout(async () => {
|
||||
const params = new URLSearchParams({
|
||||
trailer: trailerSelect.value,
|
||||
start,
|
||||
end,
|
||||
exclude: excludeId
|
||||
});
|
||||
try {
|
||||
const response = await fetch(`${availabilityUrl}?${params.toString()}`, {
|
||||
headers: { 'Accept': 'application/json', 'X-Requested-With': 'fetch' },
|
||||
credentials: 'same-origin'
|
||||
});
|
||||
if (!response.ok) {
|
||||
showConflict('');
|
||||
return;
|
||||
}
|
||||
const data = await response.json();
|
||||
if (data.ok) {
|
||||
showConflict('<svg class="ico" aria-hidden="true"><use href="#i-check"/></svg><span>Der Zeitraum ist für diesen Anhänger frei.</span>', true);
|
||||
return;
|
||||
}
|
||||
const conflict = data.conflicts && data.conflicts[0];
|
||||
if (conflict) {
|
||||
showConflict(`<svg class="ico" aria-hidden="true"><use href="#i-alert"/></svg><span>Belegt: ${formatDate(conflict.start)} – ${formatDate(conflict.end)} (${conflict.customer}). Ein Wechseltag ist erlaubt.</span>`);
|
||||
} else {
|
||||
showConflict('');
|
||||
}
|
||||
} catch (error) {
|
||||
showConflict('');
|
||||
}
|
||||
}, 320);
|
||||
};
|
||||
|
||||
trailerSelect?.addEventListener('change', () => { updateTrailer(); checkAvailability(); });
|
||||
employeeSelect?.addEventListener('change', updateSummary);
|
||||
startInput?.addEventListener('change', () => {
|
||||
if (endInput && endInput.value && endInput.value < startInput.value) {
|
||||
endInput.value = startInput.value;
|
||||
}
|
||||
updateSummary();
|
||||
checkAvailability();
|
||||
});
|
||||
endInput?.addEventListener('change', () => { updateSummary(); checkAvailability(); });
|
||||
depositInput?.addEventListener('input', updateTotals);
|
||||
totalInput?.addEventListener('input', updateTotals);
|
||||
|
||||
updateTrailer();
|
||||
updateTotals();
|
||||
updateSummary();
|
||||
if (startInput?.value && endInput?.value) checkAvailability();
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------- Kalender: Ziehen */
|
||||
const calendar = document.querySelector('.cal-shell');
|
||||
if (calendar && window.matchMedia('(pointer: fine)').matches) {
|
||||
let drag = null;
|
||||
let suppressClick = false;
|
||||
|
||||
const addDays = (iso, days) => {
|
||||
const date = new Date(`${iso}T12:00:00Z`);
|
||||
date.setUTCDate(date.getUTCDate() + days);
|
||||
return date.toISOString().slice(0, 10);
|
||||
};
|
||||
|
||||
const resetDrag = () => {
|
||||
if (!drag) return;
|
||||
drag.bar.style.transform = '';
|
||||
drag.bar.classList.remove('is-dragging');
|
||||
drag.target?.classList.remove('is-drop-target');
|
||||
drag = null;
|
||||
};
|
||||
|
||||
calendar.addEventListener('pointerdown', (event) => {
|
||||
if (event.button !== 0) return;
|
||||
const bar = event.target.closest('.cal-bar');
|
||||
if (!bar || bar.classList.contains('is-cancelled')) return;
|
||||
const track = bar.closest('.cal-track');
|
||||
if (!track) return;
|
||||
const cell = track.querySelector('.cal-cell');
|
||||
if (!cell) return;
|
||||
drag = {
|
||||
bar,
|
||||
track,
|
||||
startX: event.clientX,
|
||||
startY: event.clientY,
|
||||
dayWidth: cell.getBoundingClientRect().width || 1,
|
||||
moved: false,
|
||||
target: null,
|
||||
pointerId: event.pointerId
|
||||
};
|
||||
});
|
||||
|
||||
document.addEventListener('pointermove', (event) => {
|
||||
if (!drag || event.pointerId !== drag.pointerId) return;
|
||||
const dx = event.clientX - drag.startX;
|
||||
const dy = event.clientY - drag.startY;
|
||||
if (!drag.moved && Math.abs(dx) > 6 && Math.abs(dx) > Math.abs(dy)) {
|
||||
drag.moved = true;
|
||||
drag.bar.classList.add('is-dragging');
|
||||
drag.bar.style.transform = `translateX(${dx}px)`;
|
||||
} else if (drag.moved) {
|
||||
event.preventDefault();
|
||||
drag.bar.style.transform = `translateX(${dx}px)`;
|
||||
}
|
||||
if (drag.moved) {
|
||||
const hit = document.elementFromPoint(event.clientX, event.clientY)?.closest('.cal-track');
|
||||
if (hit !== drag.target) {
|
||||
drag.target?.classList.remove('is-drop-target');
|
||||
drag.target = hit && hit !== drag.track ? hit : null;
|
||||
drag.target?.classList.add('is-drop-target');
|
||||
}
|
||||
}
|
||||
}, { passive: false });
|
||||
|
||||
document.addEventListener('pointerup', async (event) => {
|
||||
if (!drag || event.pointerId !== drag.pointerId) return;
|
||||
const active = drag;
|
||||
if (!active.moved) {
|
||||
resetDrag();
|
||||
return;
|
||||
}
|
||||
suppressClick = true;
|
||||
window.setTimeout(() => { suppressClick = false; }, 120);
|
||||
|
||||
const dx = event.clientX - active.startX;
|
||||
const shift = Math.round(dx / active.dayWidth);
|
||||
const startDate = active.bar.dataset.startDate;
|
||||
const originalTrailer = active.bar.dataset.trailerId;
|
||||
const targetTrailer = active.target?.dataset.trailerId || originalTrailer;
|
||||
const bookingId = active.bar.dataset.bookingId;
|
||||
|
||||
resetDrag();
|
||||
|
||||
if ((shift === 0 && targetTrailer === originalTrailer) || !bookingId || !startDate) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const body = new URLSearchParams({
|
||||
start_date: addDays(startDate, shift),
|
||||
trailer_id: targetTrailer,
|
||||
_csrf: csrf
|
||||
});
|
||||
const response = await fetch(`/bookings/${bookingId}/move`, {
|
||||
method: 'POST',
|
||||
body,
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
'Accept': 'application/json',
|
||||
'X-Requested-With': 'fetch',
|
||||
'X-CSRF-Token': csrf
|
||||
},
|
||||
credentials: 'same-origin'
|
||||
});
|
||||
if (response.url.includes('/login')) {
|
||||
window.location.reload();
|
||||
return;
|
||||
}
|
||||
const data = await response.json().catch(() => ({}));
|
||||
if (!response.ok || !data.ok) {
|
||||
toast(data.error || 'Verschieben nicht möglich.', true);
|
||||
return;
|
||||
}
|
||||
const message = 'Buchung verschoben – Erinnerungen wurden angepasst.';
|
||||
try { window.sessionStorage.setItem('dic-toast', message); } catch (error) { /* ignore */ }
|
||||
toast(message);
|
||||
window.setTimeout(() => window.location.reload(), 500);
|
||||
} catch (error) {
|
||||
toast('Verschieben fehlgeschlagen. Bitte erneut versuchen.', true);
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('pointercancel', resetDrag);
|
||||
|
||||
document.addEventListener('click', (event) => {
|
||||
if (!suppressClick) return;
|
||||
if (event.target.closest('.cal-bar')) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}
|
||||
}, true);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------- Anhängerfarben (Admin) */
|
||||
document.querySelectorAll('[data-color-sync]').forEach((colorInput) => {
|
||||
const row = colorInput.closest('.trailer-admin__row');
|
||||
const textInput = row?.querySelector('[data-color-text]');
|
||||
const preview = row?.querySelector('[data-color-preview]');
|
||||
const dot = preview?.querySelector('.trailer-dot');
|
||||
const labelInput = row?.querySelector('input[name^="label"]');
|
||||
|
||||
const contrast = (hex) => {
|
||||
const clean = String(hex || '').replace('#', '');
|
||||
if (clean.length !== 6) return '#ffffff';
|
||||
const channels = [0, 2, 4].map((i) => {
|
||||
const c = Number.parseInt(clean.slice(i, i + 2), 16) / 255;
|
||||
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
||||
});
|
||||
const luminance = 0.2126 * channels[0] + 0.7152 * channels[1] + 0.0722 * channels[2];
|
||||
return luminance > 0.46 ? '#10202c' : '#ffffff';
|
||||
};
|
||||
const apply = (hex) => {
|
||||
if (!/^#[0-9a-fA-F]{6}$/.test(hex) || !preview) return;
|
||||
preview.style.setProperty('--trailer', hex);
|
||||
preview.style.setProperty('--trailer-text', contrast(hex));
|
||||
if (dot) dot.style.setProperty('--trailer', hex);
|
||||
};
|
||||
|
||||
colorInput.addEventListener('input', () => {
|
||||
if (textInput) textInput.value = colorInput.value;
|
||||
apply(colorInput.value);
|
||||
});
|
||||
textInput?.addEventListener('input', () => {
|
||||
const value = textInput.value.startsWith('#') ? textInput.value : `#${textInput.value}`;
|
||||
if (/^#[0-9a-fA-F]{6}$/.test(value)) {
|
||||
colorInput.value = value;
|
||||
apply(value);
|
||||
}
|
||||
});
|
||||
labelInput?.addEventListener('input', () => {
|
||||
if (!preview) return;
|
||||
const textNode = [...preview.childNodes].find((node) => node.nodeType === Node.TEXT_NODE && node.textContent.trim());
|
||||
if (textNode) textNode.textContent = ` ${labelInput.value}`;
|
||||
});
|
||||
});
|
||||
})();
|
||||
4
web/assets/favicon.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
||||
<rect width="64" height="64" rx="14" fill="#196abc"/>
|
||||
<g transform="translate(32 32) scale(1.62)"><g fill="none" stroke="#fff" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><g transform="rotate(0)"><path d="M0 -13 V0"/><path d="M0 -4.6 L-3.3 -8"/> <path d="M0 -4.6 L3.3 -8"/><path d="M0 -8.6 L-2.3 -11"/> <path d="M0 -8.6 L2.3 -11"/></g><g transform="rotate(60)"><path d="M0 -13 V0"/><path d="M0 -4.6 L-3.3 -8"/> <path d="M0 -4.6 L3.3 -8"/><path d="M0 -8.6 L-2.3 -11"/> <path d="M0 -8.6 L2.3 -11"/></g><g transform="rotate(120)"><path d="M0 -13 V0"/><path d="M0 -4.6 L-3.3 -8"/> <path d="M0 -4.6 L3.3 -8"/><path d="M0 -8.6 L-2.3 -11"/> <path d="M0 -8.6 L2.3 -11"/></g><g transform="rotate(180)"><path d="M0 -13 V0"/><path d="M0 -4.6 L-3.3 -8"/> <path d="M0 -4.6 L3.3 -8"/><path d="M0 -8.6 L-2.3 -11"/> <path d="M0 -8.6 L2.3 -11"/></g><g transform="rotate(240)"><path d="M0 -13 V0"/><path d="M0 -4.6 L-3.3 -8"/> <path d="M0 -4.6 L3.3 -8"/><path d="M0 -8.6 L-2.3 -11"/> <path d="M0 -8.6 L2.3 -11"/></g><g transform="rotate(300)"><path d="M0 -13 V0"/><path d="M0 -4.6 L-3.3 -8"/> <path d="M0 -4.6 L3.3 -8"/><path d="M0 -8.6 L-2.3 -11"/> <path d="M0 -8.6 L2.3 -11"/></g></g></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
BIN
web/assets/fonts/inter-latin.woff2
Normal file
BIN
web/assets/fonts/manrope-latin.woff2
Normal file
BIN
web/assets/img/achtung-900.webp
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
web/assets/img/alpen-800.webp
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
web/assets/img/flotte-1400.webp
Normal file
|
After Width: | Height: | Size: 219 KiB |
BIN
web/assets/img/heck-600.webp
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
web/assets/img/hero-1280.webp
Normal file
|
After Width: | Height: | Size: 196 KiB |
BIN
web/assets/img/hero-1920.webp
Normal file
|
After Width: | Height: | Size: 340 KiB |
BIN
web/assets/img/hero-800.webp
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
web/assets/img/innen-560.webp
Normal file
|
After Width: | Height: | Size: 13 KiB |
4
web/assets/logo-mark.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 72" role="img" aria-label="Drink it cold">
|
||||
<path d="M50 1.5 L98.5 36 L50 70.5 L1.5 36 Z" fill="#196abc"/>
|
||||
<g transform="translate(50 35.5) scale(1.02)"><g fill="none" stroke="#fff" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><g transform="rotate(0)"><path d="M0 -13 V0"/><path d="M0 -4.6 L-3.3 -8"/> <path d="M0 -4.6 L3.3 -8"/><path d="M0 -8.6 L-2.3 -11"/> <path d="M0 -8.6 L2.3 -11"/></g><g transform="rotate(60)"><path d="M0 -13 V0"/><path d="M0 -4.6 L-3.3 -8"/> <path d="M0 -4.6 L3.3 -8"/><path d="M0 -8.6 L-2.3 -11"/> <path d="M0 -8.6 L2.3 -11"/></g><g transform="rotate(120)"><path d="M0 -13 V0"/><path d="M0 -4.6 L-3.3 -8"/> <path d="M0 -4.6 L3.3 -8"/><path d="M0 -8.6 L-2.3 -11"/> <path d="M0 -8.6 L2.3 -11"/></g><g transform="rotate(180)"><path d="M0 -13 V0"/><path d="M0 -4.6 L-3.3 -8"/> <path d="M0 -4.6 L3.3 -8"/><path d="M0 -8.6 L-2.3 -11"/> <path d="M0 -8.6 L2.3 -11"/></g><g transform="rotate(240)"><path d="M0 -13 V0"/><path d="M0 -4.6 L-3.3 -8"/> <path d="M0 -4.6 L3.3 -8"/><path d="M0 -8.6 L-2.3 -11"/> <path d="M0 -8.6 L2.3 -11"/></g><g transform="rotate(300)"><path d="M0 -13 V0"/><path d="M0 -4.6 L-3.3 -8"/> <path d="M0 -4.6 L3.3 -8"/><path d="M0 -8.6 L-2.3 -11"/> <path d="M0 -8.6 L2.3 -11"/></g></g></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
20
web/index.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Drink it cold – Front Controller.
|
||||
* Apache leitet alle nicht vorhandenen Dateien über .htaccess hierher.
|
||||
*/
|
||||
|
||||
$appRoot = is_dir(__DIR__ . '/app') ? __DIR__ . '/app' : dirname(__DIR__) . '/app';
|
||||
require $appRoot . '/bootstrap.php';
|
||||
|
||||
$uriPath = (string) parse_url((string) ($_SERVER['REQUEST_URI'] ?? '/'), PHP_URL_PATH);
|
||||
$basePath = rtrim((string) config('app.base_path', ''), '/');
|
||||
if ($basePath !== '' && str_starts_with($uriPath, $basePath)) {
|
||||
$uriPath = substr($uriPath, strlen($basePath));
|
||||
}
|
||||
$path = '/' . trim($uriPath, '/');
|
||||
$method = request_method();
|
||||
|
||||
page_handle($method, $path);
|
||||