Schritt 1: Fundament der Lebensmittel-Lagerverwaltung (Pantry)
Backend (FastAPI + PostgreSQL): Chargen mit MHD, FEFO-Auslagern, Einheiten-Umrechnung (Stueck/g/ml + Packungen), Open-Food-Facts-Lookup mit lokalem Fallback, JWT-Auth mit Rollen (Admin/Nutzer), erster Admin beim Setup, Einkaufsliste, Ablaufwarnung, Lagerorte, pytest fuer FEFO. Web-UI (React/Vite): Login, Dashboard, Ein-/Auslagern, Produkte, Lagerorte, Benutzerverwaltung, Einkaufsliste - rollenabhaengig. Deploy: docker-compose + install.sh (Docker-Autoinstall, Secrets), README und Roadmap fuer Schritt 2 (iOS) und Schritt 3. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
185
web/src/styles.css
Normal file
185
web/src/styles.css
Normal file
@@ -0,0 +1,185 @@
|
||||
:root {
|
||||
--bg: #f4f6f8;
|
||||
--card: #ffffff;
|
||||
--border: #e2e8f0;
|
||||
--text: #1e293b;
|
||||
--muted: #64748b;
|
||||
--primary: #2f855a;
|
||||
--primary-dark: #276749;
|
||||
--danger: #c53030;
|
||||
--warn: #b7791f;
|
||||
--radius: 10px;
|
||||
--shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
a { color: var(--primary); }
|
||||
|
||||
.app { min-height: 100vh; }
|
||||
|
||||
/* Topbar */
|
||||
.topbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
padding: 10px 20px;
|
||||
background: var(--card);
|
||||
border-bottom: 1px solid var(--border);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.brand { font-weight: 700; font-size: 20px; }
|
||||
.brand.big { font-size: 30px; }
|
||||
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
|
||||
.nav-link {
|
||||
padding: 7px 12px;
|
||||
border-radius: 8px;
|
||||
text-decoration: none;
|
||||
color: var(--muted);
|
||||
font-weight: 500;
|
||||
}
|
||||
.nav-link:hover { background: var(--bg); }
|
||||
.nav-link.active { background: var(--primary); color: #fff; }
|
||||
.userbox { display: flex; align-items: center; gap: 10px; }
|
||||
.username { font-size: 14px; color: var(--muted); }
|
||||
.badge {
|
||||
background: var(--primary); color: #fff; font-size: 11px;
|
||||
padding: 1px 6px; border-radius: 6px; font-weight: 700;
|
||||
}
|
||||
|
||||
.content { max-width: 1000px; margin: 0 auto; padding: 24px 20px 60px; }
|
||||
|
||||
.page-head {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
margin-bottom: 18px; gap: 12px; flex-wrap: wrap;
|
||||
}
|
||||
.page-head h1 { margin: 0; font-size: 24px; }
|
||||
.actions { display: flex; gap: 8px; }
|
||||
|
||||
/* Cards & layout */
|
||||
.card {
|
||||
background: var(--card);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 18px;
|
||||
box-shadow: var(--shadow);
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.card h2 { margin-top: 0; font-size: 17px; }
|
||||
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
|
||||
.form-narrow { max-width: 560px; }
|
||||
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
|
||||
|
||||
/* Forms */
|
||||
label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
|
||||
input, select {
|
||||
width: 100%;
|
||||
margin-top: 4px;
|
||||
padding: 9px 10px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
font-size: 15px;
|
||||
background: #fff;
|
||||
color: var(--text);
|
||||
}
|
||||
input:focus, select:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
|
||||
.row { display: flex; gap: 12px; align-items: flex-start; }
|
||||
.row .grow { flex: 1; }
|
||||
.search { display: flex; gap: 8px; margin-bottom: 16px; max-width: 480px; }
|
||||
.search input { margin-top: 0; }
|
||||
|
||||
/* Buttons */
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 9px 16px;
|
||||
border: 1px solid var(--border);
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
color: var(--text);
|
||||
}
|
||||
.btn:hover { background: var(--bg); }
|
||||
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
|
||||
.btn.primary:hover { background: var(--primary-dark); }
|
||||
.btn.danger { color: var(--danger); border-color: var(--danger); }
|
||||
.btn.ghost { border-color: transparent; background: transparent; }
|
||||
.btn:disabled { opacity: 0.6; cursor: default; }
|
||||
.link-btn { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 15px; padding: 4px 0; text-align: left; }
|
||||
|
||||
/* Tables */
|
||||
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
|
||||
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
|
||||
.table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
|
||||
.row-danger { background: #fff5f5; }
|
||||
.row-warn { background: #fffaf0; }
|
||||
.row-warn-text { color: var(--warn); }
|
||||
.strong { font-weight: 700; }
|
||||
.thumb-cell { width: 40px; }
|
||||
.thumb { width: 32px; height: 32px; object-fit: cover; border-radius: 6px; }
|
||||
.product-img { max-width: 160px; border-radius: 8px; margin-bottom: 10px; }
|
||||
|
||||
/* Lists */
|
||||
.picklist, .simple-list, .checklist { list-style: none; padding: 0; margin: 10px 0 0; }
|
||||
.simple-list li, .checklist li {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
padding: 9px 4px; border-bottom: 1px solid var(--border); gap: 10px;
|
||||
}
|
||||
.picklist li { padding: 6px 0; border-bottom: 1px solid var(--border); }
|
||||
.checklist li.done .item-name { text-decoration: line-through; color: var(--muted); }
|
||||
.checklist label { display: flex; align-items: center; gap: 8px; margin: 0; }
|
||||
.checklist input[type="checkbox"] { width: auto; margin: 0; }
|
||||
.item-name { font-weight: 600; color: var(--text); }
|
||||
|
||||
/* Alerts */
|
||||
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
|
||||
.alert.error { background: #fff5f5; color: var(--danger); border: 1px solid #feb2b2; }
|
||||
.alert.info { background: #ebf8ff; color: #2b6cb0; border: 1px solid #bee3f8; }
|
||||
.alert.warn { background: #fffaf0; color: var(--warn); border: 1px solid #fbd38d; }
|
||||
|
||||
/* Selected product banner */
|
||||
.selected-product {
|
||||
display: flex; align-items: center; gap: 12px;
|
||||
padding: 10px; background: var(--bg); border-radius: 8px; margin-bottom: 16px;
|
||||
}
|
||||
.selected-product > div { flex: 1; }
|
||||
|
||||
/* Login */
|
||||
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
|
||||
.login-card { width: 100%; max-width: 360px; text-align: center; }
|
||||
.login-card label { text-align: left; }
|
||||
|
||||
.muted { color: var(--muted); }
|
||||
.small { font-size: 13px; }
|
||||
.center { text-align: center; padding: 40px; }
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--bg: #0f172a;
|
||||
--card: #1e293b;
|
||||
--border: #334155;
|
||||
--text: #e2e8f0;
|
||||
--muted: #94a3b8;
|
||||
}
|
||||
input, select { background: #0f172a; }
|
||||
.btn { background: #0f172a; }
|
||||
.btn:hover { background: #172033; }
|
||||
.row-danger { background: #3b1a1a; }
|
||||
.row-warn { background: #3a2f14; }
|
||||
.alert.error { background: #3b1a1a; border-color: #7f1d1d; }
|
||||
.alert.info { background: #16324d; border-color: #1e4e79; }
|
||||
.alert.warn { background: #3a2f14; border-color: #7c5c14; }
|
||||
}
|
||||
Reference in New Issue
Block a user