diff --git a/scripts/build-web.mjs b/scripts/build-web.mjs
index e6a565b..10b84fe 100644
--- a/scripts/build-web.mjs
+++ b/scripts/build-web.mjs
@@ -13,3 +13,4 @@ await build({
});
await cp("src/web/index.html", "dist/web/index.html");
await cp("src/web/styles.css", "dist/web/styles.css");
+await cp("src/web/bilder", "dist/web/bilder", { recursive: true });
diff --git a/src/web/app.ts b/src/web/app.ts
index 7423bb6..da67641 100644
--- a/src/web/app.ts
+++ b/src/web/app.ts
@@ -134,17 +134,18 @@ function tabelle(spalten: { titel: string; wert: (z: Zeile) => string; klasse?:
return t;
}
+// Kopf wie bei Plancraft: Titel links, Hauptknopf rechts; darunter eine Leiste für Filter
function seite(titel: string, knopf?: { text: string; aktion: () => void }): HTMLElement {
- inhalt.innerHTML = `
${esc(titel)}
`;
- const leiste = document.createElement("div");
- leiste.className = "leiste";
+ inhalt.innerHTML = `${esc(titel)}
`;
if (knopf) {
const b = document.createElement("button");
b.className = "haupt";
b.textContent = knopf.text;
b.onclick = knopf.aktion;
- leiste.appendChild(b);
+ inhalt.firstElementChild!.appendChild(b);
}
+ const leiste = document.createElement("div");
+ leiste.className = "leiste";
inhalt.appendChild(leiste);
return leiste;
}
@@ -175,10 +176,18 @@ async function kontakte(): Promise {
], zeilen, async (z) => (await bearbeiten("kontakte", "Kontakt bearbeiten", KONTAKT_FELDER, z)) && kontakte()));
}
+const STATUS: [string, string][] = [
+ ["anfrage", "Anfrage"], ["angebot", "Angebot"], ["auftrag", "Auftrag erhalten"], ["ausfuehrung", "Ausführung"],
+ ["abgerechnet", "Abgerechnet"], ["gewaehrleistung", "Gewährleistung"], ["abgeschlossen", "Abgeschlossen"],
+];
+const STATUS_TEXT = Object.fromEntries(STATUS);
+const etikett = (status: string) => `${esc(STATUS_TEXT[status] ?? status)}`;
+
async function projekte(): Promise {
const kontaktListe = await api("kontakte");
const felder: Feld[] = [
{ name: "nummer", titel: "Nummer", pflicht: true }, { name: "bezeichnung", titel: "Baustelle", pflicht: true },
+ { name: "status", titel: "Status", art: "auswahl", optionen: STATUS },
{ name: "bauherr_id", titel: "Bauherr", art: "auswahl", optionen: [["", "–"], ...kontaktListe.map((k): [string, string] => [k.id, k.name])] },
{ name: "umsatz_netto", titel: "Umsatz netto", art: "euro" }, { name: "material_kosten", titel: "Materialkosten", art: "euro" },
{ name: "fremd_kosten", titel: "Fremdkosten", art: "euro" }, { name: "sonstige_kosten", titel: "Sonstige Kosten", art: "euro" },
@@ -192,15 +201,15 @@ async function projekte(): Promise {
const name = Object.fromEntries(kontaktListe.map((k) => [k.id, k.name]));
const kostenSumme = (z: Zeile) => z.material_kosten + z.fremd_kosten + z.sonstige_kosten;
inhalt.appendChild(tabelle([
- { titel: "Nr.", wert: (z) => esc(z.nummer) },
- { titel: "Baustelle", wert: (z) => esc(z.bezeichnung) },
- { titel: "Bauherr", wert: (z) => esc(name[z.bauherr_id]), klasse: "optional" },
- { titel: "Umsatz netto", wert: (z) => euro(z.umsatz_netto), klasse: "zahl" },
+ { titel: "Name", wert: (z) => `${esc(z.bezeichnung)}${esc(z.nummer)} · ${esc(name[z.bauherr_id] ?? "–")}` },
+ { titel: "Nummer", wert: (z) => esc(z.nummer), klasse: "optional" },
+ { titel: "Status", wert: (z) => etikett(z.status) },
+ { titel: "Umsatz netto", wert: (z) => euro(z.umsatz_netto), klasse: "zahl optional" },
{ titel: "Kosten", wert: (z) => euro(kostenSumme(z)), klasse: "zahl optional" },
- { titel: "Rohertrag", wert: (z) => euro(z.umsatz_netto - kostenSumme(z)), klasse: "zahl" },
+ { titel: "Rohertrag", wert: (z) => euro(z.umsatz_netto - kostenSumme(z)), klasse: "zahl optional" },
], zeilen, (z) => speichern(ohneNull(z))));
const gesamt = zeilen.reduce((s, z) => s + z.umsatz_netto - kostenSumme(z), 0);
- inhalt.insertAdjacentHTML("beforeend", `Rohertrag gesamt: ${euro(gesamt)}
+ inhalt.insertAdjacentHTML("beforeend", `${zeilen.length} Projekte
Rohertrag gesamt: ${euro(gesamt)}
Projektdetailseite, Einzelposten und Zahlungsplan folgen mit der V70-Übernahme.
`);
}
@@ -352,10 +361,23 @@ const REITER: [string, string, () => Promise][] = [
["daten", "Daten", daten],
];
+// Einfache Strichsymbole (24er Raster), Farbe kommt aus der Schrift
+const SYMBOLE: Record = {
+ uebersicht: '',
+ aufgaben: '',
+ projekte: '',
+ terminplan: '',
+ kontakte: '',
+ liquiditaet: '',
+ "laufende-kosten": '',
+ daten: '',
+};
+const symbol = (id: string) => ``;
+
const nav = document.getElementById("reiter")!;
-nav.innerHTML = REITER.map(([id, titel]) => ``).join("");
+nav.innerHTML = REITER.map(([id, titel]) => ``).join("");
nav.addEventListener("click", (ev) => {
- const r = (ev.target as HTMLElement).dataset.r;
+ const r = ((ev.target as HTMLElement).closest("button[data-r]") as HTMLElement | null)?.dataset.r;
if (r) location.hash = r;
});
diff --git a/src/web/bilder/logo.png b/src/web/bilder/logo.png
new file mode 100644
index 0000000..ec4ed91
Binary files /dev/null and b/src/web/bilder/logo.png differ
diff --git a/src/web/index.html b/src/web/index.html
index 3f8bea6..10e52b7 100644
--- a/src/web/index.html
+++ b/src/web/index.html
@@ -5,13 +5,14 @@
Betrieb · Schaarschmidt Holzbau
+
-
- Schaarschmidt Holzbau
+
+
diff --git a/src/web/styles.css b/src/web/styles.css
index 56160cd..8a9e3a6 100644
--- a/src/web/styles.css
+++ b/src/web/styles.css
@@ -1,37 +1,96 @@
+/* Aufbau ähnlich Plancraft (Henning, 19.10.2026): dunkle Seitenleiste, helle Fläche,
+ weiße Karten, farbige Status-Etiketten. Farben: Blautöne, dazu die Markenfarbe aus dem Logo
+ (--marke dunkles Braun, --holz helles Braun) für Logo und Markierungen. */
:root {
- --bg: #f6f5f2; --fl: #ffffff; --text: #1f1f1d; --leise: #6b6a65; --linie: #dedcd5;
- --akzent: #8a4b14; --akzent-text: #ffffff; --warn: #b42318;
+ --marke: #451e0c; --holz: #a26e3a;
+ --leiste: #13294a; --leiste-text: #b9c7da; --leiste-aktiv: #234a7c;
+ --bg: #f2f4f8; --fl: #ffffff; --text: #18202c; --leise: #5f6b7a; --linie: #e0e5ec;
+ --akzent: #1d5fa8; --akzent-hover: #174d89; --akzent-text: #ffffff; --akzent-hell: #e4eefa;
+ --warn: #b42318;
font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px;
}
@media (prefers-color-scheme: dark) {
- :root { --bg: #1b1b1a; --fl: #262624; --text: #ecebe6; --leise: #a3a29b; --linie: #3a3936; --akzent: #d9893f; --akzent-text: #1b1b1a; --warn: #f97066; }
+ :root {
+ --leiste: #0d1a2e; --leiste-aktiv: #1d3a62;
+ --bg: #111822; --fl: #1a2331; --text: #e8edf4; --leise: #9aa7b8; --linie: #2b3747;
+ --akzent: #5a9be0; --akzent-hover: #78b0ea; --akzent-text: #0d1a2e; --akzent-hell: #1d3352; --warn: #f97066;
+ }
}
* { box-sizing: border-box; }
-body { margin: 0; background: var(--bg); color: var(--text); }
-header { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 10px 16px; background: var(--fl); border-bottom: 1px solid var(--linie); }
-header nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
-header nav button { background: none; border: 0; padding: 6px 10px; border-radius: 6px; color: var(--leise); cursor: pointer; font: inherit; }
-header nav button.aktiv { background: var(--bg); color: var(--text); font-weight: 600; }
-#version { color: var(--leise); font-size: 12px; }
-main { padding: 16px; max-width: 1200px; margin: 0 auto; }
-h1 { font-size: 20px; margin: 4px 0 16px; }
-.leiste { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; }
-button.haupt { background: var(--akzent); color: var(--akzent-text); border: 0; border-radius: 6px; padding: 7px 14px; font: inherit; cursor: pointer; }
-button.neben { background: var(--fl); color: var(--text); border: 1px solid var(--linie); border-radius: 6px; padding: 6px 12px; font: inherit; cursor: pointer; }
-table { width: 100%; border-collapse: collapse; background: var(--fl); border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; }
-th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--linie); }
-th { font-size: 12px; color: var(--leise); font-weight: 600; }
+body { margin: 0; background: var(--bg); color: var(--text); display: flex; min-height: 100vh; }
+
+/* Seitenleiste */
+#seitenleiste { width: 200px; flex: none; background: var(--leiste); color: var(--leiste-text); display: flex; flex-direction: column; padding: 14px 10px; position: sticky; top: 0; height: 100vh; }
+#marke { background: #fff; border-radius: 10px; padding: 10px 14px; margin: 0 4px 18px; display: grid; place-items: center; }
+#marke img { width: 96px; height: auto; display: block; }
+#reiter { display: flex; flex-direction: column; gap: 2px; flex: 1; }
+#reiter button { display: flex; align-items: center; gap: 11px; background: none; border: 0; padding: 9px 10px; border-radius: 8px; color: inherit; cursor: pointer; font: inherit; text-align: left; }
+#reiter button svg { width: 19px; height: 19px; flex: none; }
+#reiter button:hover { background: rgb(255 255 255 / 0.06); color: #fff; }
+#reiter button.aktiv { background: var(--leiste-aktiv); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--holz); }
+#version { font-size: 12px; padding: 8px 10px 0; opacity: 0.7; }
+
+/* Inhalt */
+main { flex: 1; min-width: 0; padding: 22px 28px; max-width: 1280px; }
+.kopf { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
+.kopf h1 { font-size: 24px; margin: 0; flex: 1; color: var(--text); }
+h2 { font-size: 16px; margin: 26px 0 10px; }
+.leiste { display: flex; gap: 8px; margin-bottom: 14px; align-items: center; flex-wrap: wrap; }
+.leiste select, .leiste input { padding: 8px 10px; border: 1px solid var(--linie); border-radius: 8px; background: var(--fl); color: var(--text); font: inherit; }
+button.haupt { background: var(--akzent); color: var(--akzent-text); border: 0; border-radius: 8px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; }
+button.haupt:hover { background: var(--akzent-hover); }
+button.neben, a.neben { display: inline-block; background: var(--fl); color: var(--text); border: 1px solid var(--linie); border-radius: 8px; padding: 8px 14px; font: inherit; cursor: pointer; text-decoration: none; }
+button.neben:hover, a.neben:hover { border-color: var(--leise); }
+
+/* Tabellen als Karte */
+table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--fl); border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; }
+th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
+tbody tr:last-child td { border-bottom: 0; }
+th { font-size: 13px; color: var(--leise); font-weight: 600; }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
+td .unter { display: block; color: var(--leise); font-size: 13px; margin-top: 2px; }
tr.klickbar { cursor: pointer; }
tr.klickbar:hover td { background: var(--bg); }
+.nur-schmal { display: none; }
+td { overflow-wrap: break-word; }
+td.zahl { white-space: nowrap; }
+.anzahl { color: var(--leise); font-size: 13px; margin: 10px 2px; }
+
+/* Status-Etiketten */
+.etikett { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 13px; white-space: nowrap; background: #eef1f5; color: #4a5565; }
+.etikett.angebot { background: #e4eefa; color: #1d5fa8; }
+.etikett.auftrag { background: #d7ecfa; color: #0b5f96; }
+.etikett.ausfuehrung { background: #fcefc3; color: #7a5600; }
+.etikett.abgerechnet { background: #dcf1f4; color: #0f6674; }
+.etikett.gewaehrleistung { background: #e6e8fb; color: #3c47a8; }
+.etikett.abgeschlossen { background: #daf3e3; color: #19703f; }
+
.hinweis { color: var(--leise); }
.fehler { color: var(--warn); }
-#dialog-huelle { position: fixed; inset: 0; background: rgb(0 0 0 / 0.35); display: grid; place-items: center; padding: 16px; }
+
+/* Dialoge */
+#dialog-huelle { position: fixed; inset: 0; background: rgb(10 20 35 / 0.4); display: grid; place-items: center; padding: 16px; z-index: 10; }
#dialog-huelle[hidden] { display: none; }
-.dialog { background: var(--fl); border-radius: 10px; padding: 18px; width: min(460px, 100%); box-shadow: 0 10px 30px rgb(0 0 0 / 0.25); }
-.dialog h2 { font-size: 17px; margin: 0 0 12px; }
-.dialog label { display: block; font-size: 12px; color: var(--leise); margin: 10px 0 3px; }
-.dialog input, .dialog select, .dialog textarea { width: 100%; padding: 7px 8px; border: 1px solid var(--linie); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
-.dialog .knoepfe { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
+.dialog { background: var(--fl); border-radius: 12px; padding: 22px; width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 12px 34px rgb(0 0 0 / 0.25); }
+.dialog h2 { font-size: 18px; margin: 0 0 14px; }
+.dialog label { display: block; font-size: 13px; color: var(--leise); margin: 12px 0 4px; }
+.dialog input, .dialog select, .dialog textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--linie); border-radius: 8px; background: var(--fl); color: var(--text); font: inherit; }
+.dialog input:focus, .dialog select:focus, .dialog textarea:focus { outline: 2px solid var(--akzent-hell); border-color: var(--akzent); }
+.dialog .knoepfe { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.dialog .knoepfe .links { margin-right: auto; }
-@media (max-width: 640px) { th.optional, td.optional { display: none; } }
+
+/* Schmale Bildschirme: Leiste oben, waagerecht scrollbar */
+@media (max-width: 800px) {
+ body { flex-direction: column; }
+ #seitenleiste { width: auto; height: auto; position: static; flex-direction: row; align-items: center; padding: 8px; gap: 6px; overflow-x: auto; }
+ #marke { padding: 4px 6px; margin: 0 4px 0 0; }
+ #marke img { width: 34px; }
+ #version { display: none; }
+ #reiter { flex-direction: row; }
+ #reiter button { padding: 8px 10px; white-space: nowrap; }
+ main { padding: 16px; }
+ th.optional, td.optional { display: none; }
+ .nur-schmal { display: inline; }
+ th, td { padding: 11px 10px; }
+ td .unter { font-size: 12px; }
+}