From d1c9d272192cec8ea42eeaa7916044d32df8a017 Mon Sep 17 00:00:00 2001 From: jbergner Date: Sun, 31 Aug 2025 12:52:17 +0200 Subject: [PATCH] fix --- assets/app.js | 14 +++++++ assets/style.css | 91 ++++++++++++++++++++++++++++++++---------- kueche.db | Bin 24576 -> 24576 bytes templates/base.gohtml | 6 ++- 4 files changed, 88 insertions(+), 23 deletions(-) create mode 100644 assets/app.js diff --git a/assets/app.js b/assets/app.js new file mode 100644 index 0000000..ee4f485 --- /dev/null +++ b/assets/app.js @@ -0,0 +1,14 @@ +// Kleine UX-Helferlein – keine externen Abhängigkeiten nötig. +(function(){ +// Confirm bei Ausbuchen-Buttons (nur mit .danger) +document.addEventListener('click', function(e){ +const btn = e.target.closest('button.btn.danger'); +if(!btn) return; +const form = btn.closest('form'); +if(!form) return; +if(!confirm('Einheit wirklich ausbuchen?')){ +e.preventDefault(); +e.stopPropagation(); +} +}); +})(); \ No newline at end of file diff --git a/assets/style.css b/assets/style.css index 9f2f120..4995d1c 100644 --- a/assets/style.css +++ b/assets/style.css @@ -1,29 +1,76 @@ -:root { --gap: 16px; --radius: 12px; --muted: #6b7280; } +:root { +--gap: 16px; --radius: 14px; --muted: #6b7280; --bg: #f6f7fb; --card: #ffffff; --ink: #0f172a; +--brand: #6366f1; --brand-600:#4f46e5; --danger:#ef4444; --line:#e5e7eb; +} * { box-sizing: border-box; } -body { font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, Noto Sans, "Apple Color Emoji", "Segoe UI Emoji"; margin:0; background:#f6f7fb; } -.container { max-width: 1100px; margin: 0 auto; padding: 16px; } -header.container { display:flex; align-items:center; justify-content:space-between; } -header h1 { margin:0; font-size: 20px; } -nav a { margin-right: 12px; text-decoration:none; color:#111827; } -nav a:hover { text-decoration: underline; } -.card { background:white; padding:16px; border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0,0,0,0.06); margin-bottom:16px; } -.grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--gap); } -.product { display:flex; gap:12px; border: 1px solid #e5e7eb; border-radius: var(--radius); padding:10px; background:#fff; color:inherit; text-decoration:none; } -.product img { width:72px; height:72px; object-fit:cover; border-radius:8px; border:1px solid #eee; } -.placeholder { width:72px; height:72px; background:#eef2ff; border:1px dashed #c7d2fe; display:flex; align-items:center; justify-content:center; border-radius:8px; color:#6366f1; font-size:12px; } -.meta .name { font-weight:600; } +html { scroll-behavior: smooth; } +body { font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, Noto Sans, "Apple Color Emoji", "Segoe UI Emoji"; margin:0; background:var(--bg); color:var(--ink); } +.container { max-width: 1150px; margin: 0 auto; padding: 20px; } + + +/* Header */ +header.container { display:flex; align-items:center; justify-content:space-between; gap:12px; } +.brand { display:flex; align-items:center; gap:10px; font-weight:800; letter-spacing:.3px; } +.brand .logo { width:28px; height:28px; display:grid; place-items:center; border-radius:10px; background:linear-gradient(135deg,var(--brand),#22d3ee); color:white; font-size:16px; } +nav a { margin-right: 14px; text-decoration:none; color:#111827; padding:6px 10px; border-radius:8px; } +nav a:hover { background: rgba(99,102,241,.1); } + + +/* Cards */ +.card { background:var(--card); padding:18px; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,0.06); margin-bottom:18px; border:1px solid var(--line); } +.card h2, .card h3 { margin-top:0; } + + +/* Grid Product Tiles */ +.grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--gap); } +.product { display:flex; gap:12px; border: 1px solid var(--line); border-radius: var(--radius); padding:12px; background:#fff; color:inherit; text-decoration:none; transition: transform .08s ease, box-shadow .2s ease; } +.product:hover { transform: translateY(-2px); box-shadow:0 12px 30px rgba(0,0,0,.08); } +.product img { width:74px; height:74px; object-fit:cover; border-radius:10px; border:1px solid #eee; } +.placeholder { width:74px; height:74px; background:#eef2ff; border:1px dashed #c7d2fe; display:flex; align-items:center; justify-content:center; border-radius:10px; color:#6366f1; font-size:12px; } +.meta .name { font-weight:700; } .muted { color: var(--muted); } -.stock.warn { color:#dc2626; font-weight:600; } -.actions { margin-top:8px; } -.btn { background:#111827; color:white; border:0; padding:8px 12px; border-radius:8px; cursor:pointer; text-decoration:none; display:inline-block; } -.btn:hover { filter: brightness(1.1); } -.btn.sm { padding:6px 10px; font-size: 14px; } -.btn.danger { background:#dc2626; } -.table { width:100%; border-collapse: collapse; background:white; } -.table th, .table td { border-bottom:1px solid #e5e7eb; padding:8px; text-align:left; } +.badge { display:inline-block; padding:2px 8px; border-radius:999px; font-size:12px; border:1px solid var(--line); } +.badge.warn { background:#fff1f2; border-color:#fecdd3; color:#b91c1c; } +.badge.ok { background:#ecfeff; border-color:#a5f3fc; color:#0e7490; } + + +/* Buttons */ +.btn { background:var(--brand); color:white; border:0; padding:10px 14px; border-radius:10px; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; gap:8px; font-weight:600; box-shadow:0 6px 18px rgba(99,102,241,.25); } +.btn:hover { background:var(--brand-600); } +.btn.secondary { background:#111827; box-shadow:0 6px 18px rgba(17,24,39,.2); } +.btn.sm { padding:6px 10px; font-size: 14px; box-shadow:none; } +.btn.ghost { background:transparent; color:var(--brand-600); border:1px solid var(--brand-600); box-shadow:none; } +.btn.danger { background:var(--danger); box-shadow:0 6px 18px rgba(239,68,68,.25); } +.actions { margin-top:8px; display:flex; gap:10px; } + + +/* Tables */ +.table { width:100%; border-collapse: collapse; background:white; border:1px solid var(--line); border-radius:14px; overflow:hidden; } +.table thead th { background:#f8fafc; font-weight:700; font-size:14px; } +.table th, .table td { border-bottom:1px solid var(--line); padding:12px; text-align:left; } +.table tbody tr:hover { background:#fafafa; } .tinyimg img { width:42px; height:42px; object-fit:cover; border-radius:8px; border:1px solid #eee; } + + +/* Layout utils */ .flex { display:flex; gap:12px; align-items:center; } .flex-between { display:flex; align-items:center; justify-content:space-between; gap:12px; } .form-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap); } .form-inline { display:flex; gap:12px; align-items:end; flex-wrap:wrap; } -.cover { width:96px; height:96px; object-fit:cover; border-radius:8px; border:1px solid #eee; } \ No newline at end of file +.cover { width:96px; height:96px; object-fit:cover; border-radius:12px; border:1px solid #eee; } +input, select { width:100%; height:38px; border:1px solid var(--line); border-radius:10px; padding:8px 10px; } + + +/* Footer */ +footer.container { color:var(--muted); font-size:14px; } + + +/* Dark mode +@media (prefers-color-scheme: dark) { +:root { --bg:#0b1220; --card:#0f172a; --ink:#e5e7eb; --line:#1f2937; } +nav a { color:#e5e7eb; } +.product { background:var(--card); } +.table { background:var(--card); } +.table thead th { background:#0b1324; } +.placeholder { background:#1f2a48; border-color:#334155; color:#93c5fd; } +}*/ \ No newline at end of file diff --git a/kueche.db b/kueche.db index 5c8d2fe8a548471a41c34b44e25f36539f9eb61e..d4de3cffbca05bb9ec2eb42fd8789d8cbf3c2a14 100644 GIT binary patch literal 24576 zcmeI4O>E=F6~{@-U-F6?d)2Lg0*j@wXm$;o7Aed6FyN-L#I+quvMtG2J1L;jBqfb3 zku*t3wtA_OOWRX#$t^hqL5{to=pmPU0=WeVa!4)#5)|#BC{W~(Yld3NUT)h3xIloS zcm(J-Z{|O5W`6T{7>aP^uz+oqt?On-ve`9io}y{$mn=(BRD|5qq~P4+iyjxA zVk6Y*A0iA9OojeNp`V1`XFg_*Nf9m}00e*l5C8%|00;m9AOHk_z>h^hpPGrTMd{%p z))e&uD;Kq{hHa~+UKrTCtYK~BPUp&Ewkoo_rM!5|{s$GiUt&kf`))@?vehN_;f`1q zS<9B}uElP$_po-aJvkHIBm*uyF`!}UN>{dPkHn)`Q~zaDuk?E8aXnU6+%cDimw}mR zG)lj6XiKMUbrg2=XVQ&b&2AOMM^k6-&#`1}WRX>ITP(8&<=tYoe8TRDCv5hpy1!c@ zeTrhKx`&G7dR4A}z@c~(ODJNFOGV4B8mYj*^#ezsU=CYMsHZMAX9^=JU z#bXk}4dXPr}CT`ZO;MTU9vwR1;Pk?qp=W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