mirror of
https://github.com/db9979/tidefront.git
synced 2026-12-05 12:24:13 +01:00
Redesign Hafenpapier: ruhige Logbuchseite in App und E-Mails
- Tokens (theme.css) auf Hafenpapier/Nachtpapier, Kontrasttest erweitert - Schriften Newsreader, Inter, JetBrains Mono (@fontsource), alte Pakete entfernt - Haarlinien statt Kästen: Karten als Rubrik mit Tintenlinie, Knöpfe in Tinte, 2-px-Ecken - Kopfleiste auf Papier mit Füllstand je Ressource (Warnfarbe ab 85 %), Navigation mit Strich - Kurszeile mit Pfeil, Rot nur für Alarm, Zustandsstreifen 7 px mit Symbol und Text - Einsatz: Missionen mit Streifen, Restzeit groß, Ladung im Spaltensatz; Meldung wie Entwurf - Kartenfarben, Statusleiste, Manifest und Symbol angeglichen - E-Mails im selben Stil (hell/dunkel, web-sichere Rückfälle)
This commit is contained in:
1 parent
566e22c7a6
commit
68537ed052
59 files changed
+547
-466
No files matched your search
@@ -1,11 +1,11 @@
|
||||
// Seekarte 2.0 – Hell/Dunkel: Standard folgt der Systemeinstellung (prefers-color-scheme), Einstellungen → Spiel →
|
||||
// Hafenpapier – Hell/Dunkel (Hafenpapier/Nachtpapier): Standard folgt der Systemeinstellung (prefers-color-scheme), Einstellungen → Spiel →
|
||||
// „Darstellung“ wählt fest Hell/Dunkel/Wie System (localStorage „tf-theme“), Modus steht vor dem ersten Bild fest
|
||||
// (kein Flackern: <html data-theme> ist gesetzt, bevor <body> existiert, und wechselt danach nicht), theme-color passt.
|
||||
import type { Page } from "@playwright/test";
|
||||
import { expect, test } from "./fixtures.ts";
|
||||
|
||||
const HEAD = { light: "#14243a", dark: "#0a111d" };
|
||||
const BG = { light: "rgb(244, 239, 228)", dark: "rgb(14, 23, 38)" };
|
||||
const HEAD = { light: "#1a2230", dark: "#121417" }; // theme-color = Statusstreifen (theme.css --tf-statusbar)
|
||||
const BG = { light: "rgb(245, 241, 232)", dark: "rgb(18, 20, 23)" };
|
||||
|
||||
/** Merkt den Modus beim Einhängen von <body> und zählt spätere Wechsel von data-theme (Flackern). */
|
||||
async function watchFirstPaint(page: Page) {
|
||||
@@ -84,14 +84,14 @@ test.describe("System hell", () => {
|
||||
await page.emulateMedia({ colorScheme: "light" });
|
||||
await expectMode(page, "light");
|
||||
|
||||
// Fest „Dunkel“: bleibt dunkel, auch wenn das System hell ist; Kopfleiste hat in beiden Modi ihren dunklen Streifen.
|
||||
// Fest „Dunkel“: bleibt dunkel, auch wenn das System hell ist; die Kopfleiste trägt das Nachtpapier.
|
||||
await page.getByRole("button", { name: "Menü", exact: true }).click();
|
||||
await page.getByRole("dialog").getByRole("button", { name: /^Einstellungen/ }).click();
|
||||
await page.getByRole("radiogroup", { name: "Darstellung" }).getByRole("radio", { name: "Dunkel" }).click();
|
||||
await expectMode(page, "dark");
|
||||
await page.emulateMedia({ colorScheme: "light" });
|
||||
await expectMode(page, "dark");
|
||||
expect(await page.evaluate(() => getComputedStyle(document.querySelector("header")!).backgroundColor)).toBe("rgb(10, 17, 29)");
|
||||
expect(await page.evaluate(() => getComputedStyle(document.querySelector("header")!).backgroundColor)).toBe("rgb(18, 20, 23)");
|
||||
|
||||
// Anmeldeseite (ohne Spielstand) folgt der Wahl ebenso.
|
||||
await page.context().clearCookies();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// iPhone-Statusleiste (black-translucent): Mit simulierter Notch (--tf-safe-top = 47 px, sonst env(safe-area-inset-top))
|
||||
// rutscht nichts unter Uhr/Notch – weder die Kopfleiste noch Bildschirme ohne Kopfleiste (Anmeldung) oder Blätter;
|
||||
// der Streifen darüber trägt die Farbe der Kopfleiste. Dazu das Gebäudeblatt: „+69/h“ groß ohne Umbruch, Rohstoff
|
||||
// der Streifen darüber trägt den Tintenton der Statusleiste (theme.css --tf-statusbar). Dazu das Gebäudeblatt: „+69/h“ groß ohne Umbruch, Rohstoff
|
||||
// klein darunter (390 px, hell und dunkel). Bildschirmfotos unter /tmp/tf-lek/.
|
||||
import { mkdirSync } from "node:fs";
|
||||
import type { Page } from "@playwright/test";
|
||||
@@ -9,7 +9,7 @@ import { setBuildings, setResources } from "./game.ts";
|
||||
|
||||
const DIR = "/tmp/tf-lek";
|
||||
const INSET = 47;
|
||||
const HEAD = { light: "rgb(20, 36, 58)", dark: "rgb(10, 17, 29)" };
|
||||
const HEAD = { light: "rgb(26, 34, 48)", dark: "rgb(18, 20, 23)" };
|
||||
|
||||
async function notch(page: Page) {
|
||||
await page.addInitScript((px) => {
|
||||
|
||||
+3
-3
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
||||
<meta name="theme-color" content="#14243a" />
|
||||
<meta name="theme-color" content="#1a2230" />
|
||||
<!-- Hell/Dunkel vor dem ersten Bild setzen (kein Flackern): Wahl aus localStorage „tf-theme“ (light|dark|system),
|
||||
sonst Systemeinstellung. lib/theme.ts hält es danach aktuell; Farben wie THEME_COLOR dort. -->
|
||||
<script>
|
||||
@@ -16,12 +16,12 @@
|
||||
var r = document.documentElement;
|
||||
r.setAttribute("data-theme", d ? "dark" : "light");
|
||||
var m = document.querySelector('meta[name="theme-color"]');
|
||||
if (m) m.setAttribute("content", d ? "#0a111d" : "#14243a");
|
||||
if (m) m.setAttribute("content", d ? "#121417" : "#1a2230");
|
||||
})();
|
||||
</script>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<!-- Dunkle Statusleiste: Inhalt reicht bis unter Uhr/Notch; #root polstert oben um env(safe-area-inset-top),
|
||||
der Streifen .tf-statusbar darunter trägt die Farbe der Kopfleiste (styles.css). -->
|
||||
der Streifen .tf-statusbar darunter trägt den Tintenton der Statusleiste (theme.css --tf-statusbar). -->
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<link rel="manifest" href="/manifest.webmanifest" />
|
||||
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"name":"@tidefront/web","private":true,"version":"0.2.0","type":"module","scripts":{"dev":"vite","build":"vite build"},"dependencies":{"@fontsource/fraunces":"^5.3.0","@fontsource/ibm-plex-mono":"^5.3.0","@fontsource/ibm-plex-sans":"^5.3.0","@tanstack/react-query":"^5.108.4","@trpc/client":"^11.31.4","@trpc/tanstack-react-query":"^11.31.4","modern-screenshot":"^4.7.0","pixi.js":"^8.23.0","react":"^19.3.1","react-dom":"^19.3.1"},"devDependencies":{"@tailwindcss/vite":"^4.3.5","@types/react":"^19.3.3","@types/react-dom":"^19.3.0","@vitejs/plugin-react":"^6.3.0","tailwindcss":"^4.3.5","vite":"^8.4.0"}}
|
||||
{"name":"@tidefront/web","private":true,"version":"0.2.0","type":"module","scripts":{"dev":"vite","build":"vite build"},"dependencies":{"@fontsource/inter":"^5.3.0","@fontsource/jetbrains-mono":"^5.3.0","@fontsource/newsreader":"^5.3.0","@tanstack/react-query":"^5.108.4","@trpc/client":"^11.31.4","@trpc/tanstack-react-query":"^11.31.4","modern-screenshot":"^4.7.0","pixi.js":"^8.23.0","react":"^19.3.1","react-dom":"^19.3.1"},"devDependencies":{"@tailwindcss/vite":"^4.3.5","@types/react":"^19.3.3","@types/react-dom":"^19.3.0","@vitejs/plugin-react":"^6.3.0","tailwindcss":"^4.3.5","vite":"^8.4.0"}}
|
||||
+11
-11
@@ -1,18 +1,18 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
||||
<defs>
|
||||
<pattern id="h" width="10" height="10" patternUnits="userSpaceOnUse" patternTransform="rotate(45)"><rect width="10" height="10" fill="#f4eee1"/><path d="M0 0 V10" stroke="#18273a" stroke-width="2.2"/></pattern>
|
||||
<pattern id="h" width="10" height="10" patternUnits="userSpaceOnUse" patternTransform="rotate(45)"><rect width="10" height="10" fill="#f5f1e8"/><path d="M0 0 V10" stroke="#1a2230" stroke-width="2.2"/></pattern>
|
||||
</defs>
|
||||
<rect width="512" height="512" fill="#f4eee1"/>
|
||||
<circle cx="256" cy="256" r="178" fill="#fbf8f0" stroke="#18273a" stroke-width="7"/>
|
||||
<circle cx="256" cy="256" r="152" fill="none" stroke="#18273a" stroke-width="3"/>
|
||||
<g stroke="#18273a" stroke-width="3">
|
||||
<rect width="512" height="512" fill="#f5f1e8"/>
|
||||
<circle cx="256" cy="256" r="178" fill="#fffdf7" stroke="#1a2230" stroke-width="7"/>
|
||||
<circle cx="256" cy="256" r="152" fill="none" stroke="#1a2230" stroke-width="3"/>
|
||||
<g stroke="#1a2230" stroke-width="3">
|
||||
<path d="M256 104 V120 M256 392 V408 M104 256 H120 M392 256 H408"/>
|
||||
<path d="M148.5 148.5 L159.8 159.8 M352.2 352.2 L363.5 363.5 M363.5 148.5 L352.2 159.8 M159.8 352.2 L148.5 363.5"/>
|
||||
</g>
|
||||
<path d="M256 256 L186 186 L256 230 Z M256 256 L326 326 L256 282 Z" fill="url(#h)" stroke="#18273a" stroke-width="4" stroke-linejoin="round"/>
|
||||
<path d="M256 256 L326 186 L282 256 Z M256 256 L186 326 L230 256 Z" fill="#fbf8f0" stroke="#18273a" stroke-width="4" stroke-linejoin="round"/>
|
||||
<path d="M256 92 L284 256 L256 420 L228 256 Z" fill="#18273a"/>
|
||||
<path d="M92 256 L256 228 L420 256 L256 284 Z" fill="url(#h)" stroke="#18273a" stroke-width="5" stroke-linejoin="round"/>
|
||||
<path d="M256 92 L284 256 L228 256 Z" fill="#a8331f"/>
|
||||
<circle cx="256" cy="256" r="15" fill="#fbf8f0" stroke="#18273a" stroke-width="5"/>
|
||||
<path d="M256 256 L186 186 L256 230 Z M256 256 L326 326 L256 282 Z" fill="url(#h)" stroke="#1a2230" stroke-width="4" stroke-linejoin="round"/>
|
||||
<path d="M256 256 L326 186 L282 256 Z M256 256 L186 326 L230 256 Z" fill="#fffdf7" stroke="#1a2230" stroke-width="4" stroke-linejoin="round"/>
|
||||
<path d="M256 92 L284 256 L256 420 L228 256 Z" fill="#1a2230"/>
|
||||
<path d="M92 256 L256 228 L420 256 L256 284 Z" fill="url(#h)" stroke="#1a2230" stroke-width="5" stroke-linejoin="round"/>
|
||||
<path d="M256 92 L284 256 L228 256 Z" fill="#b3361f"/>
|
||||
<circle cx="256" cy="256" r="15" fill="#fffdf7" stroke="#1a2230" stroke-width="5"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -7,8 +7,8 @@
|
||||
"scope": "/",
|
||||
"display": "standalone",
|
||||
"orientation": "portrait",
|
||||
"background_color": "#f4efe4",
|
||||
"theme_color": "#14243a",
|
||||
"background_color": "#f5f1e8",
|
||||
"theme_color": "#1a2230",
|
||||
"icons": [
|
||||
{ "src": "/icon.svg", "sizes": "any", "type": "image/svg+xml", "purpose": "any" },
|
||||
{ "src": "/icon-192.png", "sizes": "192x192", "type": "image/png" },
|
||||
|
||||
@@ -145,7 +145,7 @@ export function BattleLog({ b, names, role, protectedPerResource = null, salvage
|
||||
<section className="text-center pb-3 mb-3 border-b border-rule">
|
||||
<div className="font-display text-[11px] uppercase tracking-[0.22em] text-ink2">Kampfbericht · Logbuch</div>
|
||||
<div className="flex items-center gap-2 mx-10 mt-2" aria-hidden="true">
|
||||
<i className="flex-1 border-t-2 border-ink" /><span className="diamond bg-siegel" /><i className="flex-1 border-t-2 border-ink" />
|
||||
<i className="flex-1 border-t-2 border-ink" /><span className="diamond bg-ink" /><i className="flex-1 border-t-2 border-ink" />
|
||||
</div>
|
||||
<h2 className={`font-serif italic text-[46px] leading-none mt-1.5 mb-1 ${won ? "text-ink" : "text-siegel"}`}>{won ? "Sieg" : "Niederlage"}</h2>
|
||||
<div className="font-serif text-[15px]">{names[0]} <em className="text-ink2">gegen</em> {names[1]}</div>
|
||||
|
||||
@@ -33,9 +33,9 @@ export function FilterChips<T extends string>({ items, value, onChange, label: a
|
||||
return (
|
||||
<button key={t.id} type="button" role="radio" aria-checked={on} tabIndex={i === focusIdx ? 0 : -1}
|
||||
onClick={() => onChange(t.id)} onKeyDown={onKey}
|
||||
className={`tap min-h-9 rounded-full border px-3 py-1 text-[13px] font-serif inline-flex items-center gap-1.5 whitespace-nowrap ${on ? "border-accent bg-accent text-on-accent" : "border-rule bg-card text-ink2"}`}>
|
||||
className={`tap min-h-9 rounded-[2px] border px-3 py-1 text-[13px] font-semibold inline-flex items-center gap-1.5 whitespace-nowrap ${on ? "border-ink bg-ink text-paper" : "border-rule text-ink2"}`}>
|
||||
<span>{t.label}</span>
|
||||
{!!t.badge && <span className={`min-w-5 h-5 px-1 rounded-full text-[11px] font-sans mono grid place-items-center ${on ? "bg-on-accent text-accent" : "bg-siegel text-on-strong"}`}>{t.badge}</span>}
|
||||
{!!t.badge && <span className={`min-w-5 h-5 px-1 rounded-full text-[11px] mono grid place-items-center ${on ? "bg-paper text-ink" : "bg-accent text-on-accent"}`}>{t.badge}</span>}
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -79,7 +79,7 @@ export function FinaleBanner({ e, onMap }: { e: WorldEventInfo; onMap: () => voi
|
||||
const f = e.finale!;
|
||||
const announced = e.status === "announced";
|
||||
return (
|
||||
<button type="button" onClick={onMap} data-testid="finale-banner" className="tap w-full text-left rounded-xl bg-red-950 border border-siegel border-l-4 p-3 text-sm">
|
||||
<button type="button" onClick={onMap} data-testid="finale-banner" className="tap w-full text-left rounded-xl bg-red-950 border border-siegel border-l-[7px] p-3 text-sm">
|
||||
<strong className="text-siegel uppercase font-display text-xs">Saisonfinale: Kartell-Armada {announced ? "angekündigt" : "vor der Küste"}</strong>
|
||||
<div className="font-serif text-lg leading-tight">
|
||||
{announced ? <>erscheint in <span className="mono">{fmtDuration(e.activeAtMs - now)}</span></> : <>zieht ab in <span className="mono">{fmtDuration(e.endsAtMs - now)}</span></>}
|
||||
|
||||
@@ -27,7 +27,7 @@ export function SabotageBanner({ base, now }: { base: BaseData; now: number }) {
|
||||
const s = base.intel?.sabotage;
|
||||
if (!s || s.untilMs <= now) return null;
|
||||
return (
|
||||
<div className="rounded-xl bg-red-950 border border-siegel border-l-4 p-3 mb-3 flex gap-3 items-center" role="status">
|
||||
<div className="rounded-xl bg-red-950 border border-siegel border-l-[7px] p-3 mb-3 flex gap-3 items-center" role="status">
|
||||
<Icon id="sabotage" size={40} />
|
||||
<div className="text-sm">
|
||||
<strong className="text-siegel uppercase font-display text-xs">Sabotage: {label(s.target)}</strong>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
// Hafenpapier: schlichte Strich-Symbole (24er Raster, Entwurf V1) für Zustandsmarken, Rubriken und Werkzeugknöpfe.
|
||||
// Immer aria-hidden – die Bedeutung steht daneben als Text (Zustand nie nur über Farbe oder Symbol).
|
||||
const PATHS = {
|
||||
anchor: <><circle cx="12" cy="5" r="2" /><path d="M12 7v14" /><path d="M8 11h8" /><path d="M4 14a8 8 0 0 0 16 0" /></>,
|
||||
arrow: <><path d="M5 12h14" /><path d="M13 6l6 6-6 6" /></>,
|
||||
recall: <><path d="M9 14l-5-5 5-5" /><path d="M4 9h10a6 6 0 0 1 0 12h-3" /></>,
|
||||
pin: <><path d="M12 21s-7-6.2-7-11a7 7 0 0 1 14 0c0 4.8-7 11-7 11z" /><circle cx="12" cy="10" r="2.5" /></>,
|
||||
back: <path d="M15 5l-7 7 7 7" />,
|
||||
alert: <><path d="M12 3l9.5 17h-19z" /><path d="M12 10v4.5" /><path d="M12 17.5v.5" /></>,
|
||||
shield: <path d="M12 3l7 3v5c0 5-3.5 8.5-7 10-3.5-1.5-7-5-7-10V6z" />,
|
||||
flag: <><path d="M6 21V4" /><path d="M6 4h11l-3 4 3 4H6" /></>,
|
||||
compass: <><circle cx="12" cy="12" r="8.5" /><path d="M15.5 8.5l-2 5-5 2 2-5z" /></>,
|
||||
clock: <><circle cx="12" cy="12" r="8.5" /><path d="M12 7.5V12l3 2" /></>,
|
||||
doc: <><path d="M6 3h9l4 4v14H6z" /><path d="M15 3v4h4" /><path d="M9 12h7" /><path d="M9 16h7" /></>,
|
||||
} as const;
|
||||
|
||||
export type LineIconId = keyof typeof PATHS;
|
||||
|
||||
export function LineIcon({ id, size = 16, stroke = 1.8, className }: { id: LineIconId; size?: number; stroke?: number; className?: string }) {
|
||||
return (
|
||||
<svg aria-hidden="true" width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={stroke}
|
||||
strokeLinecap="round" strokeLinejoin="round" className={`shrink-0 ${className ?? ""}`}>
|
||||
{PATHS[id]}
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// Hauptnavigation: fünf Reiter, mobil als Leiste unten, am Desktop (ab 1024 px) als Leiste links.
|
||||
// Eine Zahl je Reiter (UI-02/UI-17): Basis = neue dringende Einträge der Lage (inkl. abholbereiter Belohnungen;
|
||||
// rot pulsierend bei Angriff), Meldungen = ungelesene Berichte und Nachrichten. Die Bedeutung steht im aria-label
|
||||
// Akzentblau, nur bei Angriff rot pulsierend – Rot nur für Alarm), Meldungen = ungelesene Berichte und Nachrichten. Die Bedeutung steht im aria-label
|
||||
// des Knopfs (UI-18), nicht nur im title.
|
||||
import type { ReactNode } from "react";
|
||||
import { Icon } from "../icons.tsx";
|
||||
@@ -44,7 +44,7 @@ export function NavBar({ tab, active, rail, badges, onPick, mapBig, footer }: {
|
||||
data-testid={rail ? "nav-rail" : "nav-bottom"}
|
||||
className={rail
|
||||
? "w-[96px] shrink-0 flex flex-col gap-1 px-1.5 pt-3 bg-card border-r border-rule overflow-y-auto"
|
||||
: "grid grid-cols-5 bg-paper border-t-2 border-ink"}
|
||||
: "grid grid-cols-5 bg-paper border-t border-ink px-1"}
|
||||
style={rail ? undefined : { paddingBottom: "env(safe-area-inset-bottom)" }}
|
||||
>
|
||||
{TABS.map((t, i) => {
|
||||
@@ -60,16 +60,16 @@ export function NavBar({ tab, active, rail, badges, onPick, mapBig, footer }: {
|
||||
aria-label={badge ? `${name}, ${badge.text}` : name}
|
||||
title={rail ? `${badge ? `${name} – ${badge.text}` : name} (Taste ${i + 1})` : badge?.text}
|
||||
aria-keyshortcuts={String(i + 1)}
|
||||
className={`tap relative flex flex-col items-center justify-center leading-tight ${rail ? "py-2.5 rounded-2xl text-[13px]" : "pt-1.5 pb-1 text-[12px]"} ${on ? `text-accent-ink font-semibold ${rail ? "bg-nav-sel" : ""}` : "text-ink2"}`}
|
||||
className={`tap relative flex flex-col items-center justify-center leading-tight ${rail ? "py-2.5 rounded-[3px] text-[13px]" : "pt-2 pb-1 text-[11px] tracking-[-0.005em]"} ${on ? `text-ink font-bold ${rail ? "bg-nav-sel" : ""}` : "text-ink2 font-medium"}`}
|
||||
aria-current={on && !toggle ? "page" : undefined}
|
||||
aria-pressed={toggle ? on : undefined}
|
||||
>
|
||||
{on && !rail && <span className="absolute -top-[2px] inset-x-[22%] h-[2px] bg-accent" />}
|
||||
<Icon id={t.icon} size={24} />
|
||||
<span className="mt-0.5 whitespace-nowrap">{name}</span>
|
||||
<span className="mt-1 whitespace-nowrap">{name}</span>
|
||||
{!rail && <span aria-hidden="true" className={`mt-1 block w-[18px] h-[2px] ${on ? "bg-ink" : "bg-transparent"}`} />}
|
||||
{badge && (badge.n !== null ? (
|
||||
<span data-testid={`nav-badge-${t.id}`} aria-hidden="true"
|
||||
className={`absolute top-1 right-[18%] min-w-5 h-5 px-1 rounded-full ${badge.alarm ? "bg-siegel pulse" : t.id === "basis" ? "bg-messing" : "bg-siegel"} text-on-strong text-[11px] mono grid place-items-center`}>{badge.n}</span>
|
||||
className={`absolute top-1 right-[18%] min-w-5 h-5 px-1 rounded-full ${badge.alarm ? "bg-siegel text-on-strong pulse" : "bg-accent text-on-accent"} text-[11px] mono font-semibold grid place-items-center`}>{badge.n}</span>
|
||||
) : (
|
||||
<span data-testid={`nav-badge-${t.id}`} aria-hidden="true" className="absolute top-1.5 right-[24%] w-3 h-3 rotate-45 bg-siegel pulse" />
|
||||
))}
|
||||
|
||||
@@ -32,7 +32,7 @@ export function BlockadeBanner() {
|
||||
const now = useCountdownNow(b?.endsAtMs);
|
||||
if (!b || b.endsAtMs <= now) return null; // abgelaufen: ausblenden, bis die nächste Abfrage kommt
|
||||
return (
|
||||
<div className="rounded-[3px] bg-card border border-siegel border-l-4 p-3 mb-3 flex gap-3 items-start" role="status">
|
||||
<div className="rounded-[3px] bg-card border border-siegel border-l-[7px] p-3 mb-3 flex gap-3 items-start" role="status">
|
||||
<Icon id="blockade" size={40} />
|
||||
<div className="text-sm">
|
||||
<div className="font-display uppercase text-siegel text-[12px] tracking-wider">Hafen blockiert bis {fmtTime(b.endsAtMs)} · noch {fmtDuration(b.endsAtMs - now)}</div>
|
||||
@@ -48,7 +48,7 @@ export function MineWarning({ col, row, units }: { col: number; row: number; uni
|
||||
const ships = Object.entries(units).some(([id, n]) => n > 0 && !["abfangjaeger", "jagdbomber", "aufklaerungsdrohne"].includes(id));
|
||||
if (!q.data || q.data.length === 0 || !ships) return null;
|
||||
return (
|
||||
<div className="rounded-[3px] border border-siegel border-l-4 bg-card p-2 mb-3 text-sm flex gap-2 items-start" role="alert">
|
||||
<div className="rounded-[3px] border border-siegel border-l-[7px] bg-card p-2 mb-3 text-sm flex gap-2 items-start" role="alert">
|
||||
<Icon id="mine" size={28} />
|
||||
<div>
|
||||
<strong className="text-siegel">Minen auf der Route:</strong> {q.data.length} bekanntes Feld{q.data.length === 1 ? "" : "er"} ({q.data.map((f) => `Stärke ${f.strength}, ${f.owner}`).join("; ")}).
|
||||
|
||||
@@ -45,7 +45,7 @@ export function ProgressChip({ onOpen }: { onOpen: () => void }) {
|
||||
<button type="button" onClick={onOpen} data-testid="progress-chip" title="Saison öffnen"
|
||||
aria-label={`${text} – Saison öffnen`}
|
||||
className="tap shrink-0 self-center rounded-2xl border border-ink2 px-3 h-10 text-[13px] whitespace-nowrap flex items-center gap-1.5">
|
||||
{/* Seekarte 2.0: Rang-Chip – Platz in Fraunces, Rest leise. */}
|
||||
{/* Seekarte 2.0: Rang-Chip – Platz in Newsreader, Rest leise. */}
|
||||
<span className="font-serif font-bold text-[14px]">Platz {p.rank} von {p.of}</span>
|
||||
<span className="text-ink2 hidden xl:inline">{text.split(" · ").slice(1).map((t) => `· ${t}`).join(" ")}</span>
|
||||
<span className="text-ink2 xl:hidden">{p.day !== null ? `· Tag ${p.day}/${p.days}` : ""}</span>
|
||||
|
||||
@@ -97,7 +97,7 @@ function Tile({ icon, title, value, count, ready, onOpen }: { icon: string; titl
|
||||
<span className="w-full mt-1"><Bar value={value} tone={value >= 1 ? "green" : "brass"} /></span>
|
||||
<span className="mono text-[11px] text-ink2 mt-0.5">{count}</span>
|
||||
{ready > 0 && (
|
||||
<span className="absolute -top-2 -right-1.5 rounded-full bg-siegel text-on-strong text-[11px] px-1.5 py-0.5 leading-none shadow-sm whitespace-nowrap">
|
||||
<span className="absolute -top-2 -right-1.5 rounded-full bg-accent text-on-accent text-[11px] px-1.5 py-0.5 leading-none shadow-sm whitespace-nowrap">
|
||||
{ready} abholbereit
|
||||
</span>
|
||||
)}
|
||||
|
||||
@@ -106,7 +106,7 @@ function Block({ b }: { b: ReportBlock }) {
|
||||
case "list":
|
||||
return (
|
||||
<ul className="my-1.5 space-y-1 text-[13px]">
|
||||
{b.items.map((t, i) => <li key={i} className="flex gap-2"><span className="diamond bg-siegel mt-1.5 shrink-0" /><span className="min-w-0 break-words">{t}</span></li>)}
|
||||
{b.items.map((t, i) => <li key={i} className="flex gap-2"><span className="diamond bg-ink mt-1.5 shrink-0" /><span className="min-w-0 break-words">{t}</span></li>)}
|
||||
</ul>
|
||||
);
|
||||
case "text": return <p className={`text-[14px] my-1.5 break-words ${b.tone ? TONE_TEXT[b.tone] : ""} ${b.tone === "muted" ? "text-[13px]" : "font-serif"}`}>{b.text}</p>;
|
||||
|
||||
@@ -22,9 +22,9 @@ const sum = (o: Record<string, number>) => Object.values(o).reduce((a, b) => a +
|
||||
const SHORT: Record<string, string> = { stahl: "Stahl", treibstoff: "Treibst.", elektronik: "Elektr.", proviant: "Proviant" };
|
||||
/** Lagerfüllstand ab dem der Balken orange wird (Entwurf: ~85 %). */
|
||||
const WARN_FILL = 0.85;
|
||||
/** Füllstandsbalken: Messing, ab 85 % Warnorange, sinkender Proviant rot. */
|
||||
/** Füllstandsbalken (Hafenpapier): Tinte, ab 85 % Warnorange, sinkender Proviant rot (Alarm). */
|
||||
function fillTone(fill: number, r: string, rate: number): string {
|
||||
return fill >= WARN_FILL ? "bg-[var(--tf-head-warn)]" : r === "proviant" && rate < 0 ? "bg-siegel" : "bg-brass";
|
||||
return fill >= WARN_FILL ? "bg-warn" : r === "proviant" && rate < 0 ? "bg-siegel" : "bg-ink";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -52,16 +52,16 @@ function PowerField({ base, now, onOpen }: { base: BaseData; now: number; onOpen
|
||||
type="button"
|
||||
onClick={onOpen}
|
||||
data-testid="strom-feld"
|
||||
className="relative shrink-0 min-w-[58px] flex flex-col justify-center text-left pl-1.5 border-l border-rule"
|
||||
className="relative shrink-0 min-w-[58px] flex flex-col justify-center gap-[3px] text-left pl-2 border-l border-rule"
|
||||
aria-label={`Strom: ${desc}, ${store}${warn ? ", Mangel droht" : ""} – Versorgung öffnen`}
|
||||
title={`${desc} · ${store}`}
|
||||
>
|
||||
<div className={`text-[13.5px] leading-tight font-semibold truncate flex items-center ${covered ? "font-sans text-[12px]" : "mono"} ${bal < 0 ? "text-siegel" : "text-moos"}`}>
|
||||
<div className={`text-[15px] leading-tight font-semibold truncate flex items-center ${covered ? "font-sans text-[12px]" : "mono"} ${bal < 0 ? "text-siegel" : "text-moos"}`}>
|
||||
<Icon id="strom" size={12} className="shrink-0 -ml-0.5" />{covered ? <span aria-hidden="true">✓</span> : `${sign}${short(Math.abs(bal))}`}
|
||||
</div>
|
||||
<div className="text-[11px] leading-tight mono text-ink2 whitespace-nowrap flex items-center">{second}</div>
|
||||
<div className="h-[3px] mt-[3px] bg-track overflow-hidden" aria-hidden="true">
|
||||
<div className="h-full bg-moos" style={{ width: `${fill * 100}%` }} />
|
||||
<div className="h-[3px] bg-track overflow-hidden" aria-hidden="true">
|
||||
<div className="h-full bg-ink" style={{ width: `${fill * 100}%` }} />
|
||||
</div>
|
||||
{warn && <span className="absolute top-0 right-0 w-[7px] h-[7px] rounded-full bg-siegel border border-paper" data-testid="strom-warnung" title={warn.text} />}
|
||||
</button>
|
||||
@@ -69,8 +69,8 @@ function PowerField({ base, now, onOpen }: { base: BaseData; now: number; onOpen
|
||||
}
|
||||
|
||||
/**
|
||||
* Kopfleiste (Seekarte 2.0: dunkler Streifen in beiden Modi, .tf-head): Hafenwahl (ab zwei Häfen), vier Ressourcen
|
||||
* (Name, Bestand, Rate, Füllstandsbalken – Messing, ab 85 % orange), Stromfeld und Menü.
|
||||
* Kopfleiste (Hafenpapier: Papier mit Tintenlinie unten, .tf-head): Hafenwahl (ab zwei Häfen), vier Ressourcen
|
||||
* (Name, Bestand, Füllstandsbalken – Tinte, ab 85 % Warnorange –, Rate), Stromfeld und Menü.
|
||||
* Desktop (UX-0.43 X-2, Entwurf S5Desktop): Schriftzug, Rohstoffe größer mit Namen und Rate in einer Zeile,
|
||||
* rechts extra (Rang-Chip) und Menü.
|
||||
*/
|
||||
@@ -79,10 +79,10 @@ export function ResourceBar({ base, asOf, onMenu, onSwitchBase, onPlanFounding,
|
||||
const [menu, setMenu] = useState(false);
|
||||
const now = useNow(); // gemeinsame Uhr: Bestände sekündlich hochgerechnet
|
||||
return (
|
||||
<header className="tf-head sticky top-0 z-30">{/* Abstand zur Statusleiste: #root (styles.css) */}
|
||||
<header className="tf-head sticky top-0 z-30 border-b border-ink">{/* Abstand zur Statusleiste: #root (styles.css) */}
|
||||
<HarborSwitcher base={base} now={now} onSwitch={onSwitchBase} onPlanFounding={onPlanFounding} />
|
||||
<div className={desktop ? "flex flex-wrap items-stretch gap-x-4 gap-y-2 pl-5 pr-3 py-2.5" : "flex items-stretch gap-2 pl-3 pr-2 py-2"}>
|
||||
{desktop && <div className="hidden min-[1400px]:block self-center shrink-0 font-serif font-bold text-[20px] tracking-[0.08em]" aria-hidden="true">TIDEFRONT</div>}
|
||||
<div className={desktop ? "flex flex-wrap items-stretch gap-x-4 gap-y-2 pl-5 pr-3 py-2.5" : "flex items-stretch gap-2.5 pl-4 pr-1 pt-2.5 pb-2"}>
|
||||
{desktop && <div className="hidden min-[1400px]:block self-center shrink-0 font-serif text-[22px] tracking-[0.06em]" aria-hidden="true">TIDEFRONT</div>}
|
||||
{desktop && <div className="flex items-stretch gap-4 xl:gap-5" role="group" aria-label="Rohstoffe">{RES_ORDER.map((r) => {
|
||||
const v = liveAmount(base, asOf, now, r);
|
||||
const rate = base.rates[r] ?? 0;
|
||||
@@ -91,7 +91,7 @@ export function ResourceBar({ base, asOf, onMenu, onSwitchBase, onPlanFounding,
|
||||
return (
|
||||
<button type="button" key={r} onClick={() => setOpen(r)} data-testid={`res-${r}`} className="tap w-[118px] xl:w-[136px] flex flex-col justify-center text-left mono" aria-label={`${label(r)} ${fmtNum(v)}, ${fmtNum(rate)} pro Stunde, Lager zu ${Math.round(fill * 100)} % – Details`}>
|
||||
<div className="flex justify-between gap-1 text-[11px] leading-tight text-ink2"><span className="truncate">{label(r)}</span><span className={rate < 0 ? "text-siegel" : "text-moos"}>{rate >= 0 ? "+" : ""}{short(rate)}/h</span></div>
|
||||
<div className={`text-[18px] leading-tight ${warn ? "text-messing" : ""}`}>{short(v)}</div>
|
||||
<div className={`text-[18px] leading-tight font-semibold ${warn ? "text-warn-ink" : ""}`}>{short(v)}</div>
|
||||
<div className="h-[4px] mt-1 bg-track overflow-hidden" aria-hidden="true">
|
||||
<div className={`h-full ${fillTone(fill, r, rate)}`} style={{ width: `${fill * 100}%` }} />
|
||||
</div>
|
||||
@@ -104,25 +104,24 @@ export function ResourceBar({ base, asOf, onMenu, onSwitchBase, onPlanFounding,
|
||||
const fill = Math.min(1, v / base.capacity);
|
||||
const full = fill >= 0.999;
|
||||
return (
|
||||
<button type="button" key={r} onClick={() => setOpen(r)} className="flex-1 min-w-0 flex flex-col justify-center text-left mono" aria-label={`${label(r)} ${fmtNum(v)}, ${fmtNum(rate)} je Stunde – Details`}>
|
||||
<div className="text-[10.5px] leading-tight text-ink2 truncate font-sans">{SHORT[r] ?? label(r)}</div>
|
||||
<div className={`text-[14px] leading-tight truncate ${full ? "text-messing" : ""}`}>{short(v)}</div>
|
||||
<div className={`text-[10.5px] leading-tight ${rate < 0 ? "text-siegel" : "text-moos"}`}>
|
||||
{rate >= 0 ? "+" : ""}{short(rate)}/h
|
||||
</div>
|
||||
<div className="h-[3px] mt-[3px] bg-track overflow-hidden" aria-hidden="true">
|
||||
<button type="button" key={r} onClick={() => setOpen(r)} className="flex-1 min-w-0 flex flex-col justify-center gap-[3px] text-left mono" aria-label={`${label(r)} ${fmtNum(v)}, ${fmtNum(rate)} je Stunde – Details`}>
|
||||
<div className="text-[11px] leading-none text-ink2 truncate font-sans font-medium">{SHORT[r] ?? label(r)}</div>
|
||||
<div className={`text-[15.5px] leading-tight font-semibold truncate ${full ? "text-warn-ink" : ""}`}>{short(v)}</div>
|
||||
<div className="h-[3px] bg-track overflow-hidden" aria-hidden="true">
|
||||
<div className={`h-full ${fillTone(fill, r, rate)}`} style={{ width: `${fill * 100}%` }} />
|
||||
</div>
|
||||
<div className={`text-[11px] leading-tight ${rate < 0 ? "text-siegel" : "text-moos"}`}>
|
||||
{rate >= 0 ? "+" : ""}{short(rate)}/h
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
<PowerField base={base} now={now} onOpen={onPower} />
|
||||
{desktop && <div className="flex-1" />}
|
||||
{extra}
|
||||
<button type="button" onClick={() => setMenu(true)} aria-haspopup="dialog" aria-expanded={menu}
|
||||
className="tap shrink-0 self-center h-11 rounded-2xl border border-ink2 text-ink flex flex-col items-center justify-center gap-[3px] px-1">
|
||||
<span aria-hidden className="flex flex-col gap-[3px] w-4">{[0, 1, 2].map((i) => <span key={i} className="block h-[2px] bg-ink rounded-full" />)}</span>
|
||||
<span className="text-[11px] leading-none font-display tracking-[0.04em]">Menü</span>
|
||||
<button type="button" onClick={() => setMenu(true)} aria-haspopup="dialog" aria-expanded={menu} aria-label="Menü"
|
||||
className="tap shrink-0 self-center w-11 h-11 text-ink flex items-center justify-center">
|
||||
<svg aria-hidden="true" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round"><path d="M4 7h16M4 12h16M4 17h16" /></svg>
|
||||
</button>
|
||||
</div>
|
||||
<CatchUpStrip base={base} />{/* Aufholhilfe: Baugutschrift */}
|
||||
|
||||
@@ -54,7 +54,7 @@ export function SeasonEndBanner({ onOpen }: { onOpen: () => void }) {
|
||||
const s = q.data?.season;
|
||||
if (!s || s.endsAtMs - now >= 3 * DAY) return null;
|
||||
return (
|
||||
<button type="button" onClick={onOpen} className="tap w-full text-left rounded-xl p-3 mb-3 border border-siegel border-l-4 bg-red-950 text-sm">
|
||||
<button type="button" onClick={onOpen} className="tap w-full text-left p-3 mb-3 border-y border-rule border-l-[7px] border-l-warn bg-inset text-sm">
|
||||
<strong>Saison {s.number} endet {remaining(s.endsAtMs, now).replace("noch ", "in ")}.</strong>{" "}
|
||||
<span className="text-slate-300">Danach wird die Welt zurückgesetzt. Zur Saison →</span>
|
||||
</button>
|
||||
|
||||
@@ -38,14 +38,14 @@ export function Welcome({ playerId, onDone }: { playerId: number; onDone: () =>
|
||||
};
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 grid place-items-center p-4 bg-ink/50" style={{ paddingTop: "calc(1rem + var(--tf-safe-top))" }} role="dialog" aria-modal="true">
|
||||
<div className="panel rounded-[6px] border-ink p-5 max-w-sm w-full text-center sheet-in">
|
||||
<div className="panel rounded-[2px] bg-card border border-ink p-5 max-w-sm w-full text-center sheet-in">
|
||||
<div className="mx-auto mb-3 w-24 h-24 bg-plate border border-ink grid place-items-center">
|
||||
<Icon id={s.icon} size={64} />
|
||||
</div>
|
||||
<h2 className="font-serif text-2xl mb-2">{s.title}</h2>
|
||||
<p className="text-ink2 leading-relaxed">{s.text}</p>
|
||||
<div className="flex justify-center gap-1.5 my-4">
|
||||
{SLIDES.map((_, i) => <span key={i} className={`diamond ${i === step ? "bg-siegel" : "bg-rule"}`} />)}
|
||||
{SLIDES.map((_, i) => <span key={i} className={`diamond ${i === step ? "bg-ink" : "bg-rule"}`} />)}
|
||||
</div>
|
||||
<div className="flex gap-2">
|
||||
<Button kind="secondary" className="flex-1 !px-2 !tracking-[0.06em]" onClick={close}>Überspringen</Button>
|
||||
|
||||
@@ -89,7 +89,7 @@ export function WorldEventBanner({ onMap }: { onMap: (t: { col: number; row: num
|
||||
return (
|
||||
<div className="mb-3 space-y-2">
|
||||
{ownSiege && (
|
||||
<div className="rounded-xl bg-red-950 border border-siegel border-l-4 p-3 text-sm" role="alert">
|
||||
<div className="rounded-xl bg-red-950 border border-siegel border-l-[7px] p-3 text-sm" role="alert">
|
||||
<strong className="text-siegel uppercase font-display text-xs">Belagerungsring vor deinem Hafen</strong>
|
||||
<div className="font-serif text-lg leading-tight">noch <span className="mono">{fmtDuration(ownSiege.endsAtMs - now)}</span></div>
|
||||
<div className="text-xs text-ink2">Keine Börsenkäufe, Produktion −{Math.round((1 - ownSiege.productionFactor) * 100)} %. Brich den Ring aus einem anderen deiner Häfen oder bitte Mitspieler um Hilfe.</div>
|
||||
@@ -97,7 +97,7 @@ export function WorldEventBanner({ onMap }: { onMap: (t: { col: number; row: num
|
||||
)}
|
||||
{finale && <FinaleBanner e={finale} onMap={() => onMap({ col: finale.col, row: finale.row, eventId: finale.id })} />}
|
||||
{near.map((e) => (
|
||||
<button key={e.id} type="button" onClick={() => onMap({ col: e.col, row: e.row, eventId: e.id })} className="tap w-full text-left rounded-xl bg-card border border-siegel border-l-4 p-3 text-sm">
|
||||
<button key={e.id} type="button" onClick={() => onMap({ col: e.col, row: e.row, eventId: e.id })} className="tap w-full text-left rounded-xl bg-card border border-siegel border-l-[7px] p-3 text-sm">
|
||||
<strong className="text-siegel uppercase font-display text-xs">Weltereignis in der Nähe: {KIND_TITLE[e.kind]}</strong>
|
||||
<div className="text-xs text-ink2">
|
||||
{e.targets.some((t) => t.own) ? "Dein Hafen ist ein Ziel der Großflotte. " : ""}
|
||||
|
||||
@@ -20,7 +20,7 @@ export function FleetHead({ base, balance, onPlan, onTrain }: { base: BaseData;
|
||||
<h2 className="font-display text-[11px] uppercase text-ink2 tracking-[0.16em]">Einheiten daheim</h2>
|
||||
<span className="flex items-center gap-1.5 text-xs text-ink2" aria-label={`Missionsplätze ${used} von ${slots} belegt`} title="Missionsplätze">
|
||||
<span aria-hidden="true" className="tracking-[0.15em] text-[13px] leading-none">
|
||||
{Array.from({ length: slots }, (_, i) => <span key={i} className={i < used ? "text-siegel" : "text-ink2"}>{i < used ? "●" : "○"}</span>)}
|
||||
{Array.from({ length: slots }, (_, i) => <span key={i} className={i < used ? "text-accent-ink" : "text-ink2"}>{i < used ? "●" : "○"}</span>)}
|
||||
</span>
|
||||
<span className="mono">{used}/{slots}</span>
|
||||
</span>
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
// Truppen → Einsatz, „Unterwegs“: laufende Missionen als Karten (Art, Ziel, Fortschritt Hin-/Rückfahrt, Restzeit,
|
||||
// Verband, Zurückrufen). Leer: ruhiger Hafen als Zeichnung, ein Satz und ein Knopf.
|
||||
// Truppen → Einsatz, „Unterwegs“: laufende Missionen als Logbuch-Einträge (Zustandsstreifen, Art, Ziel, Restzeit groß,
|
||||
// Fortschritt Hin-/Rückfahrt, Verband, Ladung im Spaltensatz, Zurückrufen). Leer: ruhiger Hafen als Zeichnung, ein Satz und ein Knopf.
|
||||
import { useState } from "react";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { trpc, type BaseData, type MapData } from "../../lib/trpc.ts";
|
||||
import { departureKind } from "../../lib/departure.ts";
|
||||
import type { Target } from "../../App.tsx";
|
||||
import { label } from "../../lib/names.ts";
|
||||
import { fmtNum, label } from "../../lib/names.ts";
|
||||
import { fmtDuration } from "../../lib/time.ts";
|
||||
import { Icon } from "../../icons.tsx";
|
||||
import { Badge, Bar, Card, SmallButton, UnitChips } from "../../ui.tsx";
|
||||
import { Bar, Card, SmallButton, UnitChips } from "../../ui.tsx";
|
||||
import { LineIcon, type LineIconId } from "../LineIcon.tsx";
|
||||
import { spyKindText } from "../SpyPlan.tsx"; // Nachrichtendienst
|
||||
import { RecallSheet, missionHex, missionPhase, targetName } from "../MissionSheet.tsx";
|
||||
import { OpsMissionLine } from "../AllianceOps.tsx"; // Allianz-Ops
|
||||
@@ -23,13 +24,18 @@ function title(m: MissionData): string {
|
||||
return m.spy ? spyKindText(m.spy.kind) : m.allianceRaidId ? label("sammelangriff") : label(m.type);
|
||||
}
|
||||
|
||||
function phaseBadge(m: MissionData, air: boolean) {
|
||||
if (m.status === "outbound") return <Badge tone="sea">{air ? "Hinflug" : "Hinfahrt"}</Badge>;
|
||||
if (m.status === "returning") return <Badge tone={m.recalled ? "brass" : "slate"}>{m.recalled ? "zurückgerufen" : air ? "Rückflug" : "Rückfahrt"}</Badge>;
|
||||
if (m.status === "holding" && m.patrol) return <Badge tone="sea">auf Station</Badge>; // Lagebild Stufe 2
|
||||
if (m.status === "holding") return <Badge tone="red">Blockade</Badge>;
|
||||
if (m.status === "stationed") return <Badge tone="green">vor Ort</Badge>;
|
||||
if (m.status === "staged") return <Badge tone="brass">bereit</Badge>;
|
||||
/** Zustand einer Mission: Streifen links (7 px), Symbol und Wort in der Zustandsfarbe – nie nur Farbe (Hafenpapier). */
|
||||
interface Phase { word: string; icon: LineIconId; text: string; stripe: string }
|
||||
|
||||
function phaseOf(m: MissionData, air: boolean): Phase | null {
|
||||
if (m.status === "outbound") return { word: air ? "Hinflug" : "Hinfahrt", icon: "arrow", text: "text-accent-ink", stripe: "tf-stripe-frame" };
|
||||
if (m.status === "returning") return m.recalled
|
||||
? { word: "zurückgerufen", icon: "recall", text: "text-messing", stripe: "tf-stripe-hatch" }
|
||||
: { word: air ? "Rückflug" : "Rückfahrt", icon: "recall", text: "text-accent-ink", stripe: "tf-stripe-hatch" };
|
||||
if (m.status === "holding" && m.patrol) return { word: "auf Station", icon: "compass", text: "text-accent-ink", stripe: "bg-accent" }; // Lagebild Stufe 2
|
||||
if (m.status === "holding") return { word: "Blockade", icon: "shield", text: "text-ink", stripe: "bg-ink" };
|
||||
if (m.status === "stationed") return { word: "vor Ort", icon: "anchor", text: "text-moos", stripe: "bg-moos" };
|
||||
if (m.status === "staged") return { word: "bereit", icon: "flag", text: "text-messing", stripe: "bg-brass" };
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -47,7 +53,7 @@ export function MissionsCard({ base, map, now, onShowOnMap }: { base: BaseData;
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<ul className="space-y-2">
|
||||
<ul>
|
||||
{base.missions.map((m) => (
|
||||
<MissionItem key={m.id} m={m} base={base} map={map} now={now} onShowOnMap={onShowOnMap} onRecall={() => setRecallId(m.id)} />
|
||||
))}
|
||||
@@ -62,46 +68,70 @@ function MissionItem({ m, base, map, now, onShowOnMap, onRecall }: { m: MissionD
|
||||
const meta = useQuery({ ...trpc.meta.queryOptions(), staleTime: Infinity });
|
||||
const moving = m.status === "outbound" || m.status === "returning";
|
||||
const ph = missionPhase(m, now);
|
||||
const phase = phaseOf(m, departureKind(m.units ?? {}, meta.data?.balance) === "luft");
|
||||
const left = (m.status === "outbound" ? m.arriveAtMs : m.returnAtMs) - now;
|
||||
const where = m.target.kind === "kartell" ? "Kartell-Informanten" : targetName(map, m.target.col, m.target.row);
|
||||
const units = m.status === "returning" || m.status === "stationed" ? m.returning : m.units;
|
||||
const cargo = Object.entries(m.cargoHome ?? {}).filter(([, v]) => v > 0);
|
||||
const out = m.status === "outbound";
|
||||
// Hafenpapier (Entwurf V1-Einsatz): Rubrikzeile (Art · Zustand), Ziel in Newsreader, Restzeit groß, Ladung im Spaltensatz.
|
||||
return (
|
||||
<li className="rounded-[3px] border border-rule bg-card p-2.5" data-mission={m.id}>
|
||||
<div className="flex items-start gap-2.5">
|
||||
<div className="grid place-items-center w-11 h-11 border border-rule bg-plate rounded-[3px] shrink-0"><Icon id={m.type} size={34} /></div>
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<strong className="font-serif text-[15px] leading-tight truncate">{title(m)}</strong>
|
||||
{phaseBadge(m, departureKind(m.units ?? {}, meta.data?.balance) === "luft")}
|
||||
</div>
|
||||
<div className="text-xs text-ink2 truncate">→ {where}</div>
|
||||
<li className="grid grid-cols-[7px_minmax(0,1fr)] gap-3.5 py-3.5 border-b border-rule last:border-b-0" data-mission={m.id}>
|
||||
<div aria-hidden="true" className={`tf-stripe ${phase?.stripe ?? "bg-rule"}`} />
|
||||
<div className="min-w-0">
|
||||
<div className="flex items-center justify-between gap-2 text-[11px] leading-none font-bold uppercase tracking-[0.08em]">
|
||||
<span className="text-ink2 truncate inline-flex items-center gap-1.5"><Icon id={m.type} size={18} />{title(m)}</span>
|
||||
{phase && <span className={`shrink-0 text-[13px] inline-flex items-center gap-1.5 ${phase.text}`}><LineIcon id={phase.icon} size={16} stroke={2.2} />{phase.word}</span>}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{moving && (
|
||||
<div className="mt-2">
|
||||
<div className="flex items-center justify-between gap-2 text-xs mb-1">
|
||||
<span className="mono">{m.status === "outbound" ? "Ankunft" : "Zurück"} in {fmtDuration(Math.max(0, left))}</span>
|
||||
<span className="text-ink2" aria-hidden="true">{m.campaign ? `Ziel ${m.campaign.index + 1} von ${m.campaign.targets.length}` : m.status === "outbound" ? "Hafen → Ziel" : "Ziel → Hafen"}</span>
|
||||
<div className="flex items-center justify-between gap-2.5 mt-1.5">
|
||||
<div className="min-w-0">
|
||||
<div className="font-serif font-medium text-[22px] leading-[1.15] truncate">→ {where}</div>
|
||||
{moving && (
|
||||
<div className="mt-1 leading-none">
|
||||
<span className="block text-[12px] text-ink2 mb-0.5">{out ? "Ankunft in " : "Zurück in "}</span>
|
||||
<span className="mono font-semibold text-[28px] tracking-[-0.02em] leading-[1.1]">{fmtDuration(Math.max(0, left))}</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<Bar value={ph.progress} tone={m.status === "returning" ? "brass" : "sea"} />
|
||||
<button type="button" aria-label="Auf der Karte" title="Auf der Karte"
|
||||
onClick={() => onShowOnMap(moving ? { ...missionHex(m, { col: base.col, row: base.row }, now), missionId: m.id } : { col: m.target.col, row: m.target.row })}
|
||||
className="tap w-11 h-11 shrink-0 grid place-items-center rounded-[2px] border border-ink text-ink">
|
||||
<LineIcon id="pin" size={20} stroke={1.6} />
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="text-xs mt-2"><UnitChips counts={units} /></div>
|
||||
{m.cargoHome && Object.values(m.cargoHome).some((v) => v > 0) && (
|
||||
<div className="text-xs text-brass-400 mt-1">Ladung: <UnitChips counts={m.cargoHome} /></div>
|
||||
)}
|
||||
{moving && (
|
||||
<div className="mt-2.5">
|
||||
<Bar value={ph.progress} />
|
||||
<div className="flex justify-between text-[11px] text-ink2 mt-1" aria-hidden="true">
|
||||
{m.campaign ? <span>Ziel {m.campaign.index + 1} von {m.campaign.targets.length}</span> : <><span>{out ? "Hafen" : "Ziel"}</span><span>{out ? "Ziel" : "Hafen"}</span></>}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{m.type === "besetzen" && m.status === "stationed" ? <div className="text-sm mt-1"><FieldMissionLine missionId={m.id} /></div>
|
||||
: m.status === "staged" || m.status === "stationed" ? <div className="text-sm mt-1"><OpsMissionLine m={m} /></div>
|
||||
: m.status === "holding" && m.patrol ? <PatrolLine m={m} now={now} />
|
||||
: m.status === "holding" ? <div className="text-sm mt-1"><div className="text-sea-300">Blockade läuft</div><LiftBlockade missionId={m.id} /></div>
|
||||
: null}
|
||||
<div className="text-[13px] mt-2"><UnitChips counts={units} /></div>
|
||||
{cargo.length > 0 && (
|
||||
<div className="mt-2.5">
|
||||
<div className="font-serif italic font-medium text-[15px] text-ink2">Ladung</div>
|
||||
<div className="tf-cargo mt-1">
|
||||
{cargo.map(([id, v]) => (
|
||||
<div key={id} className="flex flex-col gap-0.5"><span className="mono font-semibold text-[15px]">{fmtNum(v)}</span><span className="text-[11px] text-ink2">{label(id)}</span></div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="flex justify-end gap-1 -mb-1.5 -mr-1.5 mt-1">
|
||||
<SmallButton onClick={() => onShowOnMap(moving ? { ...missionHex(m, { col: base.col, row: base.row }, now), missionId: m.id } : { col: m.target.col, row: m.target.row })}>Auf der Karte</SmallButton>
|
||||
{m.status === "outbound" && m.arriveAtMs > now && <SmallButton onClick={onRecall}>Zurückrufen</SmallButton>}
|
||||
{m.type === "besetzen" && m.status === "stationed" ? <div className="text-sm mt-1"><FieldMissionLine missionId={m.id} /></div>
|
||||
: m.status === "staged" || m.status === "stationed" ? <div className="text-sm mt-1"><OpsMissionLine m={m} /></div>
|
||||
: m.status === "holding" && m.patrol ? <PatrolLine m={m} now={now} />
|
||||
: m.status === "holding" ? <div className="text-sm mt-1"><div className="text-sea-300">Blockade läuft</div><LiftBlockade missionId={m.id} /></div>
|
||||
: null}
|
||||
|
||||
{out && m.arriveAtMs > now && (
|
||||
<button type="button" onClick={onRecall} className="tap mt-1 -mb-2 inline-flex items-center gap-1.5 text-accent-ink font-semibold text-[14px]">
|
||||
<LineIcon id="recall" size={16} />Zurückrufen
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</li>
|
||||
);
|
||||
|
||||
@@ -83,7 +83,7 @@ function NestMark({ level }: { level: number | null }) {
|
||||
return (
|
||||
<svg viewBox="-17 -17 34 34" width={38} height={38} aria-hidden="true" className="shrink-0">
|
||||
<polygon points="0,-13 13,0 0,13 -13,0" fill="none" stroke="var(--tf-siegel)" strokeWidth="1.6" strokeDasharray="3 2.5" />
|
||||
<text x="0" y="3.5" textAnchor="middle" fontSize="10" fontFamily="Fraunces, Georgia, serif" fontWeight="600" fill="var(--tf-siegel)">?</text>
|
||||
<text x="0" y="3.5" textAnchor="middle" fontSize="10" fontFamily="Newsreader, Georgia, serif" fontWeight="600" fill="var(--tf-siegel)">?</text>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ type Open = "admirale" | "felder" | "vorlagen" | "simulator" | null;
|
||||
function Tile({ icon, title, figure, hint, can, onOpen }: { icon: string; title: string; figure?: ReactNode; hint: string; can?: boolean; onOpen: () => void }) {
|
||||
return (
|
||||
<button type="button" onClick={onOpen}
|
||||
className="relative rounded-xl p-2 flex items-center gap-2 text-left border border-rule bg-card min-h-[72px] min-w-0 active:scale-[0.97] transition">
|
||||
className="relative pt-2.5 pb-1 flex items-center gap-2 text-left border-t border-ink min-h-[72px] min-w-0 active:scale-[0.97] transition">
|
||||
<TileFrame><Icon id={icon} size={44} /></TileFrame>
|
||||
<span className="min-w-0 flex-1">
|
||||
<span className="block font-serif text-[14px] leading-tight hyphens-manual">{title}</span>
|
||||
@@ -49,7 +49,7 @@ export function EinsatzTiles({ base, balance, onShowOnMap }: { base: BaseData; b
|
||||
const mapAndClose = (t: Target) => { close(); onShowOnMap(t); };
|
||||
return (
|
||||
<section aria-label="Weitere Werkzeuge" className="mb-3">
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
<div className="grid grid-cols-2 gap-x-4 gap-y-2">
|
||||
<Tile icon="admiral" title="Admirale" figure={a ? `${a.list.length}/${a.slots}` : "…"} can={!!a && a.list.length < a.slots && Object.keys(a.missing).length === 0}
|
||||
hint={!a ? "" : admiralTileHint(a)} onOpen={() => setOpen("admirale")} />
|
||||
<Tile icon="oelfeld" title={"Rohstoff\u00ADfelder"} figure={f ? `${f.mine.length}/${f.maxFields}` : "…"} can={!!f && f.maxFields > 0 && f.mine.length < f.maxFields && warships}
|
||||
|
||||
@@ -21,7 +21,7 @@ export function clockOf(ms: number, nowMs: number): string {
|
||||
/** Gruppe mit Kopf; action steht rechts in der Kopfzeile (z. B. „Alle abholen“, UX 0.43 A1). */
|
||||
export function LageGroup({ title, count, testId, action, tone, children }: { title: string; count?: number; testId: string; action?: ReactNode; tone?: "alarm"; children: ReactNode }) {
|
||||
return (
|
||||
// Seekarte 2.0: Karte mit Fraunces-Titel; Alarm als rot umrandete Alarmkarte auf zartem Rot (Entwurf S5Lage).
|
||||
// Seekarte 2.0: Karte mit Newsreader-Titel; Alarm als rot umrandete Alarmkarte auf zartem Rot (Entwurf S5Lage).
|
||||
<section className={`rounded-xl p-3 mb-3 ${tone === "alarm" ? "border-2 border-siegel bg-siegel-bg" : "panel"}`} data-testid={testId} aria-label={title}>
|
||||
<div className="flex items-center gap-2 mb-1 min-h-10">
|
||||
<h2 className={`tf-h2 flex items-baseline gap-2 flex-1 min-w-0 ${tone === "alarm" ? "!text-siegel" : ""}`}>
|
||||
@@ -45,7 +45,7 @@ export function LageLine({ row, nowMs, onJump, onTap, past, unread }: { row: Lag
|
||||
<span className="shrink-0 mt-0.5"><Icon id={row.icon} size={24} /></span>
|
||||
<span className="flex-1 min-w-0">
|
||||
<span className={`block text-[14px] leading-snug ${alarm ? "text-siegel font-semibold" : good ? "text-moos font-semibold" : ""} ${unread ? "font-semibold" : ""}`}>
|
||||
{unread && <span className="inline-block w-2 h-2 rounded-full bg-siegel mr-1.5 align-middle" aria-label="neu" />}
|
||||
{unread && <span className="inline-block w-2 h-2 rounded-full bg-accent mr-1.5 align-middle" aria-label="neu" />}
|
||||
<span data-lage-text>{fillTimes(row.text, row.subAt, (ms) => fmtTime(ms, nowMs))}</span>
|
||||
</span>
|
||||
{row.sub && <span className="block text-xs text-ink2 truncate">{fillTimes(row.sub, row.subAt, (ms) => fmtTime(ms, nowMs))}</span>}
|
||||
|
||||
@@ -56,7 +56,7 @@ export function FirstSteps({ base, onGuide }: { base: BaseData; onGuide: (a: Gui
|
||||
const a = nextAction(current, base, g.nestTarget);
|
||||
const building = a.kind === "building" && base.buildQueue.some((o) => o.buildingId === a.id);
|
||||
return (
|
||||
<section className="panel rounded-xl p-3.5 mb-3 border-l-4 border-see" aria-label="Erste Schritte" data-testid="lage-first-steps">
|
||||
<section className="panel p-3.5 mb-3 border-l-[7px] border-l-accent" aria-label="Erste Schritte" data-testid="lage-first-steps">
|
||||
<div className="flex items-center gap-2 mb-1.5">
|
||||
<h2 className="tf-h2 flex-1">Erste Schritte</h2>
|
||||
<span className="mono text-xs text-ink2" data-testid="first-steps-count">{done}/{WIN_COUNT} bis zum ersten Sieg</span>
|
||||
|
||||
@@ -67,7 +67,7 @@ export function ReturnCard({ playerId, onAck }: { playerId: number | null; onAck
|
||||
if (version.unseen) lines.push({ key: "version", icon: "anker", text: `Neu in Version ${APP_VERSION} – was ist neu?`, go: () => setNews(true) });
|
||||
const close = () => { version.markSeen(); onAck(); };
|
||||
return (
|
||||
<section className="panel rounded-xl p-3 mb-3 border-see border-l-4" aria-label="Seit deinem letzten Besuch" data-testid="lage-return">
|
||||
<section className="panel p-3 mb-3 border-l-[7px] border-l-accent" aria-label="Seit deinem letzten Besuch" data-testid="lage-return">
|
||||
<div className="flex items-start gap-2 mb-0.5">
|
||||
<span className="flex-1 min-w-0">
|
||||
<h2 className="font-display text-[11px] uppercase tracking-[0.16em] text-ink2">Seit deinem letzten Besuch</h2>
|
||||
|
||||
@@ -125,8 +125,8 @@ export function OrderTicket({ r, cfg, nowMs, ctx, base, initial }: { r: MarketRe
|
||||
<div className="grid grid-cols-2 gap-2 mb-3" role="radiogroup" aria-label="Richtung">
|
||||
{(["buy", "sell"] as const).map((s) => {
|
||||
const on = side === s;
|
||||
const tone = s === "buy" ? "bg-moos border-moos" : "bg-siegel border-siegel";
|
||||
const ring = s === "buy" ? "border-moos text-moos" : "border-siegel text-siegel";
|
||||
const tone = s === "buy" ? "bg-moos border-moos" : "bg-ink border-ink"; // Hafenpapier: Rot nur für Alarm
|
||||
const ring = s === "buy" ? "border-moos text-moos" : "border-ink text-ink";
|
||||
return (
|
||||
<button key={s} type="button" role="radio" aria-checked={on} onClick={() => setSide(s)}
|
||||
className={`tap h-14 rounded-lg border-2 font-display uppercase text-[15px] flex items-center justify-center gap-2 ${on ? `${tone} text-on-strong shadow-[0_2px_0_var(--color-ink)]` : `bg-card ${ring}`}`}>
|
||||
@@ -189,7 +189,7 @@ export function OrderTicket({ r, cfg, nowMs, ctx, base, initial }: { r: MarketRe
|
||||
<button
|
||||
type="button"
|
||||
// UX 0.43 (B-1): ohne ausführbare Order kein farbiger Kaufknopf – grauer Umriss mit dem Grund („Erst verkaufen“).
|
||||
className={`tap w-full h-12 rounded-lg font-display uppercase text-[14px] disabled:opacity-45 ${blocked ? "bg-card text-ink2 border border-rule" : `text-on-strong shadow-[0_2px_0_var(--color-ink)] ${buy ? "bg-moos" : "bg-siegel"}`}`}
|
||||
className={`tap w-full h-12 rounded-lg font-display uppercase text-[14px] disabled:opacity-45 ${blocked ? "bg-card text-ink2 border border-rule" : `text-on-strong shadow-[0_2px_0_var(--color-ink)] ${buy ? "bg-moos" : "bg-ink"}`}`}
|
||||
// Gesperrt mit bekanntem Grund: Antippen klappt „Was hilft?“ auf statt nichts zu tun.
|
||||
disabled={(!q || blocked || exec.busy) && !(blocked && firstWhy)}
|
||||
aria-disabled={blocked && !!firstWhy}
|
||||
|
||||
@@ -37,7 +37,7 @@ export function PriceBoard({ resources, selected, onSelect, nowMs, halfLife }: {
|
||||
aria-label={`${label(r.id)}: ${fmtNum(r.price, 2)} Taler, ${t.word} ${signed(pct)} in 24 Stunden, Richtwert ${fmtNum(r.ref, 2)}${halted ? ", Handelspause" : ""}`}
|
||||
className={`tap text-left panel rounded-xl p-2.5 relative transition-shadow ${on ? "!border-ink shadow-[inset_0_0_0_1px_var(--color-ink),0_2px_0_var(--color-ink)]" : ""}`}
|
||||
>
|
||||
{on && <span className="absolute top-0 left-2.5 right-2.5 h-[3px] bg-siegel" aria-hidden="true" />}
|
||||
{on && <span className="absolute top-0 left-2.5 right-2.5 h-[3px] bg-ink" aria-hidden="true" />}
|
||||
<div className="flex items-center gap-1.5">
|
||||
<Icon id={r.id} size={26} />
|
||||
<span className="font-display uppercase text-[11px] text-ink truncate flex-1">{label(r.id)}</span>
|
||||
|
||||
@@ -105,14 +105,14 @@ function DetailChart({ r, nowMs, cfg, span }: { r: MarketRes; nowMs: number; cfg
|
||||
{/* Erlaubter Bereich für den nächsten Handel */}
|
||||
{bandBot > bandTop && <rect x={L} width={W - L - R} y={bandTop} height={bandBot - bandTop} fill="var(--tf-see)" opacity="0.07" />}
|
||||
{range.hi < hi ? <BandEdge y={y(range.hi)} text={range.hi >= range.ceil ? "Obergrenze" : "Band oben"} />
|
||||
: <text x={W - R - 3} y={T + 9} fontSize="8.5" fill="var(--tf-see)" textAnchor="end" fontFamily="IBM Plex Sans">▲ {range.hi >= range.ceil ? "Obergrenze" : "Band"} {fmtNum(range.hi, 2)}</text>}
|
||||
: <text x={W - R - 3} y={T + 9} fontSize="8.5" fill="var(--tf-see)" textAnchor="end" fontFamily="Inter">▲ {range.hi >= range.ceil ? "Obergrenze" : "Band"} {fmtNum(range.hi, 2)}</text>}
|
||||
{range.lo > lo ? <BandEdge y={y(range.lo)} text={range.lo <= range.floor ? "Untergrenze" : "Band unten"} />
|
||||
: <text x={W - R - 3} y={H - B - 4} fontSize="8.5" fill="var(--tf-see)" textAnchor="end" fontFamily="IBM Plex Sans">▼ {range.lo <= range.floor ? "Untergrenze" : "Band"} {fmtNum(range.lo, 2)}</text>}
|
||||
: <text x={W - R - 3} y={H - B - 4} fontSize="8.5" fill="var(--tf-see)" textAnchor="end" fontFamily="Inter">▼ {range.lo <= range.floor ? "Untergrenze" : "Band"} {fmtNum(range.lo, 2)}</text>}
|
||||
{/* Handelspause */}
|
||||
{showHalt && (
|
||||
<g>
|
||||
<rect x={x(Math.max(from, haltStart))} width={Math.max(2, x(Math.min(nowMs, haltEnd)) - x(Math.max(from, haltStart)))} y={T} height={H - T - B} fill={`url(#${uid}-halt)`} />
|
||||
<text x={x(Math.max(from, haltStart)) + 3} y={T + 10} fontSize="9" fill="var(--tf-siegel)" fontFamily="IBM Plex Sans" fontWeight="600">PAUSE</text>
|
||||
<text x={x(Math.max(from, haltStart)) + 3} y={T + 10} fontSize="9" fill="var(--tf-siegel)" fontFamily="Inter" fontWeight="600">PAUSE</text>
|
||||
</g>
|
||||
)}
|
||||
{/* Verlauf: Fläche über dem Richtwert moosgrün, darunter siegelrot */}
|
||||
@@ -122,16 +122,16 @@ function DetailChart({ r, nowMs, cfg, span }: { r: MarketRes; nowMs: number; cfg
|
||||
{showBase && <line x1={L} x2={W - R} y1={y(baseRef)} y2={y(baseRef)} stroke="var(--tf-messing)" strokeDasharray="1.5 2.5" strokeWidth="1.2" />}
|
||||
{/* Richtwert über dem Verlauf, damit er sichtbar bleibt */}
|
||||
<line x1={L} x2={W - R} y1={y(r.ref)} y2={y(r.ref)} stroke="var(--tf-ink)" strokeDasharray="5 4" strokeWidth="1" />
|
||||
<text x={L + 3} y={y(r.ref) + (r.price < r.ref ? -4 : 11)} fontSize="9" fill="var(--tf-ink)" fontFamily="IBM Plex Sans" fontWeight="600">Richtwert {fmtNum(r.ref, 2)}</text>
|
||||
<text x={L + 3} y={y(r.ref) + (r.price < r.ref ? -4 : 11)} fontSize="9" fill="var(--tf-ink)" fontFamily="Inter" fontWeight="600">Richtwert {fmtNum(r.ref, 2)}</text>
|
||||
{trades.map((h) => <line key={h.tMs} x1={x(h.tMs)} x2={x(h.tMs)} y1={H - B} y2={H - B - 5} stroke="var(--tf-ink)" strokeWidth="1" />)}
|
||||
<circle cx={x(nowMs)} cy={y(r.price)} r="3.5" fill={color} stroke="var(--tf-field)" strokeWidth="1.5" />
|
||||
{/* Kursachse rechts mit aktuellem Kurs */}
|
||||
{yt.filter((v) => Math.abs(y(v) - y(r.price)) > 12).map((v) => <text key={v} x={W - R + 4} y={y(v) + 3} fontSize="9" fill="var(--tf-ink2)" fontFamily="IBM Plex Mono">{fmtNum(v, hi - lo < 0.04 ? 3 : 2)}</text>)}
|
||||
{yt.filter((v) => Math.abs(y(v) - y(r.price)) > 12).map((v) => <text key={v} x={W - R + 4} y={y(v) + 3} fontSize="9" fill="var(--tf-ink2)" fontFamily="JetBrains Mono">{fmtNum(v, hi - lo < 0.04 ? 3 : 2)}</text>)}
|
||||
<rect x={W - R + 1} y={y(r.price) - 8} width={R - 2} height="16" fill={color} />
|
||||
<text x={W - R + 4} y={y(r.price) + 3.5} fontSize="10" fill="var(--tf-field)" fontFamily="IBM Plex Mono" fontWeight="600">{fmtNum(r.price, 2)}</text>
|
||||
<text x={W - R + 4} y={y(r.price) + 3.5} fontSize="10" fill="var(--tf-field)" fontFamily="JetBrains Mono" fontWeight="600">{fmtNum(r.price, 2)}</text>
|
||||
{/* Zeitachse */}
|
||||
<line x1={L} x2={W - R} y1={H - B} y2={H - B} stroke="var(--tf-ink)" strokeWidth="1" />
|
||||
{xt.map((k) => <text key={k} x={x(k)} y={H - 8} fontSize="9" fill="var(--tf-ink2)" textAnchor="middle" fontFamily="IBM Plex Mono">{clock(k)}</text>)}
|
||||
{xt.map((k) => <text key={k} x={x(k)} y={H - 8} fontSize="9" fill="var(--tf-ink2)" textAnchor="middle" fontFamily="JetBrains Mono">{clock(k)}</text>)}
|
||||
</svg>
|
||||
<ul className="flex flex-wrap gap-x-3 gap-y-0.5 text-[11px] text-ink2 mt-1.5" aria-hidden="true">
|
||||
<li className="flex items-center gap-1"><i className="inline-block w-4 border-t border-dashed border-ink2" /> Richtwert</li>
|
||||
@@ -152,7 +152,7 @@ function BandEdge({ y, text }: { y: number; text: string }) {
|
||||
return (
|
||||
<g>
|
||||
<line x1={L} x2={W - R} y1={y} y2={y} stroke="var(--tf-see)" strokeWidth="0.8" strokeDasharray="1 2" />
|
||||
<text x={W - R - 3} y={y - 3} fontSize="8.5" fill="var(--tf-see)" textAnchor="end" fontFamily="IBM Plex Sans">{text}</text>
|
||||
<text x={W - R - 3} y={y - 3} fontSize="8.5" fill="var(--tf-see)" textAnchor="end" fontFamily="Inter">{text}</text>
|
||||
</g>
|
||||
);
|
||||
}
|
||||
@@ -91,11 +91,11 @@ export function SeasonChart({ r, nowMs, span }: { r: MarketRes; nowMs: number; s
|
||||
<path d={`${line((p) => p.p)} L${x(nowMs)},${H - B} L${x(from)},${H - B} Z`} fill={color} opacity="0.08" />
|
||||
<path d={line((p) => p.p)} fill="none" stroke={color} strokeWidth="1.8" strokeLinejoin="round" />
|
||||
<circle cx={x(nowMs)} cy={y(r.price)} r="3.5" fill={color} stroke="var(--tf-field)" strokeWidth="1.5" />
|
||||
{yt.filter((v) => Math.abs(y(v) - y(r.price)) > 12).map((v) => <text key={v} x={W - R + 4} y={y(v) + 3} fontSize="9" fill="var(--tf-ink2)" fontFamily="IBM Plex Mono">{fmtNum(v, hi - lo < 0.04 ? 3 : 2)}</text>)}
|
||||
{yt.filter((v) => Math.abs(y(v) - y(r.price)) > 12).map((v) => <text key={v} x={W - R + 4} y={y(v) + 3} fontSize="9" fill="var(--tf-ink2)" fontFamily="JetBrains Mono">{fmtNum(v, hi - lo < 0.04 ? 3 : 2)}</text>)}
|
||||
<rect x={W - R + 1} y={y(r.price) - 8} width={R - 2} height="16" fill={color} />
|
||||
<text x={W - R + 4} y={y(r.price) + 3.5} fontSize="10" fill="var(--tf-field)" fontFamily="IBM Plex Mono" fontWeight="600">{fmtNum(r.price, 2)}</text>
|
||||
<text x={W - R + 4} y={y(r.price) + 3.5} fontSize="10" fill="var(--tf-field)" fontFamily="JetBrains Mono" fontWeight="600">{fmtNum(r.price, 2)}</text>
|
||||
<line x1={L} x2={W - R} y1={H - B} y2={H - B} stroke="var(--tf-ink)" strokeWidth="1" />
|
||||
{xt.map((k) => <text key={k} x={x(k)} y={H - 8} fontSize="9" fill="var(--tf-ink2)" textAnchor="middle" fontFamily="IBM Plex Mono">{day(k)}</text>)}
|
||||
{xt.map((k) => <text key={k} x={x(k)} y={H - 8} fontSize="9" fill="var(--tf-ink2)" textAnchor="middle" fontFamily="JetBrains Mono">{day(k)}</text>)}
|
||||
</svg>
|
||||
<ul className="flex flex-wrap gap-x-3 gap-y-0.5 text-[11px] text-ink2 mt-1.5" aria-hidden="true">
|
||||
<li className="flex items-center gap-1"><i className="inline-block w-4 border-t-2" style={{ borderColor: color }} /> Kurs (Stundenschluss)</li>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Tickerband: laufende Kurszeile aller Ressourcen. Bei prefers-reduced-motion steht es still (styles.css).
|
||||
// Tickerband (Hafenpapier): Kurszeile auf Papier, Kursrichtung per Pfeil (steigend Grün, fallend Warnorange). Bei prefers-reduced-motion steht es still (styles.css).
|
||||
import { fmtNum, label } from "../../lib/names.ts";
|
||||
import { Icon } from "../../icons.tsx";
|
||||
import { changePct, refPct, signed, trend, DAY, type MarketRes } from "./calc.ts";
|
||||
@@ -15,20 +15,21 @@ export function Ticker({ resources, nowMs, halfLife, bar = false }: { resources:
|
||||
{items.map(({ r, pct, basis, halted }) => {
|
||||
const t = trend(pct);
|
||||
return (
|
||||
<li key={r.id} className="flex items-center gap-1.5 px-3 h-9 border-r border-rule whitespace-nowrap text-[13px]">
|
||||
<Icon id={r.id} size={18} className="rounded-full bg-paper p-px" />
|
||||
<span className="font-display uppercase text-[11px] text-ink/85">{label(r.id)}</span>
|
||||
<span className="mono">{fmtNum(r.price, 2)}</span>
|
||||
<span className={`mono ${t.tone === "up" ? "ticker-up" : t.tone === "down" ? "ticker-down" : "text-ink/80"}`}>{t.arrow} {signed(pct)}</span>
|
||||
<span className="text-[11px] text-ink/70">{basis}</span>
|
||||
{halted && <span className="font-display text-[11px] uppercase border border-siegel text-siegel px-1">Pause</span>}
|
||||
<li key={r.id} className="flex items-center gap-1.5 px-3.5 h-10 border-r border-rule whitespace-nowrap text-[13px] font-medium">
|
||||
<Icon id={r.id} size={18} />
|
||||
<span>{label(r.id)}</span>
|
||||
<span className="mono font-semibold">{fmtNum(r.price, 2)}</span>
|
||||
<span className={`mono ${t.tone === "up" ? "ticker-up" : t.tone === "down" ? "ticker-down" : "text-ink2"}`}>{t.arrow} {signed(pct)}</span>
|
||||
<span className="text-[11px] text-ink2">{basis}</span>
|
||||
{halted && <span className="font-display font-bold text-[11px] uppercase border border-siegel text-siegel px-1">Pause</span>}
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
);
|
||||
return (
|
||||
<section className={`ticker tf-head overflow-hidden ticker-scroll ${bar ? "border-y border-ink" : "rounded-xl mb-3 border border-ink"}`} aria-label="Kurszeile">
|
||||
<section className={`ticker overflow-hidden ticker-scroll flex items-stretch ${bar ? "border-y border-rule" : "mb-3 border-y border-ink"}`} aria-label="Kurszeile">
|
||||
<span aria-hidden="true" className="tf-label shrink-0 self-center pl-4 pr-3 py-1 bg-paper relative z-[1]">Börse</span>
|
||||
<p className="sr-only">{summary}</p>
|
||||
<div className="ticker-track" aria-hidden="true">
|
||||
{row(true)}
|
||||
|
||||
+14
-8
@@ -1,11 +1,17 @@
|
||||
// Schriften selbst ausgeliefert (OFL, @fontsource; kein Google-Abruf zur Laufzeit), nur lateinische Untermenge und
|
||||
// benötigte Schnitte. Vite legt die woff2-Dateien gehasht unter /assets/ ab; der Service Worker (public/sw.js) cacht
|
||||
// /assets/ beim ersten Abruf, damit die Schriften auch offline da sind. font-display: swap, Fallbacks in styles.css.
|
||||
// Seekarte 2.0: Fraunces für Überschriften (600/700), IBM Plex Sans für Text, IBM Plex Mono für Zahlen.
|
||||
import "@fontsource/fraunces/latin-600.css";
|
||||
import "@fontsource/fraunces/latin-700.css";
|
||||
import "@fontsource/fraunces/latin-600-italic.css";
|
||||
import "@fontsource/ibm-plex-sans/latin-400.css";
|
||||
import "@fontsource/ibm-plex-sans/latin-500.css";
|
||||
import "@fontsource/ibm-plex-sans/latin-600.css";
|
||||
import "@fontsource/ibm-plex-mono/latin-500.css";
|
||||
// Hafenpapier (V1): Newsreader für Überschriften (500/600) und Lesetext (400, kursiv für Zwischenzeilen), Inter für Text,
|
||||
// JetBrains Mono für Zahlen.
|
||||
import "@fontsource/newsreader/latin-400.css";
|
||||
import "@fontsource/newsreader/latin-500.css";
|
||||
import "@fontsource/newsreader/latin-600.css";
|
||||
import "@fontsource/newsreader/latin-500-italic.css";
|
||||
import "@fontsource/newsreader/latin-600-italic.css";
|
||||
import "@fontsource/inter/latin-400.css";
|
||||
import "@fontsource/inter/latin-500.css";
|
||||
import "@fontsource/inter/latin-600.css";
|
||||
import "@fontsource/inter/latin-700.css";
|
||||
import "@fontsource/jetbrains-mono/latin-400.css";
|
||||
import "@fontsource/jetbrains-mono/latin-500.css";
|
||||
import "@fontsource/jetbrains-mono/latin-600.css";
|
||||
@@ -1,7 +1,5 @@
|
||||
// Kartenfarben „Seekarte 2.0“ (Entwurf S5Karte/S5Desktop) für hell und dunkel – NOCH NICHT VERDRAHTET.
|
||||
// Die Karte (screens/HexMap.tsx, map/*) wird parallel umgebaut; nach dem Karten-Merge liest sie die Farben hier:
|
||||
// const c = mapColors(useTheme()); // React-Teil (lib/theme.ts), bei Moduswechsel neu zeichnen
|
||||
// g.fill(pixi(c.sea)) / stroke({ color: pixi(c.coast) }) … // PixiJS erwartet Zahlen 0xRRGGBB
|
||||
// Kartenfarben „Hafenpapier“ (Entwurf V1, abgeleitet aus Seekarte 2.0) für hell und dunkel.
|
||||
// Die Karte liest sie über setMapTheme (map/symbols.ts) und terrain-raster.ts; PixiJS erwartet Zahlen 0xRRGGBB (pixi()).
|
||||
// Beschriftungen und Symbole im DOM (Legende, Feldblatt) nutzen dagegen die CSS-Tokens (theme.css) direkt.
|
||||
import type { Theme } from "./theme.ts";
|
||||
|
||||
@@ -16,9 +14,9 @@ export interface MapColors {
|
||||
coast: string;
|
||||
/** Hex-Raster (0,6 px). */
|
||||
grid: string;
|
||||
/** Landnamen (Fraunces, Versalien, gesperrt). */
|
||||
/** Landnamen (Newsreader, Versalien, gesperrt). */
|
||||
landLabel: string;
|
||||
/** Meeresnamen (Fraunces kursiv). */
|
||||
/** Meeresnamen (Newsreader kursiv). */
|
||||
seaLabel: string;
|
||||
/** Kurslinien / Routen (gestrichelt 6/5). */
|
||||
route: string;
|
||||
@@ -43,17 +41,18 @@ export interface MapColors {
|
||||
}
|
||||
|
||||
export const MAP_THEME: Record<Theme, MapColors> = {
|
||||
// Hafenpapier (V1): kühles, gedämpftes Meer neben warmem Papierland; Nachtpapier neutral dunkel statt Marineblau.
|
||||
light: {
|
||||
sea: "#d6e3e6", shallow: "#9fc0c8", land: "#ebe2cc", coast: "#5b6b78", grid: "#b8cbd1",
|
||||
landLabel: "#7a6c4f", seaLabel: "#4f6f7c", route: "#a8321f",
|
||||
symbolFill: "#fffaf0", symbolInk: "#14243a", muted: "#4a5568", alarm: "#a8321f", alarmFill: "#fbe9e4",
|
||||
brass: "#a37f2c", accent: "#1e3a5f", good: "#2f6b4f", controlFill: "#fffaf0", controlRule: "#d9cfb8",
|
||||
sea: "#d8e2e2", shallow: "#a9c3c6", land: "#ece5d4", coast: "#5a6472", grid: "#bccbcd",
|
||||
landLabel: "#6c6250", seaLabel: "#4a6470", route: "#b3361f",
|
||||
symbolFill: "#fffdf7", symbolInk: "#1a2230", muted: "#545d6b", alarm: "#b3361f", alarmFill: "#f8e6e1",
|
||||
brass: "#8f6f2e", accent: "#1f4e79", good: "#2c6a4a", controlFill: "#fffdf7", controlRule: "#ddd5c4",
|
||||
},
|
||||
dark: {
|
||||
sea: "#0f2236", shallow: "#2f5a78", land: "#262b2f", coast: "#8aa0b4", grid: "#1b3450",
|
||||
landLabel: "#a99f86", seaLabel: "#7f9fbe", route: "#ff8f78",
|
||||
symbolFill: "#15233a", symbolInk: "#ece4d2", muted: "#a3afc2", alarm: "#ff8f78", alarmFill: "#3a1712",
|
||||
brass: "#d9b25c", accent: "#8bb8e8", good: "#86c99a", controlFill: "#15233a", controlRule: "#2a3b55",
|
||||
sea: "#131b23", shallow: "#2c4656", land: "#25272b", coast: "#8e98a4", grid: "#1f2b36",
|
||||
landLabel: "#a69f8e", seaLabel: "#7d97ac", route: "#ff8f78",
|
||||
symbolFill: "#1a1d21", symbolInk: "#ece6da", muted: "#a9a397", alarm: "#ff8f78", alarmFill: "#3a1a14",
|
||||
brass: "#d9b25c", accent: "#8db6e0", good: "#8fc9a3", controlFill: "#1a1d21", controlRule: "#30343a",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Hell/Dunkel („Seekarte 2.0“): Wahl Hell, Dunkel oder System (Standard), geräteweit in localStorage „tf-theme“.
|
||||
// Hell/Dunkel („Hafenpapier“: Hafenpapier und Nachtpapier): Wahl Hell, Dunkel oder System (Standard), geräteweit in localStorage „tf-theme“.
|
||||
// index.html setzt <html data-theme> schon vor dem ersten Bild (kein Flackern); hier wird es bei einer neuen Wahl
|
||||
// und bei einem Wechsel der Systemeinstellung nachgezogen, samt <meta name="theme-color"> (Statusleiste).
|
||||
import { useSyncExternalStore } from "react";
|
||||
@@ -7,8 +7,8 @@ export type ThemePref = "light" | "dark" | "system";
|
||||
export type Theme = "light" | "dark";
|
||||
|
||||
const KEY = "tf-theme";
|
||||
/** Farbe der Statusleiste je Modus = Kopfleiste (theme.css --tf-head). */
|
||||
export const THEME_COLOR: Record<Theme, string> = { light: "#14243a", dark: "#0a111d" };
|
||||
/** Farbe der Statusleiste je Modus = Statusstreifen (theme.css --tf-statusbar). */
|
||||
export const THEME_COLOR: Record<Theme, string> = { light: "#1a2230", dark: "#121417" };
|
||||
|
||||
const listeners = new Set<() => void>();
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ function PressureIcon() {
|
||||
<svg width="34" height="18" viewBox="0 0 34 18" aria-hidden="true">
|
||||
<ellipse cx="17" cy="9" rx="15" ry="7.5" fill="none" stroke="var(--tf-art-ink)" strokeOpacity={0.5} strokeWidth={1} />
|
||||
<ellipse cx="17" cy="9" rx="9" ry="4.5" fill="none" stroke="var(--tf-art-ink)" strokeOpacity={0.5} strokeWidth={1} />
|
||||
<text x="17" y="12.5" textAnchor="middle" fontSize="10" fontWeight="700" fill="var(--tf-art-siegel)" fontFamily="Fraunces, Georgia, serif">T</text>
|
||||
<text x="17" y="12.5" textAnchor="middle" fontSize="10" fontWeight="700" fill="var(--tf-art-siegel)" fontFamily="Newsreader, Georgia, serif">T</text>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@@ -147,7 +147,7 @@ function UnknownNest() {
|
||||
return (
|
||||
<svg width="22" height="22" viewBox="-12 -12 24 24" aria-hidden="true">
|
||||
<polygon points="0,-10 10,0 0,10 -10,0" fill="var(--tf-art-paper)" stroke="var(--tf-art-ink)" strokeOpacity={0.7} strokeWidth={1.2} />
|
||||
<text x="0" y="3.5" textAnchor="middle" fontSize="10" fontWeight="600" fill="var(--tf-art-ink)" fontFamily="Fraunces, Georgia, serif">?</text>
|
||||
<text x="0" y="3.5" textAnchor="middle" fontSize="10" fontWeight="600" fill="var(--tf-art-ink)" fontFamily="Newsreader, Georgia, serif">?</text>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@@ -157,7 +157,7 @@ function FleetArrow() {
|
||||
<svg width="24" height="26" viewBox="-12 -12 24 26" aria-hidden="true">
|
||||
<circle r="10" fill="var(--tf-art-paper)" stroke="var(--tf-art-ink)" strokeWidth={1.2} />
|
||||
<polygon points="0,-8 5,5 0,2 -5,5" fill="var(--tf-art-ink)" transform="rotate(45)" />
|
||||
<text x="0" y="13" textAnchor="middle" fontSize="7" fontWeight="600" fill="var(--tf-art-ink)" fontFamily="'IBM Plex Mono', monospace">M</text>
|
||||
<text x="0" y="13" textAnchor="middle" fontSize="7" fontWeight="600" fill="var(--tf-art-ink)" fontFamily="'JetBrains Mono', monospace">M</text>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@@ -167,7 +167,7 @@ export function UnknownNestMark({ size = 24 }: { size?: number }) {
|
||||
return (
|
||||
<svg width={size} height={size} viewBox="-13 -13 26 26" aria-hidden="true">
|
||||
<path d="M0 -12 L12 0 L0 12 L-12 0 Z" fill="var(--tf-art-paper)" fillOpacity={0.85} stroke="var(--tf-art-ink)" strokeOpacity={0.7} strokeWidth={1.2} />
|
||||
<text x="0" y="4" textAnchor="middle" fontSize="11" fontFamily="Fraunces, serif" fontWeight="600" fill="var(--tf-art-ink)">?</text>
|
||||
<text x="0" y="4" textAnchor="middle" fontSize="11" fontFamily="Newsreader, serif" fontWeight="600" fill="var(--tf-art-ink)">?</text>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -60,13 +60,13 @@ export function TacticalIcon({ kind, level = 1, size = 28 }: { kind: TacticalKin
|
||||
{level >= 6 && <polygon points="0,-16 16,0 0,16 -16,0" fill="none" stroke={SIEGEL} strokeWidth="1.2" />}
|
||||
<polygon points="0,-13 13,0 0,13 -13,0" fill={SIEGEL} />
|
||||
<polygon points="0,-9 9,0 0,9 -9,0" fill="none" stroke={PAPER} strokeWidth="0.8" />
|
||||
<text x="0" y="3.5" textAnchor="middle" fontSize={roman.length > 2 ? 7.5 : 9.5} fontFamily="Fraunces, Georgia, serif" fontWeight="600" fill={PAPER}>{roman}</text>
|
||||
<text x="0" y="3.5" textAnchor="middle" fontSize={roman.length > 2 ? 7.5 : 9.5} fontFamily="Newsreader, Georgia, serif" fontWeight="600" fill={PAPER}>{roman}</text>
|
||||
</>
|
||||
)}
|
||||
{kind === "nestEmpty" && (
|
||||
<>
|
||||
<polygon points="0,-13 13,0 0,13 -13,0" fill="none" stroke="var(--tf-art-luft)" strokeWidth="1.4" strokeDasharray="3 3" />
|
||||
<text x="0" y="3.5" textAnchor="middle" fontSize="9" fontFamily="Fraunces, Georgia, serif" fontWeight="600" fill="var(--tf-art-luft)">{roman}</text>
|
||||
<text x="0" y="3.5" textAnchor="middle" fontSize="9" fontFamily="Newsreader, Georgia, serif" fontWeight="600" fill="var(--tf-art-luft)">{roman}</text>
|
||||
</>
|
||||
)}
|
||||
{kind === "wreck" && (
|
||||
|
||||
@@ -68,7 +68,7 @@ export function WeatherChip({ at, wb, now, radar }: { at: Hex; wb: WeatherBalanc
|
||||
aria-expanded={open}
|
||||
aria-label={`Wetter am Hafen: ${skyOf(w, wb)}, Wind ${beaufort(w.wind)} Beaufort`}
|
||||
title={open ? undefined : "Wetter am Hafen – antippen für Wirkung"}
|
||||
className={`${MAP_CHIP} text-left flex items-center gap-1.5 ${open ? "px-2 py-1 max-w-[240px]" : "px-2"} ${w.storm ? "border-siegel border-l-4" : "border-ink"}`}
|
||||
className={`${MAP_CHIP} text-left flex items-center gap-1.5 ${open ? "px-2 py-1 max-w-[240px]" : "px-2"} ${w.storm ? "border-siegel border-l-[7px]" : "border-ink"}`}
|
||||
>
|
||||
<span className={`inline-block tf-mv tf-wx-${iconOf(w, wb)}`}><Icon id={iconOf(w, wb)} size={open ? 24 : 20} /></span>
|
||||
{open ? (
|
||||
|
||||
@@ -9,7 +9,7 @@ import { fmtLat, fmtLon } from "./coords.ts";
|
||||
import { INK, MUTED, PAPER } from "./symbols.ts";
|
||||
|
||||
const LON_MIN = -90, LON_MAX = 50, LAT_MIN = 20, LAT_MAX = 76;
|
||||
const style = () => ({ fontFamily: "'IBM Plex Mono', ui-monospace, Menlo, monospace", fontSize: 9.5, fill: MUTED, fontWeight: "500" as const });
|
||||
const style = () => ({ fontFamily: "'JetBrains Mono', ui-monospace, Menlo, monospace", fontSize: 9.5, fill: MUTED, fontWeight: "500" as const });
|
||||
const STEPS = [5, 10, 20];
|
||||
/** Mindestabstand der Beschriftungen in Bildschirm-Pixeln (Länge: Textbreite plus Luft). */
|
||||
const MIN_LON_PX = 62;
|
||||
|
||||
@@ -149,7 +149,7 @@ export function buildIntelLayer(intel: MapIntel, clip: () => Graphics, allRings:
|
||||
dashedV(lines, sat.next.x0, 40, 30);
|
||||
dashedV(lines, sat.next.x1, 40, 30);
|
||||
lines.stroke({ color: sat.type === "radar" ? SEE : INK, width: 1.2, pixelLine: true, alpha: 0.5 });
|
||||
const t = new Text({ text: `Überflug ${clock(sat.next.atMs)}`, style: { fontFamily: "'IBM Plex Mono', monospace", fontSize: HEX_SIZE_KM * 0.6, fill: INK } });
|
||||
const t = new Text({ text: `Überflug ${clock(sat.next.atMs)}`, style: { fontFamily: "'JetBrains Mono', monospace", fontSize: HEX_SIZE_KM * 0.6, fill: INK } });
|
||||
t.alpha = 0.7;
|
||||
t.anchor.set(0.5, 0);
|
||||
t.position.set((sat.next.x0 + sat.next.x1) / 2, HEX_SIZE_KM * 0.4);
|
||||
@@ -192,7 +192,7 @@ export function fleetArrow(f: MapFleetIn): Container {
|
||||
arrow.poly([0, -10 * k, 6 * k, 6 * k, 0, 2.5 * k, -6 * k, 6 * k]).fill({ color });
|
||||
arrow.rotation = (f.heading * Math.PI) / 180;
|
||||
c.addChild(g, arrow);
|
||||
const t = new Text({ text: `${SIZE_LETTER[f.size] ?? "?"}${f.submerged ? "·U" : ""}`, style: { fontFamily: "'IBM Plex Mono', monospace", fontSize: 8, fill: INK, fontWeight: "600" } });
|
||||
const t = new Text({ text: `${SIZE_LETTER[f.size] ?? "?"}${f.submerged ? "·U" : ""}`, style: { fontFamily: "'JetBrains Mono', monospace", fontSize: 8, fill: INK, fontWeight: "600" } });
|
||||
t.resolution = TEXT_RESOLUTION;
|
||||
t.anchor.set(0.5, 0);
|
||||
t.position.set(0, 12 * k);
|
||||
@@ -272,7 +272,7 @@ export function buildMarkLayer(marks: { col: number; row: number }[], loop: bool
|
||||
}
|
||||
pts.forEach((p, i) => {
|
||||
g.circle(p.x, p.y, HEX_SIZE_KM * 0.55).fill({ color: PAPER, alpha: 0.95 }).stroke({ color: SIEGEL, width: 4 });
|
||||
const t = new Text({ text: String(i + 1), style: { fontFamily: "'IBM Plex Mono', monospace", fontSize: HEX_SIZE_KM * 0.7, fill: SIEGEL, fontWeight: "700" } });
|
||||
const t = new Text({ text: String(i + 1), style: { fontFamily: "'JetBrains Mono', monospace", fontSize: HEX_SIZE_KM * 0.7, fill: SIEGEL, fontWeight: "700" } });
|
||||
t.anchor.set(0.5);
|
||||
t.position.set(p.x, p.y);
|
||||
root.addChild(t);
|
||||
|
||||
@@ -22,7 +22,7 @@ export interface MapNaval {
|
||||
rules?: { mines: { fieldRadiusKm: number } | null };
|
||||
}
|
||||
|
||||
const SERIF = "Fraunces, Georgia, 'Times New Roman', serif";
|
||||
const SERIF = "Newsreader, Georgia, 'Times New Roman', serif";
|
||||
|
||||
|
||||
function tag(text: string, color: number, y: number): Container {
|
||||
|
||||
@@ -60,7 +60,7 @@ interface Group { lead: string; keys: string[]; entries: StackEntry[]; badge: Co
|
||||
function chip(text: string): { badge: Container; inner: Container; hw: number } {
|
||||
const badge = new Container();
|
||||
const inner = new Container();
|
||||
const t = new Text({ text, style: { fontFamily: "'IBM Plex Mono', monospace", fontSize: 10, fontWeight: "700", fill: PAPER } });
|
||||
const t = new Text({ text, style: { fontFamily: "'JetBrains Mono', monospace", fontSize: 10, fontWeight: "700", fill: PAPER } });
|
||||
t.resolution = TEXT_RESOLUTION;
|
||||
t.anchor.set(0.5);
|
||||
const w = Math.max(16, t.width + 8);
|
||||
|
||||
+14
-14
@@ -7,22 +7,22 @@ import type { Theme } from "../lib/theme.ts";
|
||||
|
||||
// Karte 2 / „Seekarte 2.0“: Farben folgen hell/dunkel (lib/theme-map.ts). Veränderliche Exporte (live bindings):
|
||||
// setMapTheme() setzt sie, bevor die Karte (neu) aufgebaut wird; alle Zeichenfunktionen lesen sie beim Zeichnen.
|
||||
export let INK = 0x14243a;
|
||||
export let PAPER = 0xfffaf0;
|
||||
export let SIEGEL = 0xa8321f;
|
||||
export let SEE = 0x1e3a5f;
|
||||
export let INK = 0x1a2230;
|
||||
export let PAPER = 0xfffdf7;
|
||||
export let SIEGEL = 0xb3361f;
|
||||
export let SEE = 0x1f4e79;
|
||||
/** Gedämpfte Schrift und Konturen (unbekannt, verlassen, Gradnetz). */
|
||||
export let MUTED = 0x4a5568;
|
||||
export let MUTED = 0x545d6b;
|
||||
/** Hof um Schrift und Routen in Meeresfarbe. */
|
||||
export let HALO = 0xd6e3e6;
|
||||
export let SEA_LABEL = 0x4f6f7c;
|
||||
export let LAND_LABEL = 0x7a6c4f;
|
||||
export let BRASS = 0xa37f2c;
|
||||
export let HALO = 0xd8e2e2;
|
||||
export let SEA_LABEL = 0x4a6470;
|
||||
export let LAND_LABEL = 0x6c6250;
|
||||
export let BRASS = 0x8f6f2e;
|
||||
/** Farben für Verbände: Hinfahrt Siegelrot, Rückfahrt Tinte. Namen bleiben für ältere Aufrufer. */
|
||||
export let FRIEND = SIEGEL;
|
||||
export let NEUTRAL = SEE;
|
||||
export let HOSTILE = SIEGEL;
|
||||
const SERIF = "Fraunces, Georgia, 'Times New Roman', serif";
|
||||
const SERIF = "Newsreader, Georgia, 'Times New Roman', serif";
|
||||
const ROMAN = ["", "I", "II", "III", "IV", "V", "VI"];
|
||||
|
||||
function txt(s: string, size: number, fill: number, family = SERIF, weight = "600", spacing = 0): Text {
|
||||
@@ -31,7 +31,7 @@ function txt(s: string, size: number, fill: number, family = SERIF, weight = "60
|
||||
return t;
|
||||
}
|
||||
|
||||
/** Namensschild: Papierplakette mit Tintenrahmen, Name in Fraunces-Versalien. */
|
||||
/** Namensschild: Papierplakette mit Tintenrahmen, Name in Newsreader-Versalien. */
|
||||
export function nameTag(text: string, color: number, y = 18): Container {
|
||||
const c = new Container();
|
||||
const t = txt(text.toUpperCase(), 10.5, INK, SERIF, "600", 1.2);
|
||||
@@ -63,8 +63,8 @@ export function ownBaseSymbol(): Container {
|
||||
/** Verhältnis eines fremden Hafens zum Betrachter (aus der Kartenansicht). */
|
||||
export type Relation = "allianz" | "pakt" | "krieg" | "neutral";
|
||||
/** Grünspan für die eigene Allianz, Ocker für Paktpartner, Siegelrot für Kriegsgegner, Seeblau neutral. */
|
||||
export let ALLY = 0x2f6b4f;
|
||||
export let PAKT = 0xa37f2c;
|
||||
export let ALLY = 0x2c6a4a;
|
||||
export let PAKT = 0x8f6f2e;
|
||||
export const RELATION_COLOR: Record<Relation, number> = { allianz: ALLY, pakt: PAKT, krieg: SIEGEL, neutral: SEE };
|
||||
|
||||
/** Farbsatz der Karte setzen (vor dem Aufbau; bei Moduswechsel wird die Karte neu aufgebaut). */
|
||||
@@ -260,7 +260,7 @@ export function mapLabel(name: string, kind: "sea" | "region", size: number): Te
|
||||
const t = new Text({
|
||||
text: sea ? name : name.toUpperCase(),
|
||||
style: {
|
||||
fontFamily: SERIF, // „Seekarte 2.0“: Landnamen Fraunces-Versalien gesperrt, Meere Fraunces kursiv
|
||||
fontFamily: SERIF, // „Seekarte 2.0“: Landnamen Newsreader-Versalien gesperrt, Meere Newsreader kursiv
|
||||
fontStyle: sea ? "italic" : "normal",
|
||||
fontWeight: "600",
|
||||
fontSize: Math.round((sea ? 12 : 10.5) * size),
|
||||
|
||||
@@ -20,7 +20,7 @@ const STEP = 3;
|
||||
const REDRAW_MS = 15 * 60000;
|
||||
const CLOUD = 0x8c96a3;
|
||||
const FOG = 0xdfe8ee;
|
||||
const SERIF = "Fraunces, Georgia, serif";
|
||||
const SERIF = "Newsreader, Georgia, serif";
|
||||
/** Ab diesem Zoom werden betroffene Felder einzeln gezeichnet (Sturm, Nebel, Wolken, Windfahnen). */
|
||||
const HEX_FROM = 0.42;
|
||||
/** Schilder T/H nur für Systeme ab dieser Stärke (sonst zu viele schwache Systeme). */
|
||||
|
||||
@@ -30,7 +30,7 @@ export interface MapWorldEvent {
|
||||
finale?: { remainingHp: number; initialHp: number; boats: number; initialBoats: number; sections: number; initialSections: number; vanguards: { col: number; row: number; name: string }[] } | null;
|
||||
}
|
||||
|
||||
const SERIF = "Fraunces, Georgia, 'Times New Roman', serif";
|
||||
const SERIF = "Newsreader, Georgia, 'Times New Roman', serif";
|
||||
|
||||
|
||||
function label(text: string, color: number, y: number): Container {
|
||||
|
||||
@@ -131,7 +131,7 @@ export function AuthScreen() {
|
||||
<div className="min-h-full flex flex-col justify-center p-5 max-w-sm mx-auto">
|
||||
<img src="/icon.svg" alt="" className="w-20 h-20 mx-auto mb-4 rounded-[18px] border border-rule" />
|
||||
<h1 className="font-serif !text-[38px] text-center !tracking-[0.18em] mb-1">TIDEFRONT</h1>
|
||||
<div className="flex items-center gap-2 mx-8 mb-2" aria-hidden="true"><i className="flex-1 border-t-2 border-ink" /><span className="diamond bg-siegel" /><i className="flex-1 border-t-2 border-ink" /></div>
|
||||
<div className="flex items-center gap-2 mx-8 mb-2" aria-hidden="true"><i className="flex-1 border-t-2 border-ink" /><span className="diamond bg-ink" /><i className="flex-1 border-t-2 border-ink" /></div>
|
||||
<p className="text-center text-ink2 mb-8 font-serif italic">Seekrieg auf Nordatlantik und Mittelmeer</p>
|
||||
<div className="grid grid-cols-2 mb-4 rounded-[3px] overflow-hidden border border-ink">
|
||||
{(["login", "register"] as const).map((m) => (
|
||||
@@ -149,7 +149,7 @@ export function AuthScreen() {
|
||||
<form onSubmit={submit}>
|
||||
{mode === "register" && inviterName && (
|
||||
<div className="rounded-[3px] border border-ink bg-card px-3 py-2 mb-4 flex items-center gap-2" role="status">
|
||||
<span className="diamond bg-siegel shrink-0" aria-hidden="true" />
|
||||
<span className="diamond bg-ink shrink-0" aria-hidden="true" />
|
||||
<span className="text-sm">Eingeladen von <strong>{inviterName}</strong>. Wähle einen Namen und ein Passwort.</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -40,7 +40,7 @@ import { buildFleetLayer, buildIntelLayer, buildMarkLayer, buildPostLayer, type
|
||||
export type { MapMission };
|
||||
|
||||
/** Kartenschriften vor dem ersten Zeichnen laden (Pixi rastert Text über das Canvas). */
|
||||
const FONTS = ["600 12px Fraunces", "italic 600 12px Fraunces", "600 12px 'IBM Plex Sans'", "500 10px 'IBM Plex Mono'"];
|
||||
const FONTS = ["600 12px Newsreader", "italic 600 12px Newsreader", "600 12px Inter", "500 10px 'JetBrains Mono'"];
|
||||
const fontsReady = () => Promise.all(FONTS.map((f) => document.fonts?.load(f))).catch(() => undefined);
|
||||
|
||||
export interface HexMapProps {
|
||||
|
||||
@@ -150,7 +150,7 @@ export function MapScreen({ base, focus, onFocusUsed, onPlan, onSwitchBase, layo
|
||||
<div className="absolute top-2 flex flex-col gap-1 items-start pointer-events-none max-w-[calc(100%-4.5rem)]" style={SAFE_LEFT}>
|
||||
{showWeather && meta.data?.balance.weather && <div className="pointer-events-auto"><WeatherChip at={home} wb={meta.data.balance.weather} now={now} radar={hasRadar} /></div>}
|
||||
{alert && (
|
||||
<div className="rounded-[3px] bg-card/95 border border-siegel border-l-4 text-siegel px-2 py-1 text-[11px] font-display uppercase tracking-wider shadow-sm">
|
||||
<div className="rounded-[3px] bg-card/95 border border-siegel border-l-[7px] text-siegel px-2 py-1 text-[11px] font-display uppercase tracking-wider shadow-sm">
|
||||
Feindkontakt – Angriff im Anmarsch
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -64,9 +64,9 @@ export function MeldungenScreen(props: {
|
||||
<div role="tablist" aria-label="Saison" className="flex flex-wrap gap-1.5 mb-3">
|
||||
{INNER.map((t) => (
|
||||
<button key={t.id} type="button" role="tab" aria-selected={inner === t.id} onClick={() => setSub(t.id)}
|
||||
className={`tap rounded-full border px-3.5 text-[13px] font-serif flex items-center justify-center gap-1.5 ${inner === t.id ? "border-ink bg-card text-ink" : "border-rule text-ink2"}`}>
|
||||
className={`tap rounded-[2px] border px-3.5 text-[13px] font-semibold flex items-center justify-center gap-1.5 ${inner === t.id ? "border-ink bg-ink text-paper" : "border-rule text-ink2"}`}>
|
||||
{t.label}
|
||||
{t.id === "erfolge" && erfolge > 0 && <span className="w-2 h-2 rounded-full bg-siegel" aria-label={`${erfolge} abholbereit`} />}
|
||||
{t.id === "erfolge" && erfolge > 0 && <span className="w-2 h-2 rounded-full bg-accent" aria-label={`${erfolge} abholbereit`} />}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -6,6 +6,7 @@ import { errorText, failText } from "../lib/names.ts";
|
||||
import { fmtTime } from "../lib/time.ts";
|
||||
import { Button, ErrorLine, Loading, Sheet } from "../ui.tsx";
|
||||
import { Icon } from "../icons.tsx";
|
||||
import { LineIcon } from "../components/LineIcon.tsx";
|
||||
import { useNav } from "../lib/nav.ts"; // UX-0.43 C3: Leerzustand mit Handlung
|
||||
|
||||
type Msg = Outputs["social"]["messages"]["inbox"][number];
|
||||
@@ -49,19 +50,19 @@ export function MessagesScreen({ setCompose }: { setCompose: (d: Draft) => void
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="flex items-center gap-2 mb-3">
|
||||
<div className="flex rounded-lg bg-navy-950/70 p-0.5 flex-1" role="tablist">
|
||||
<div className="flex items-center gap-2 mb-3 border-b border-rule">
|
||||
<div className="flex gap-5 flex-1" role="tablist">
|
||||
{(["inbox", "sent"] as const).map((b) => (
|
||||
<button key={b} type="button" role="tab" aria-selected={box === b} onClick={() => setBox(b)}
|
||||
className={`tap flex-1 rounded-md text-sm font-semibold ${box === b ? "bg-accent text-on-accent" : "text-slate-400"}`}>
|
||||
className={`tap -mb-px border-b-2 font-serif text-[17px] ${box === b ? "border-ink text-ink" : "border-transparent text-ink2 !font-medium"}`}>
|
||||
{b === "inbox" ? "Posteingang" : "Gesendet"}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<Button kind="secondary" onClick={() => setCompose({ to: null, subject: "", body: "" })}>Neu</Button>
|
||||
<Button kind="secondary" className="mb-1.5" onClick={() => setCompose({ to: null, subject: "", body: "" })}>Neu</Button>
|
||||
</div>
|
||||
{!list.data ? <Loading /> : list.data.length === 0 ? (
|
||||
<div className="panel rounded-xl p-4 text-center text-slate-300 text-sm" data-testid="post-empty">
|
||||
<div className="panel p-4 text-center text-ink2 text-sm" data-testid="post-empty">
|
||||
<Icon id="nav-bericht" size={40} className="mx-auto mb-1.5" />
|
||||
{box === "inbox" ? "Noch keine Post. Schreib Mitspielern – sie stehen unter Meldungen → Saison → Wertung." : "Du hast noch nichts gesendet."}
|
||||
<div className="flex flex-wrap justify-center gap-2 mt-3">
|
||||
@@ -70,19 +71,20 @@ export function MessagesScreen({ setCompose }: { setCompose: (d: Draft) => void
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<ul className="space-y-2">
|
||||
<ul>
|
||||
{list.data.map((m) => (
|
||||
<li key={m.id}>
|
||||
<li key={m.id} className="border-b border-rule">
|
||||
{/* Hafenpapier: Logbuch-Eintrag – ungelesen mit Akzentstreifen links (7 px) und fettem Absender. */}
|
||||
<button type="button" onClick={() => void show(m)}
|
||||
className={`tap w-full text-left panel rounded-xl p-3 border-l-4 ${box === "inbox" && !m.read ? "!border-l-sea-400" : "!border-l-transparent"}`}>
|
||||
<div className="flex justify-between gap-2 text-sm">
|
||||
<strong className={`min-w-0 truncate ${box === "inbox" && !m.read ? "text-ink font-bold" : "text-slate-300"}`}>
|
||||
className={`tap w-full text-left py-3 pl-3 pr-1 border-l-[7px] ${box === "inbox" && !m.read ? "border-l-accent" : "border-l-transparent"}`}>
|
||||
<div className="flex justify-between gap-2 text-[13px]">
|
||||
<strong className={`min-w-0 truncate ${box === "inbox" && !m.read ? "text-ink font-bold" : "text-ink2 font-medium"}`}>
|
||||
{box === "sent" ? "an " : ""}{m.other?.name ?? SYSTEM}
|
||||
</strong>
|
||||
<span className="text-xs text-slate-400 shrink-0 tabular-nums">{fmtTime(m.atMs)}</span>
|
||||
<span className="text-xs text-ink2 shrink-0 mono">{fmtTime(m.atMs)}</span>
|
||||
</div>
|
||||
<div className="text-sm truncate">{m.subject ?? <span className="text-slate-400">(ohne Betreff)</span>}</div>
|
||||
<div className="text-xs text-slate-400 truncate">{m.body}</div>
|
||||
<div className="font-serif font-medium text-[18px] leading-snug truncate mt-0.5">{m.subject ?? <span className="text-ink2">(ohne Betreff)</span>}</div>
|
||||
<div className="text-[13px] text-ink2 truncate">{m.body}</div>
|
||||
{box === "sent" && <div className="text-[11px] text-slate-500">{m.read ? "gelesen" : "ungelesen"}</div>}
|
||||
</button>
|
||||
</li>
|
||||
@@ -92,12 +94,14 @@ export function MessagesScreen({ setCompose }: { setCompose: (d: Draft) => void
|
||||
<Sheet open={open !== null} onClose={() => setOpen(null)} title={open?.subject ?? "(ohne Betreff)"} icon={<Icon id="nav-bericht" size={28} />}>
|
||||
{open && (
|
||||
<>
|
||||
<p className="text-xs text-slate-400 mb-3">
|
||||
{box === "inbox" ? "von" : "an"} <strong className="text-slate-200">{open.other?.name ?? SYSTEM}</strong> · {fmtTime(open.atMs)}
|
||||
{/* Hafenpapier (Entwurf V1-Meldung): Absender und Zeit, Tintenlinie, Text in Newsreader, Hauptknopf in Tinte. */}
|
||||
<p className="text-[13px] text-ink2 mb-4">
|
||||
{box === "inbox" ? "von" : "an"} <strong className="text-ink font-semibold">{open.other?.name ?? SYSTEM}</strong> · <span className="mono">{fmtTime(open.atMs)}</span>
|
||||
</p>
|
||||
<p className="text-sm whitespace-pre-wrap break-words mb-4">{open.body}</p>
|
||||
<div className="h-[2px] bg-ink mb-4" aria-hidden="true" />
|
||||
<p className="font-serif !font-normal text-[19px] leading-[1.5] whitespace-pre-wrap break-words mb-5">{open.body}</p>
|
||||
{!open.other && fieldOf(open.body) && (
|
||||
<Button kind="secondary" className="w-full mb-2" onClick={() => { setOpen(null); nav.go({ to: "map", ...fieldOf(open.body)! }); }}>Auf der Karte zeigen</Button>
|
||||
<Button className="w-full mb-2 min-h-[52px] inline-flex items-center justify-center gap-2 text-[16px]" onClick={() => { setOpen(null); nav.go({ to: "map", ...fieldOf(open.body)! }); }}><LineIcon id="pin" size={18} />Auf der Karte zeigen</Button>
|
||||
)}
|
||||
{open.other && (
|
||||
<Button className="w-full" onClick={() => reply(open)}>{box === "inbox" ? "Antworten" : "Noch einmal schreiben"}</Button>
|
||||
|
||||
@@ -96,7 +96,7 @@ export function ReportsScreen() {
|
||||
<ul className="space-y-2">
|
||||
{matching.slice(0, limit).map((r) => (
|
||||
<li key={r.id}>
|
||||
<button type="button" onClick={() => setOpen(r.id)} className={`tap w-full text-left panel rounded-xl p-3 flex items-center gap-3 border-l-4 ${r.won === null ? "!border-l-see" : r.won ? "!border-l-moos" : "!border-l-siegel"}`}>
|
||||
<button type="button" onClick={() => setOpen(r.id)} className={`tap w-full text-left panel rounded-xl p-3 flex items-center gap-3 border-l-[7px] ${r.won === null ? "!border-l-see" : r.won ? "!border-l-moos" : "!border-l-siegel"}`}>
|
||||
<Icon id={KIND_ICON[r.kind] ?? "nav-bericht"} size={36} />
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="flex justify-between gap-2">
|
||||
|
||||
@@ -83,7 +83,7 @@ function ResearchButton({ base, now, onOpen }: { base: BaseData; now: number; on
|
||||
<Icon id="forschungsamt" size={22} />
|
||||
<span className="font-display uppercase text-[12px] tracking-[0.1em]">Forschung</span>
|
||||
{o && <span className="mono text-[11px] text-ink2">{o.finishesAt <= now ? "fertig" : fmtDuration(o.finishesAt - now)}</span>}
|
||||
{r.pendingChoice && <span className="absolute -top-1.5 -right-1.5 w-4 h-4 rotate-45 bg-siegel" title="Durchbruch: Belohnung wählen" />}
|
||||
{r.pendingChoice && <span className="absolute -top-1.5 -right-1.5 w-4 h-4 rotate-45 bg-accent" title="Durchbruch: Belohnung wählen" />}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
||||
+62
-46
@@ -2,7 +2,8 @@
|
||||
|
||||
@import "./theme.css";
|
||||
|
||||
/* Stil „Seekarte 2.0“: helles Papier bzw. Nachtkarte, Marinetinte, Akzentblau für Handlung, Siegelrot für Alarm.
|
||||
/* Stil „Hafenpapier“ (Entwurf V1): ruhige Logbuch-/Zeitungsseite – Papier bzw. Nachtpapier, Tinte, Haarlinien statt
|
||||
Kästen, Akzentblau für Handlung, Rot nur für Alarm. Newsreader (Überschriften), Inter (Text), JetBrains Mono (Zahlen).
|
||||
Alle Farbklassen zeigen auf die Tokens aus theme.css (hell/dunkel) – die alten Namen (navy, slate, sea, brass,
|
||||
red, emerald …) bleiben als Schlüssel bestehen, damit alle Bildschirme mitziehen. navy = Papiertöne, slate = Tinte. */
|
||||
@theme inline {
|
||||
@@ -85,15 +86,15 @@
|
||||
}
|
||||
|
||||
@theme {
|
||||
/* Kartenformen 2.0: 6 px für Karten und Knöpfe, 8 px für große Knöpfe und Bildfelder. */
|
||||
--radius-lg: 6px;
|
||||
--radius-xl: 6px;
|
||||
--radius-2xl: 8px;
|
||||
--radius-3xl: 16px;
|
||||
--font-serif: "Fraunces", Georgia, "Times New Roman", serif;
|
||||
--font-display: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
||||
--font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
||||
--font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
|
||||
/* Hafenpapier: fast eckig – 2 px für Knöpfe und Felder, 3 px für Bildfelder, 12 px nur für die Blattkante. */
|
||||
--radius-lg: 2px;
|
||||
--radius-xl: 2px;
|
||||
--radius-2xl: 3px;
|
||||
--radius-3xl: 12px;
|
||||
--font-serif: "Newsreader", Georgia, "Times New Roman", serif;
|
||||
--font-display: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
||||
--font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
||||
--font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
|
||||
}
|
||||
|
||||
html, body, #root { height: 100%; }
|
||||
@@ -101,7 +102,7 @@ html, body, #root { height: 100%; }
|
||||
Bildschirme (mit und ohne Kopfleiste), der feste Streifen färbt den Bereich wie die Kopfleiste. */
|
||||
:root { --tf-safe-top: env(safe-area-inset-top, 0px); } /* E2E simuliert die Notch über diese Variable */
|
||||
#root { box-sizing: border-box; padding-top: var(--tf-safe-top); }
|
||||
.tf-statusbar { position: fixed; top: 0; left: 0; right: 0; height: var(--tf-safe-top); background: var(--tf-head); z-index: 70; pointer-events: none; }
|
||||
.tf-statusbar { position: fixed; top: 0; left: 0; right: 0; height: var(--tf-safe-top); background: var(--tf-statusbar); z-index: 70; pointer-events: none; }
|
||||
/* Safari (iPhone) vergrößert Schrift sonst eigenmächtig, etwa im Querformat – dann laufen Texte über den Rand. */
|
||||
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
|
||||
body {
|
||||
@@ -115,7 +116,7 @@ body {
|
||||
overflow-wrap: break-word;
|
||||
-webkit-hyphens: auto;
|
||||
hyphens: auto;
|
||||
/* Seekarte 2.0: glatte Flächen statt Papierfaser. */
|
||||
/* Hafenpapier: glatte Papierfläche. */
|
||||
background-color: var(--tf-paper);
|
||||
line-height: 1.45;
|
||||
}
|
||||
@@ -134,67 +135,82 @@ input, select, textarea { color: var(--color-ink); }
|
||||
:focus-visible { outline: 2px solid var(--tf-accent); outline-offset: 2px; }
|
||||
.tap { min-height: 44px; min-width: 44px; }
|
||||
|
||||
/* Beschriftungen in Versalien: Plex Sans halbfett, gesperrt (wie die Legende einer Seekarte). */
|
||||
.font-display { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.1em; }
|
||||
/* Titel in Fraunces, normale Schreibung. */
|
||||
/* Versal-Beschriftung (Entwurf: Inter 11 px, gesperrt 0,08 em) – Rubrikzeilen wie „BESETZEN“, „LAGE“. */
|
||||
.font-display { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.08em; }
|
||||
/* Titel in Newsreader, normale Schreibung. */
|
||||
.font-serif, h1.font-display, h2.font-display.text-lg, h2.font-display.text-xl {
|
||||
font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.005em; text-transform: none;
|
||||
font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.01em; text-transform: none;
|
||||
}
|
||||
/* Abschnittstitel 2.0 (Karten, Lage-Gruppen): Fraunces 18 px, Tinte. */
|
||||
.tf-h2 { font-family: var(--font-serif); font-weight: 600; font-size: 18px; line-height: 1.25; letter-spacing: -0.005em; color: var(--tf-ink); text-transform: none; }
|
||||
/* Abschnittstitel (Karten, Lage-Gruppen): Newsreader 21 px, Tinte – darunter die Tintenlinie der Rubrik (.tf-rubric). */
|
||||
.tf-h2 { font-family: var(--font-serif); font-weight: 600; font-size: 21px; line-height: 1.2; letter-spacing: -0.01em; color: var(--tf-ink); text-transform: none; }
|
||||
/* Zentral für alle Bildschirme: Abschnittstitel, die noch als kleine Versal-Beschriftung (h2.font-display.uppercase)
|
||||
gesetzt sind, erscheinen als Fraunces-Titel; Knöpfe in normaler Schreibung statt Versalien. */
|
||||
h2.font-display.uppercase { font-family: var(--font-serif); font-size: 18px; font-weight: 600; line-height: 1.25; letter-spacing: -0.005em; text-transform: none; color: var(--tf-ink); }
|
||||
button.font-display.uppercase { font-family: var(--font-sans); text-transform: none; letter-spacing: 0.02em; font-weight: 600; }
|
||||
gesetzt sind, erscheinen als Newsreader-Titel; Knöpfe in normaler Schreibung statt Versalien. */
|
||||
h2.font-display.uppercase { font-family: var(--font-serif); font-size: 19px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; text-transform: none; color: var(--tf-ink); }
|
||||
button.font-display.uppercase { font-family: var(--font-sans); text-transform: none; letter-spacing: 0.01em; font-weight: 600; }
|
||||
/* Kleine Versal-Beschriftung (JETZT, STUFE 2, KOSTEN AUSBAU). */
|
||||
.tf-label { font-family: var(--font-sans); font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tf-ink2); }
|
||||
/* Große Kennzahl (Gebäudeblatt). */
|
||||
.tf-figure { font-family: var(--font-mono); font-weight: 500; font-size: 22px; line-height: 1.2; }
|
||||
.mono { font-family: var(--font-mono); font-weight: 500; }
|
||||
.tf-label { font-family: var(--font-sans); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tf-ink2); }
|
||||
/* Große Kennzahl (Gebäudeblatt, Restzeit). */
|
||||
.tf-figure { font-family: var(--font-mono); font-weight: 600; font-size: 24px; line-height: 1.15; letter-spacing: -0.02em; }
|
||||
.mono { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
|
||||
|
||||
/* Fläche: Karte (6 px, feine Linie). */
|
||||
.panel { background: var(--tf-card); border: 1px solid var(--tf-rule); }
|
||||
/* Kopf eines Panels: feste Tintenlinie oben (2.0: 2 px statt doppelt). */
|
||||
/* Haarlinien statt Kästen: .panel ist eine offene Fläche zwischen zwei Haarlinien (kein Rahmen, kein Grund).
|
||||
In @layer components, damit Zustandsstreifen (border-l-4 + Farbe) und andere Hilfsklassen sie überschreiben. */
|
||||
@layer components {
|
||||
.panel { background: transparent; border-style: solid; border-color: var(--tf-rule); border-width: 1px 0; }
|
||||
}
|
||||
/* Karte (ui.tsx Card): Rubrik – Newsreader-Titel über einer 2-px-Tintenlinie, darunter offener Inhalt. */
|
||||
.tf-card { margin-bottom: 20px; }
|
||||
.tf-card-plain { border-top: 1px solid var(--tf-rule); padding-top: 12px; }
|
||||
.tf-rubric { border-bottom: 2px solid var(--tf-ink); padding-bottom: 6px; margin-bottom: 10px; }
|
||||
/* Kopf eines Abschnitts: Tintenlinie. */
|
||||
.brass-edge { border-top: 2px solid var(--tf-ink); }
|
||||
.rule-double { border-bottom: 2px solid var(--tf-ink); }
|
||||
/* Knöpfe 2.0: Akzent gefüllt, Umriss in Akzent, leise mit feiner Linie; halbfett, normale Schreibung. */
|
||||
.btn-primary { background: var(--tf-accent); color: var(--tf-on-accent); border: 1px solid var(--tf-accent); font-weight: 600; }
|
||||
.btn-primary:active { filter: brightness(0.9); }
|
||||
/* Knöpfe: Hauptknopf Tinte gefüllt (Entwurf „Auf der Karte zeigen“), Umriss in Tinte, leise mit Haarlinie; 2 px Ecken. */
|
||||
.btn-primary { background: var(--tf-ink); color: var(--tf-paper); border: 1px solid var(--tf-ink); font-weight: 600; }
|
||||
.btn-primary:active { filter: brightness(0.85); }
|
||||
.btn-danger { background: var(--tf-siegel); color: var(--tf-on-strong); border: 1px solid var(--tf-siegel); font-weight: 600; }
|
||||
.btn-danger:active { filter: brightness(0.9); }
|
||||
.btn-secondary { background: transparent; color: var(--tf-accent-ink); border: 1px solid var(--tf-accent); font-weight: 600; }
|
||||
.btn-secondary { background: transparent; color: var(--tf-ink); border: 1px solid var(--tf-ink); font-weight: 600; }
|
||||
.btn-secondary:active { background: var(--tf-inset); }
|
||||
/* Leiser Knopf (Nebenaktionen wie „alle zeigen“, „ändern“): Rahmen statt unterstrichenem Link. */
|
||||
.btn-quiet { background: var(--tf-card); color: var(--tf-ink); border: 1px solid var(--tf-rule); }
|
||||
/* Leiser Knopf (Nebenaktionen wie „alle zeigen“, „ändern“): Akzentschrift auf Haarlinie. */
|
||||
.btn-quiet { background: transparent; color: var(--tf-accent-ink); border: 1px solid var(--tf-rule); font-weight: 600; }
|
||||
.btn-quiet:active { background: var(--tf-inset); }
|
||||
.field { background: var(--tf-field); border: 1px solid var(--tf-rule2); color: var(--tf-ink); }
|
||||
.field:focus { border-color: var(--tf-accent); }
|
||||
.field:focus { border-color: var(--tf-ink); }
|
||||
select.field, select { background-color: var(--tf-field); color: var(--tf-ink); }
|
||||
/* Gepunkteter Trenner zwischen Zeilen einer Karte. */
|
||||
.tf-dots { border-top: 1px dotted var(--tf-rule2); }
|
||||
/* Fortschrittsbalken 2.0: 5 px, gerundet, Bahn in track. */
|
||||
.tf-track { background: var(--tf-track); border-radius: 3px; overflow: hidden; }
|
||||
/* Hinweiszeile mit Messinglinie links (Gezeit, Ausbaubild). */
|
||||
/* Fortschrittsbalken: 3 px, eckig, Bahn in track (Entwurf). */
|
||||
.tf-track { background: var(--tf-track); overflow: hidden; }
|
||||
/* Hinweiszeile mit Linie links (Gezeit, Ausbaubild). */
|
||||
.tf-note { border-left: 3px solid var(--tf-brass); padding-left: 10px; }
|
||||
/* Zustandsstreifen (Entwurf: 7 px links) – voll, schraffiert (Rückfahrt) oder als Rahmen (Hinfahrt). */
|
||||
.tf-stripe { width: 7px; align-self: stretch; flex: none; }
|
||||
.tf-stripe-hatch { background-image: repeating-linear-gradient(135deg, var(--tf-accent) 0 3px, transparent 3px 6px); }
|
||||
.tf-stripe-frame { box-shadow: inset 0 0 0 2px var(--tf-accent); }
|
||||
/* Ladung als Raster (Spaltensatz): Zahl oben, Name klein darunter, Haarlinie darüber. */
|
||||
.tf-cargo { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 0 10px; }
|
||||
.tf-cargo > * { border-top: 1px solid var(--tf-rule); padding-top: 6px; }
|
||||
|
||||
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tf-siegel) 45%, transparent); } 100% { box-shadow: 0 0 0 8px transparent; } }
|
||||
.pulse { animation: pulse-ring 2s ease-out infinite; }
|
||||
@keyframes slide-up { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
|
||||
.sheet-in { animation: slide-up 220ms cubic-bezier(0.2, 0.7, 0.2, 1); }
|
||||
/* Laufender Fortschritt: schräge Schraffur. */
|
||||
.stripes { background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--tf-card) 35%, transparent) 0 2px, transparent 2px 6px); }
|
||||
/* Laufender Fortschritt: leise schräge Schraffur. */
|
||||
.stripes { background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--tf-card) 22%, transparent) 0 2px, transparent 2px 6px); }
|
||||
.hatch { background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--tf-ink) 16%, transparent) 0 1px, transparent 1px 4px); }
|
||||
/* Hervorgehobene Kachel: innerer Seeblau-Rahmen. */
|
||||
.reticle { position: relative; box-shadow: inset 0 0 0 1px var(--tf-accent); border-color: var(--tf-accent) !important; }
|
||||
/* Hervorgehobene Kachel: innerer Tintenrahmen. */
|
||||
.reticle { position: relative; box-shadow: inset 0 0 0 1px var(--tf-ink); border-color: var(--tf-ink) !important; }
|
||||
.reticle::before, .reticle::after { content: none; }
|
||||
/* Raute als Aufzählungszeichen (Logbuch). */
|
||||
.diamond { width: 9px; height: 9px; transform: rotate(45deg); display: inline-block; flex: none; }
|
||||
|
||||
|
||||
/* Börse: Tickerband (Tinte mit Papierschrift), Kurstafel und Kurszettel. */
|
||||
.ticker { background: var(--tf-head); color: var(--tf-head-ink); }
|
||||
.ticker-up { color: var(--tf-head-good); }
|
||||
.ticker-down { color: var(--tf-head-alarm); }
|
||||
/* Börse: Kurszeile auf Papier zwischen Haarlinien (Entwurf: „BÖRSE Treibstoff 1,74 ▼ −0,5 % 24 h“), Kursrichtung per Pfeil;
|
||||
steigend Grün, fallend Warnorange (Rot bleibt dem Alarm vorbehalten). Kurstafel und Kurszettel. */
|
||||
.ticker { background: var(--tf-paper); color: var(--tf-ink); }
|
||||
.ticker-up { color: var(--tf-moos); }
|
||||
.ticker-down { color: var(--tf-warn-ink); }
|
||||
.ticker-track { display: flex; width: max-content; animation: ticker-run 38s linear infinite; }
|
||||
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
|
||||
@keyframes ticker-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }
|
||||
|
||||
+85
-91
@@ -1,127 +1,121 @@
|
||||
/* Design-Tokens „Seekarte 2.0“ (Entwürfe S5Lage/S5Karte/S5Gebaeude/S5Desktop), hell und dunkel.
|
||||
/* Design-Tokens „Hafenpapier“ (Entwurf V1: V1-Einsatz hell, V1-Meldung dunkel „Nachtpapier“) – beide Modi gleichwertig.
|
||||
Ruhige Logbuch-/Zeitungsseite: Papier, Tinte, Haarlinien; Akzentblau für Handlung, Rot nur für Alarm.
|
||||
Rohwerte heißen --tf-*; styles.css bildet alle Farbklassen (paper, ink, messing, siegel, see, moos, slate-… usw.)
|
||||
per @theme inline darauf ab. Modus: <html data-theme="light|dark"> (index.html setzt ihn vor dem ersten Bild,
|
||||
lib/theme.ts hält ihn aktuell). Kontraste (Text ≥ 4,5:1 auf paper/card/inset, beide Modi) prüft der Test
|
||||
packages/game-core/test/theme-contrast.test.ts direkt an dieser Datei. Kartenfarben: lib/theme-map.ts. */
|
||||
:root {
|
||||
color-scheme: light;
|
||||
--tf-paper: #f4efe4; /* Seitengrund (Entwurf bg) */
|
||||
--tf-card: #fffaf0; /* Karten (Entwurf paper) */
|
||||
--tf-inset: #efe8d8; /* leise Fläche in Karten */
|
||||
--tf-track: #e7dfcb; /* Balkenbahn */
|
||||
--tf-plate: #f6f1e5; /* Bildgrund der Gebäude-/Einheitenbilder */
|
||||
--tf-field: #fffdf8; /* Eingabefelder, Kurszettel */
|
||||
--tf-ink: #14243a;
|
||||
--tf-ink2: #4a5568; /* Entwurf muted */
|
||||
--tf-rule: #d9cfb8;
|
||||
--tf-rule2: #b9ab8a; /* kräftigere Linie (alte navy-600) */
|
||||
--tf-accent: #1e3a5f; /* Hauptknopf, Reiterlinie, Fortschritt */
|
||||
--tf-on-accent: #f4efe4;
|
||||
--tf-accent-ink: #1e3a5f; /* Akzent als Schrift */
|
||||
--tf-see: #24507a; /* Verweise, Hinweise in Blau */
|
||||
--tf-siegel: #a8321f; /* Alarm, Fehler */
|
||||
--tf-siegel-bg: #fbe9e4;
|
||||
--tf-siegel-ink: #6b2a1c;
|
||||
--tf-moos: #2f6b4f; /* gut, Gewinn */
|
||||
--tf-moos-bg: #e7f1e9;
|
||||
--tf-moos-line: #9cc5a9;
|
||||
--tf-messing: #7e5a1e; /* Messing als Schrift (≥ 4,5:1) */
|
||||
--tf-brass: #a37f2c; /* Messing für Balken und Linien */
|
||||
--tf-warn: #e07a4a; /* Füllstand ≥ 85 % (Balken) */
|
||||
--tf-paper: #f5f1e8; /* Seitengrund (Entwurf bg) */
|
||||
--tf-card: #fffdf7; /* Blätter, Karten (Entwurf card) */
|
||||
--tf-inset: #ede7da; /* leise Fläche */
|
||||
--tf-track: #e6dfcf; /* Balkenbahn */
|
||||
--tf-plate: #f8f4ec; /* Bildgrund der Gebäude-/Einheitenbilder */
|
||||
--tf-field: #fffdf7; /* Eingabefelder, Kurszettel */
|
||||
--tf-ink: #1a2230;
|
||||
--tf-ink2: #545d6b; /* Entwurf grey */
|
||||
--tf-rule: #ddd5c4; /* Haarlinie */
|
||||
--tf-rule2: #b8ad96; /* kräftigere Linie */
|
||||
--tf-accent: #1f4e79; /* Handlung: Verweise, Zähler, Fortschritt */
|
||||
--tf-on-accent: #f5f1e8;
|
||||
--tf-accent-ink: #1f4e79; /* Akzent als Schrift */
|
||||
--tf-see: #1f4e79; /* Verweise, Hinweise in Blau */
|
||||
--tf-siegel: #b3361f; /* nur Alarm, Fehler */
|
||||
--tf-siegel-bg: #f8e6e1;
|
||||
--tf-siegel-ink: #6e2414;
|
||||
--tf-moos: #2c6a4a; /* gut, Gewinn, vor Ort */
|
||||
--tf-moos-bg: #e4eee6;
|
||||
--tf-moos-line: #9cc2a8;
|
||||
--tf-messing: #7a5a1e; /* Ocker als Schrift (Belohnung, bereit) */
|
||||
--tf-brass: #8f6f2e; /* Ocker für Linien */
|
||||
--tf-warn: #93441a; /* Füllstand ≥ 85 % (Balken) */
|
||||
--tf-warn-ink: #93441a; /* Warnorange als Schrift */
|
||||
--tf-on-strong: #ffffff; /* Schrift auf siegel/moos/messing-Flächen */
|
||||
--tf-nav-sel: #e7dfcb;
|
||||
--tf-scrim: rgba(20, 36, 58, 0.45);
|
||||
--tf-shadow: rgba(20, 36, 58, 0.14);
|
||||
/* Kopfleiste (auch im hellen Modus dunkel) */
|
||||
--tf-head: #14243a;
|
||||
--tf-head-ink: #f4efe4;
|
||||
--tf-head-muted: #c8bfa8;
|
||||
--tf-head-track: #2d4466;
|
||||
--tf-head-good: #9fd3a8;
|
||||
--tf-head-alarm: #ffab96;
|
||||
--tf-head-warn: #f0a070;
|
||||
--tf-on-strong: #ffffff; /* Schrift auf siegel/moos-Flächen */
|
||||
--tf-nav-sel: #ebe5d7;
|
||||
--tf-scrim: rgba(26, 34, 48, 0.45);
|
||||
--tf-shadow: rgba(26, 34, 48, 0.12);
|
||||
/* Statusleiste (iPhone „black-translucent“: weiße Uhr) – schmaler Tintenstreifen über dem Kopf, wie ein Zeitungskopf. */
|
||||
--tf-statusbar: #1a2230;
|
||||
/* Kopfleiste: Papier mit Tintenlinie (Entwurf header), gleiche Töne wie die Seite. */
|
||||
--tf-head: #f5f1e8;
|
||||
--tf-head-ink: #1a2230;
|
||||
--tf-head-muted: #545d6b;
|
||||
--tf-head-track: #e6dfcf;
|
||||
--tf-head-good: #2c6a4a;
|
||||
--tf-head-alarm: #b3361f;
|
||||
--tf-head-warn: #93441a;
|
||||
/* Zeichnungen (icons-art.tsx, building-art): Tinte auf Papier, im Dunkeln umgekehrt */
|
||||
--tf-art-ink: #18273a;
|
||||
--tf-art-paper: #fbf8f0;
|
||||
--tf-art-siegel: #a8331f;
|
||||
--tf-art-see: #2d5b7a;
|
||||
--tf-art-moos: #2f6b47;
|
||||
--tf-art-messing: #8a6424;
|
||||
--tf-art-luft: #4f5b69;
|
||||
--tf-art-anlage: #6b5a3a;
|
||||
--tf-placeholder: #5d6676;
|
||||
--tf-art-ink: #1a2230;
|
||||
--tf-art-paper: #fbf8f1;
|
||||
--tf-art-siegel: #b3361f;
|
||||
--tf-art-see: #1f4e79;
|
||||
--tf-art-moos: #2c6a4a;
|
||||
--tf-art-messing: #8f6f2e;
|
||||
--tf-art-luft: #545d6b;
|
||||
--tf-art-anlage: #6b5d42;
|
||||
--tf-placeholder: #5f6876;
|
||||
}
|
||||
|
||||
:root[data-theme="dark"] {
|
||||
color-scheme: dark;
|
||||
--tf-paper: #0e1726;
|
||||
--tf-card: #15233a;
|
||||
--tf-inset: #1b2a42;
|
||||
--tf-track: #22324b;
|
||||
--tf-plate: #111d31;
|
||||
--tf-field: #0f1a2c;
|
||||
--tf-ink: #ece4d2;
|
||||
--tf-ink2: #a3afc2;
|
||||
--tf-rule: #2a3b55;
|
||||
--tf-rule2: #3d5373;
|
||||
--tf-accent: #8bb8e8;
|
||||
--tf-on-accent: #0a111d;
|
||||
--tf-accent-ink: #a9cdf2;
|
||||
--tf-see: #a9cdf2;
|
||||
--tf-paper: #121417;
|
||||
--tf-card: #1a1d21;
|
||||
--tf-inset: #1f2226;
|
||||
--tf-track: #2a2e34;
|
||||
--tf-plate: #17191d;
|
||||
--tf-field: #16181b;
|
||||
--tf-ink: #ece6da;
|
||||
--tf-ink2: #a9a397;
|
||||
--tf-rule: #30343a;
|
||||
--tf-rule2: #474c54;
|
||||
--tf-accent: #8db6e0;
|
||||
--tf-on-accent: #0d1520;
|
||||
--tf-accent-ink: #8db6e0;
|
||||
--tf-see: #8db6e0;
|
||||
--tf-siegel: #ff8f78;
|
||||
--tf-siegel-bg: #3a1712;
|
||||
--tf-siegel-bg: #3a1a14;
|
||||
--tf-siegel-ink: #ffc2b4;
|
||||
--tf-moos: #86c99a;
|
||||
--tf-moos-bg: #14301f;
|
||||
--tf-moos-line: #2f6b4f;
|
||||
--tf-moos: #8fc9a3;
|
||||
--tf-moos-bg: #15291d;
|
||||
--tf-moos-line: #2f5c40;
|
||||
--tf-messing: #d9b25c;
|
||||
--tf-brass: #d9b25c;
|
||||
--tf-brass: #c9a352;
|
||||
--tf-warn: #f0a070;
|
||||
--tf-warn-ink: #f0a070;
|
||||
--tf-on-strong: #0a111d;
|
||||
--tf-nav-sel: #22324b;
|
||||
--tf-scrim: rgba(2, 5, 10, 0.7);
|
||||
--tf-on-strong: #121417;
|
||||
--tf-nav-sel: #23272c;
|
||||
--tf-scrim: rgba(0, 0, 0, 0.62);
|
||||
--tf-shadow: rgba(0, 0, 0, 0.45);
|
||||
--tf-head: #0a111d;
|
||||
--tf-head-ink: #ece4d2;
|
||||
--tf-head-muted: #8e9bb0;
|
||||
--tf-head-track: #22324b;
|
||||
--tf-head-good: #86c99a;
|
||||
--tf-statusbar: #121417;
|
||||
--tf-head: #121417;
|
||||
--tf-head-ink: #ece6da;
|
||||
--tf-head-muted: #a9a397;
|
||||
--tf-head-track: #2a2e34;
|
||||
--tf-head-good: #8fc9a3;
|
||||
--tf-head-alarm: #ff8f78;
|
||||
--tf-head-warn: #f0a070;
|
||||
--tf-art-ink: #e4dccb;
|
||||
--tf-art-paper: #1a2a42;
|
||||
--tf-art-ink: #e6e0d3;
|
||||
--tf-art-paper: #1c1f23;
|
||||
--tf-art-siegel: #ff8f78;
|
||||
--tf-art-see: #8bb8e8;
|
||||
--tf-art-moos: #86c99a;
|
||||
--tf-art-see: #8db6e0;
|
||||
--tf-art-moos: #8fc9a3;
|
||||
--tf-art-messing: #d9b25c;
|
||||
--tf-art-luft: #a3afc2;
|
||||
--tf-art-anlage: #c9b28a;
|
||||
--tf-placeholder: #8e9bb0;
|
||||
--tf-art-luft: #a9a397;
|
||||
--tf-art-anlage: #c4b08a;
|
||||
--tf-placeholder: #8a8478;
|
||||
}
|
||||
|
||||
/* Kopfleiste: dunkler Streifen in beiden Modi – Tokens im Teilbaum umgestellt, damit text-ink, text-ink2, text-moos …
|
||||
dort hell erscheinen. Blätter (Sheet) hängen am <body> und erben das nicht. */
|
||||
/* Kopfleiste: Papier mit Tintenlinie unten. Die Tokens im Teilbaum zeigen auf die Kopf-Töne (heute gleich der Seite),
|
||||
damit ein eigener Kopfton jederzeit hier umstellbar bleibt. Blätter (Sheet) hängen am <body> und erben das nicht. */
|
||||
.tf-head {
|
||||
--tf-paper: var(--tf-head);
|
||||
--tf-card: var(--tf-head);
|
||||
--tf-inset: var(--tf-head-track);
|
||||
--tf-track: var(--tf-head-track);
|
||||
--tf-ink: var(--tf-head-ink);
|
||||
--tf-ink2: var(--tf-head-muted);
|
||||
--tf-rule: var(--tf-head-track);
|
||||
--tf-moos: var(--tf-head-good);
|
||||
--tf-siegel: var(--tf-head-alarm);
|
||||
--tf-messing: var(--tf-head-warn);
|
||||
--tf-see: var(--tf-head-ink);
|
||||
--tf-accent: var(--tf-head-ink);
|
||||
--tf-accent-ink: var(--tf-head-ink);
|
||||
--tf-art-ink: var(--tf-head-ink);
|
||||
--tf-art-paper: var(--tf-head);
|
||||
--tf-art-moos: var(--tf-head-good);
|
||||
--tf-art-siegel: var(--tf-head-alarm);
|
||||
--tf-art-messing: var(--tf-head-warn);
|
||||
background: var(--tf-head);
|
||||
color: var(--tf-head-ink);
|
||||
}
|
||||
|
||||
+20
-19
@@ -62,12 +62,12 @@ export function Card({ title, children, right, collapsible, summary, storageKey,
|
||||
}) {
|
||||
const [stored, setOpen] = useStoredOpen(collapsible ? storageKey : undefined, defaultOpen);
|
||||
const open = !collapsible || stored;
|
||||
// Seekarte 2.0: Kartentitel in Fraunces (18 px), Karte mit 6 px Radius und feiner Linie.
|
||||
// Hafenpapier: Rubrik statt Kasten – Newsreader-Titel (21 px) über einer 2-px-Tintenlinie, Inhalt offen auf dem Papier.
|
||||
const h2 = "tf-h2 flex items-center gap-2 min-w-0";
|
||||
return (
|
||||
<section id={id} className="panel rounded-xl p-3 mb-3">
|
||||
<section id={id} className={`tf-card ${title === undefined ? "tf-card-plain" : ""}`}>
|
||||
{title !== undefined && (collapsible ? (
|
||||
<div className={`flex items-start justify-between gap-2 ${open ? "mb-2" : ""}`}>
|
||||
<div className={`tf-rubric flex items-start justify-between gap-2 ${open ? "" : "!mb-0"}`}>
|
||||
<button type="button" aria-expanded={open} onClick={() => setOpen(!open)} className="tap -my-2 py-2 flex-1 min-w-0 text-left">
|
||||
<h2 className={h2}>{title}<span aria-hidden className="ml-auto text-ink2 text-[13px] leading-none font-sans">{open ? "▴" : "▾"}</span></h2>
|
||||
{!open && summary !== undefined && <div className="mt-1 text-sm text-ink normal-case tracking-normal font-sans">{summary}</div>}
|
||||
@@ -75,7 +75,7 @@ export function Card({ title, children, right, collapsible, summary, storageKey,
|
||||
{right}
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex items-center justify-between mb-2 gap-2">
|
||||
<div className="tf-rubric flex items-end justify-between gap-2">
|
||||
<h2 className={h2}>{title}</h2>
|
||||
{right}
|
||||
</div>
|
||||
@@ -96,8 +96,8 @@ const KIND: Record<BtnKind, string> = {
|
||||
/** Zurück-Knopf der Kopfzeilen: bricht nie um, mit Pfeil. */
|
||||
export function BackButton({ onClick, label = "Zurück" }: { onClick: () => void; label?: string }) {
|
||||
return (
|
||||
<button type="button" onClick={onClick} className="tap shrink-0 whitespace-nowrap inline-flex items-center gap-1.5 rounded-lg px-3 btn-secondary text-[13px]">
|
||||
<span aria-hidden="true" className="text-base leading-none -mt-px">‹</span>{label}
|
||||
<button type="button" onClick={onClick} className="tap shrink-0 whitespace-nowrap inline-flex items-center gap-1 rounded-lg pl-1 pr-3 text-ink font-medium text-[15px]">
|
||||
<svg aria-hidden="true" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round"><path d="M15 5l-7 7 7 7" /></svg>{label}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
@@ -284,16 +284,16 @@ export function Sheet({ open, onClose, title, icon, children }: { open: boolean;
|
||||
// Desktop (ab 1024 px, Navigationsumbau): rechte Schublade über der Seitenleiste statt mittig unten.
|
||||
<div className="fixed inset-0 z-50 flex items-end justify-center lg:items-stretch lg:justify-end text-ink font-sans" role="dialog" aria-modal="true">
|
||||
<button type="button" aria-label="Schließen" className="absolute inset-0 bg-[var(--tf-scrim)]" onClick={onClose} />
|
||||
<div ref={panel} className="sheet-in relative w-full max-w-xl max-h-[88vh] overflow-y-auto rounded-t-[16px] bg-card border-t-2 border-ink shadow-[0_-10px_30px_var(--tf-shadow)] px-4 pb-4 lg:max-w-[540px] lg:max-h-none lg:h-full lg:rounded-none lg:border-t-0 lg:border-l-2 lg:pt-[var(--tf-safe-top)]" style={{ paddingBottom: "calc(1rem + env(safe-area-inset-bottom))" }}>
|
||||
<div ref={panel} className="sheet-in relative w-full max-w-xl max-h-[88vh] overflow-y-auto rounded-t-[12px] bg-card border-t-2 border-ink shadow-[0_-10px_30px_var(--tf-shadow)] px-4 pb-4 lg:max-w-[540px] lg:max-h-none lg:h-full lg:rounded-none lg:border-t-0 lg:border-l-2 lg:pt-[var(--tf-safe-top)]" style={{ paddingBottom: "calc(1rem + env(safe-area-inset-bottom))" }}>
|
||||
<div className="sticky top-0 z-10 bg-card -mx-4 px-4 touch-none select-none" onPointerDown={onDown} onPointerMove={onMove} onPointerUp={onUp} onPointerCancel={onUp}>
|
||||
{/* Zeigertippen erledigt onUp (Zeiger ist eingefangen); onClick nur für Tastatur (detail 0). */}
|
||||
<button type="button" data-grip aria-label="Blatt schließen (oder nach unten ziehen)" onClick={(e) => e.detail === 0 && onClose()} className="flex items-center justify-center mx-auto h-11 w-28 cursor-grab">
|
||||
<span className="block h-1 w-10 rounded-full bg-rule" />
|
||||
</button>
|
||||
<div className="flex items-center gap-3 mb-3 pb-2">
|
||||
<div className="flex items-center gap-3 mb-3 pb-2 border-b border-rule">
|
||||
{icon}
|
||||
<h2 className="font-serif font-bold text-[22px] leading-tight flex-1 min-w-0">{title}</h2>
|
||||
<button type="button" data-close className="tap rounded-2xl border border-rule text-ink text-base" onClick={onClose} aria-label="Schließen">✕</button>
|
||||
<h2 className="font-serif font-semibold text-[24px] leading-[1.15] tracking-[-0.01em] flex-1 min-w-0">{title}</h2>
|
||||
<button type="button" data-close className="tap rounded-[2px] text-ink text-base" onClick={onClose} aria-label="Schließen">✕</button>
|
||||
</div>
|
||||
</div>
|
||||
{children}
|
||||
@@ -316,13 +316,13 @@ export function StatTable({ rows }: { rows: [string, string][] }) {
|
||||
);
|
||||
}
|
||||
|
||||
/** Fortschrittsbalken mit Streifen, solange er läuft. */
|
||||
/** Fortschrittsbalken (Hafenpapier: 3 px, Tinte auf Bahn; Farbe nur, wo sie etwas bedeutet). */
|
||||
export function Bar({ value, tone = "sea" }: { value: number; tone?: "sea" | "brass" | "red" | "green" }) {
|
||||
const color = { sea: "bg-accent", brass: "bg-brass", red: "bg-siegel", green: "bg-moos" }[tone];
|
||||
const color = { sea: "bg-ink", brass: "bg-accent", red: "bg-siegel", green: "bg-moos" }[tone];
|
||||
const v = Math.max(0, Math.min(1, value));
|
||||
return (
|
||||
<div className="h-[5px] w-full tf-track">
|
||||
<div className={`h-full ${color} ${v > 0 && v < 1 ? "stripes" : ""}`} style={{ width: `${v * 100}%` }} />
|
||||
<div className="h-[3px] w-full tf-track">
|
||||
<div className={`h-full ${color}`} style={{ width: `${v * 100}%` }} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -335,7 +335,8 @@ export function Badge({ children, tone = "slate" }: { children: ReactNode; tone?
|
||||
red: "border-siegel text-siegel",
|
||||
sea: "border-see text-see",
|
||||
}[tone];
|
||||
return <span className={`inline-flex items-center border bg-card px-1.5 py-0.5 rounded text-[11px] font-display uppercase tracking-[0.08em] ${c}`}>{children}</span>;
|
||||
// Hafenpapier: Rubrikmarke ohne Kasten-Grund – Versalien, feine Linie in der Zustandsfarbe.
|
||||
return <span className={`inline-flex items-center border px-1.5 py-0.5 rounded-[2px] text-[11px] font-display font-bold uppercase tracking-[0.08em] ${c}`}>{children}</span>;
|
||||
}
|
||||
|
||||
/** Ressourcen als Symbol und Zahl. */
|
||||
@@ -370,7 +371,7 @@ function segId(aria: string): string {
|
||||
}
|
||||
|
||||
/**
|
||||
* Ebene 1 der zwei Umschalter-Bauformen (Ebene 2: FilterChips). Segment-Schalter (Unterreiter) im Muster von Meldungen: klebt oben, rote Linie unter dem gewählten.
|
||||
* Ebene 1 der zwei Umschalter-Bauformen (Ebene 2: FilterChips). Segment-Schalter (Unterreiter) im Muster von Meldungen: klebt oben, Newsreader, Tintenlinie unter dem gewählten.
|
||||
* Wahl wird mit storageKey geräteweit gemerkt (useSegment). Barrierefrei als Tabs: Pfeiltasten (←/→, Pos1/Ende)
|
||||
* wechseln, nur der gewählte Reiter liegt in der Tab-Reihenfolge; den Inhalt in <SegmentPanel label=…> legen.
|
||||
*/
|
||||
@@ -392,10 +393,10 @@ export function Segments<T extends string>({ items, value, onChange, label: aria
|
||||
{items.map((t) => (
|
||||
<button key={t.id} id={`${id}-${t.id}`} type="button" role="tab" aria-selected={value === t.id} aria-controls={controls ? `${id}-panel` : undefined}
|
||||
tabIndex={value === t.id ? 0 : -1} onClick={() => onChange(t.id)} onKeyDown={onKey}
|
||||
className={`tap flex-auto shrink-0 px-3 whitespace-nowrap text-[15px] font-serif flex items-center justify-center gap-1.5 border-b-2 -mb-px ${value === t.id ? "border-accent text-ink font-bold" : "border-transparent text-ink2"}`}>
|
||||
className={`tap flex-auto shrink-0 px-3 whitespace-nowrap text-[17px] font-serif flex items-center justify-center gap-1.5 border-b-2 -mb-px ${value === t.id ? "border-ink text-ink" : "border-transparent text-ink2 !font-medium"}`}>
|
||||
<span>{t.label}</span>
|
||||
{!!t.badge && t.dot && <><span aria-hidden="true" data-testid="seg-dot" className="shrink-0 w-2 h-2 rounded-full bg-siegel" /><span className="sr-only">, {t.badge} neu</span></>}
|
||||
{!!t.badge && !t.dot && <span className="shrink-0 min-w-5 h-5 px-1 rounded-full bg-siegel text-on-strong text-[11px] font-sans mono grid place-items-center">{t.badge}</span>}
|
||||
{!!t.badge && t.dot && <><span aria-hidden="true" data-testid="seg-dot" className="shrink-0 w-2 h-2 rounded-full bg-accent" /><span className="sr-only">, {t.badge} neu</span></>}
|
||||
{!!t.badge && !t.dot && <span className="shrink-0 min-w-5 h-5 px-1.5 rounded-full bg-accent text-on-accent text-[11px] mono grid place-items-center">{t.badge}</span>}
|
||||
</button>
|
||||
))}
|
||||
</HScroll>
|
||||
|
||||
Generated
+14
-14
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "tidefront",
|
||||
"version": "0.56.0",
|
||||
"version": "0.56.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "tidefront",
|
||||
"version": "0.56.0",
|
||||
"version": "0.56.1",
|
||||
"workspaces": [
|
||||
"packages/*",
|
||||
"apps/*"
|
||||
@@ -45,9 +45,9 @@
|
||||
"name": "@tidefront/web",
|
||||
"version": "0.2.0",
|
||||
"dependencies": {
|
||||
"@fontsource/fraunces": "^5.3.0",
|
||||
"@fontsource/ibm-plex-mono": "^5.3.0",
|
||||
"@fontsource/ibm-plex-sans": "^5.3.0",
|
||||
"@fontsource/inter": "^5.3.0",
|
||||
"@fontsource/jetbrains-mono": "^5.3.0",
|
||||
"@fontsource/newsreader": "^5.3.0",
|
||||
"@tanstack/react-query": "^5.108.4",
|
||||
"@trpc/client": "^11.31.4",
|
||||
"@trpc/tanstack-react-query": "^11.31.4",
|
||||
@@ -1186,28 +1186,28 @@
|
||||
"ws": "^8.16.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@fontsource/fraunces": {
|
||||
"node_modules/@fontsource/inter": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@fontsource/fraunces/-/fraunces-5.3.0.tgz",
|
||||
"integrity": "sha512-LEHTOBiZufQzAvnAe2rZ8ZknbDS28Q9kzwb0L+gZJEmjLGr8hhZ/5NuHXwDuHBWhVXYoiGGXmrb0H6Ko/RrHTg==",
|
||||
"resolved": "https://registry.npmjs.org/@fontsource/inter/-/inter-5.3.0.tgz",
|
||||
"integrity": "sha512-RofMylZmjlJEfELXeNHFWBRcSs75rGU/6bV2S2jfnvv/3rPXPGe0LgUJTklcHZ9lM4OZmAVFhcJPnACfb91A3g==",
|
||||
"license": "OFL-1.1",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ayuhito"
|
||||
}
|
||||
},
|
||||
"node_modules/@fontsource/ibm-plex-mono": {
|
||||
"node_modules/@fontsource/jetbrains-mono": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@fontsource/ibm-plex-mono/-/ibm-plex-mono-5.3.0.tgz",
|
||||
"integrity": "sha512-eTgnZjZEGk1QtD3ZstF+Vclo2HLAni8YMy34/DxllwZvyz1lR/1RF/xTiAquOBO7MvqBx8D2Ig2WCPMVfdZu7Q==",
|
||||
"resolved": "https://registry.npmjs.org/@fontsource/jetbrains-mono/-/jetbrains-mono-5.3.0.tgz",
|
||||
"integrity": "sha512-fqDfB5I9f1p1TV486aUgB9t8zP84P0O1FtQR5Ol9vjwPy+S+EIGlVYm1cvj2W5shcZMTg2nZFdVMoH5wFu8a1A==",
|
||||
"license": "OFL-1.1",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ayuhito"
|
||||
}
|
||||
},
|
||||
"node_modules/@fontsource/ibm-plex-sans": {
|
||||
"node_modules/@fontsource/newsreader": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@fontsource/ibm-plex-sans/-/ibm-plex-sans-5.3.0.tgz",
|
||||
"integrity": "sha512-CbE4CbbEEZJX860XyUiRpsksXIQR8Rp2XDva2VO53NJox9tVNtusrysd2x5YkUEY3ErQ66W1IiiQL8/wihhw5w==",
|
||||
"resolved": "https://registry.npmjs.org/@fontsource/newsreader/-/newsreader-5.3.0.tgz",
|
||||
"integrity": "sha512-AFR6ZKY89GNL+9qBI2P2+66NhD5bhOj/v6fsLnFYLM4E0JnMB1yKb+Ro8cA64i1hwAWoBfTq5CHJGWH1toLDkw==",
|
||||
"license": "OFL-1.1",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ayuhito"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Jeder Baustein hat eine HTML-Form (Tabellen-Layout, Inline-Styles, Klassen für Dunkelmodus) und eine Textform.
|
||||
import type { MailTheme } from "./mail-templates.ts";
|
||||
|
||||
/** Färbung: Sieg (grün), Niederlage (siegelrot), Warnung (bernstein), Hinweis (tinte). */
|
||||
/** Färbung: Sieg (grün), Niederlage (rot – Alarm), Warnung (warnorange), Hinweis (tinte). */
|
||||
export type Tone = "win" | "loss" | "warn" | "info";
|
||||
|
||||
/** Zelle einer Tabelle: Text oder Text mit Färbung/Hervorhebung. */
|
||||
@@ -55,9 +55,10 @@ export function blockDarkCss(t: MailTheme): string {
|
||||
`.tf-tone-loss{background:${t.darkLossBg}!important;border-color:${t.darkLoss}!important;} .tf-c-loss{color:${t.darkLoss}!important;}`,
|
||||
`.tf-tone-warn{background:${t.darkWarnBg}!important;border-color:${t.darkWarn}!important;} .tf-c-warn{color:${t.darkWarn}!important;}`,
|
||||
`.tf-tone-info{background:${t.darkInfoBg}!important;border-color:${t.darkLine}!important;} .tf-c-info{color:${t.darkText}!important;}`,
|
||||
`.tf-tile{background:${t.darkFactBg}!important;border-color:${t.darkLine}!important;}`,
|
||||
`.tf-tile{border-color:${t.darkLine}!important;}`,
|
||||
`.tf-row-alt td{background:${t.darkStripe}!important;} .tf-tbl,.tf-tbl td,.tf-tbl th{border-color:${t.darkLine}!important;}`,
|
||||
`.tf-th{color:${t.darkMuted}!important;} .tf-foot td{background:${t.darkFactBg}!important;} .tf-rule{border-color:${t.darkLine}!important;}`,
|
||||
`.tf-ink-rule{border-color:${t.darkText}!important;}`,
|
||||
].join("\n ");
|
||||
}
|
||||
|
||||
@@ -71,11 +72,11 @@ function renderTable(b: Extract<MailBlock, { type: "table" }>, t: MailTheme): st
|
||||
const right = align(i) === "right";
|
||||
const color = o.tone ? toneColors(t, o.tone).fg : o.muted ? t.muted : t.text;
|
||||
const cls = o.tone ? `tf-c-${o.tone}` : o.muted ? "tf-muted" : "tf-text";
|
||||
const font = right ? "font-family:'IBM Plex Mono',Menlo,Consolas,monospace;font-size:14px;" : "font-size:14px;";
|
||||
const font = right ? `font-family:${t.mono};font-size:14px;` : "font-size:14px;";
|
||||
return `<td class="${cls}" align="${right ? "right" : "left"}" valign="top" style="padding:7px 8px;${font}line-height:19px;color:${color};border-top:1px solid ${t.line};${o.bold ? "font-weight:700;" : ""}${right ? "white-space:nowrap;" : ""}${extra}">${escHtml(o.v)}</td>`;
|
||||
};
|
||||
const head = b.head.length
|
||||
? `<tr>${b.head.map((h, i) => `<th class="tf-th" align="${align(i) === "right" ? "right" : "left"}" style="padding:6px 8px;font-size:11px;line-height:14px;letter-spacing:1px;text-transform:uppercase;font-weight:600;color:${t.muted};">${escHtml(h)}</th>`).join("")}</tr>`
|
||||
? `<tr>${b.head.map((h, i) => `<th class="tf-th" align="${align(i) === "right" ? "right" : "left"}" style="padding:7px 8px 6px 8px;font-size:11px;line-height:14px;letter-spacing:1px;text-transform:uppercase;font-weight:700;color:${t.muted};">${escHtml(h)}</th>`).join("")}</tr>`
|
||||
: "";
|
||||
const body = rows.map((r, k) => `<tr${k % 2 ? ` class="tf-row-alt"` : ""}>${r.map((c, i) => td(c, i, k % 2 ? `background:${t.stripe};` : "")).join("")}</tr>`).join("\n");
|
||||
const foot = b.foot ? `<tr class="tf-foot">${b.foot.map((c, i) => td(typeof c === "string" ? { v: c, bold: true } : { bold: true, ...c }, i, `background:${t.factBg};`)).join("")}</tr>` : "";
|
||||
@@ -83,7 +84,7 @@ function renderTable(b: Extract<MailBlock, { type: "table" }>, t: MailTheme): st
|
||||
? `<tr><td colspan="${Math.max(1, b.head.length || (b.rows[0]?.length ?? 1))}" class="tf-muted" style="padding:7px 8px;font-size:12px;color:${t.muted};border-top:1px solid ${t.line};">… und ${cut} weitere ${cut === 1 ? "Zeile" : "Zeilen"} – vollständig im Spiel.</td></tr>`
|
||||
: "";
|
||||
const caption = b.caption ? `<div class="tf-muted" style="font-size:12px;line-height:17px;color:${t.muted};margin:0 0 4px 0;">${escHtml(b.caption)}</div>` : "";
|
||||
return `${caption}<table role="presentation" width="100%" cellpadding="0" cellspacing="0" class="tf-tbl" style="margin:0 0 16px 0;border:1px solid ${t.line};border-radius:${t.radius};border-collapse:separate;font-family:${t.font};">
|
||||
return `${caption}<table role="presentation" width="100%" cellpadding="0" cellspacing="0" class="tf-tbl" style="margin:0 0 16px 0;border-collapse:collapse;font-family:${t.font};">
|
||||
${head}
|
||||
${body}
|
||||
${foot}${more}
|
||||
@@ -98,9 +99,9 @@ function renderTiles(b: Extract<MailBlock, { type: "tiles" }>, t: MailTheme): st
|
||||
const cell = (x: (typeof b.tiles)[number], last: boolean) => {
|
||||
const color = x.tone ? toneColors(t, x.tone).fg : t.text;
|
||||
return `<td width="${width}" valign="top" style="padding:0 ${last ? 0 : 8}px 8px 0;">
|
||||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" class="tf-tile" style="background:${t.factBg};border:1px solid ${t.line};border-radius:${t.radius};border-collapse:separate;"><tr><td style="padding:10px 12px;">
|
||||
<div class="tf-muted" style="font-size:11px;line-height:14px;letter-spacing:1px;text-transform:uppercase;color:${t.muted};">${escHtml(x.label)}</div>
|
||||
<div class="${x.tone ? `tf-c-${x.tone}` : "tf-text"}" style="margin-top:3px;font-family:'IBM Plex Mono',Menlo,Consolas,monospace;font-size:18px;line-height:23px;font-weight:700;color:${color};">${escHtml(x.value)}</div>
|
||||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" class="tf-tile" style="border-top:1px solid ${t.line};border-collapse:collapse;"><tr><td style="padding:8px 0 4px 0;">
|
||||
<div class="tf-muted" style="font-size:11px;line-height:14px;letter-spacing:1px;text-transform:uppercase;font-weight:700;color:${t.muted};">${escHtml(x.label)}</div>
|
||||
<div class="${x.tone ? `tf-c-${x.tone}` : "tf-text"}" style="margin-top:3px;font-family:${t.mono};font-size:19px;line-height:24px;font-weight:600;color:${color};">${escHtml(x.value)}</div>
|
||||
</td></tr></table></td>`;
|
||||
};
|
||||
return `<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:0 0 10px 0;">
|
||||
@@ -113,8 +114,8 @@ export function blockHtml(b: MailBlock, t: MailTheme): string {
|
||||
switch (b.type) {
|
||||
case "banner": {
|
||||
const c = toneColors(t, b.tone);
|
||||
return `<table role="presentation" width="100%" cellpadding="0" cellspacing="0" class="tf-tone-${b.tone}" style="margin:0 0 16px 0;background:${c.bg};border-left:5px solid ${c.fg};border-radius:${t.radius};"><tr><td style="padding:14px 16px;font-family:${t.font};">
|
||||
${b.kicker ? `<div class="tf-c-${b.tone}" style="font-size:11px;line-height:14px;letter-spacing:2px;text-transform:uppercase;font-weight:700;color:${c.fg};">${escHtml(b.kicker)}</div>` : ""}
|
||||
return `<table role="presentation" width="100%" cellpadding="0" cellspacing="0" class="tf-tone-${b.tone}" style="margin:0 0 16px 0;background:${c.bg};border-left:7px solid ${c.fg};"><tr><td style="padding:14px 16px;font-family:${t.font};">
|
||||
${b.kicker ? `<div class="tf-c-${b.tone}" style="font-size:11px;line-height:14px;letter-spacing:1px;text-transform:uppercase;font-weight:700;color:${c.fg};">${escHtml(b.kicker)}</div>` : ""}
|
||||
<div class="tf-c-${b.tone}" style="font-family:${t.headingFont};font-size:28px;line-height:33px;font-weight:600;color:${c.fg};margin-top:2px;">${escHtml(b.title)}</div>
|
||||
${b.sub ? `<div class="tf-text" style="font-size:14px;line-height:20px;color:${t.text};margin-top:4px;">${escHtml(b.sub)}</div>` : ""}
|
||||
</td></tr></table>`;
|
||||
@@ -122,13 +123,13 @@ ${b.sub ? `<div class="tf-text" style="font-size:14px;line-height:20px;color:${t
|
||||
case "tiles":
|
||||
return b.tiles.length ? renderTiles(b, t) : "";
|
||||
case "section":
|
||||
return `<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:10px 0 8px 0;"><tr><td class="tf-text tf-rule" style="padding:0 0 5px 0;border-bottom:1px solid ${t.line};font-family:${t.headingFont};font-size:18px;line-height:23px;font-weight:600;color:${t.text};"><span class="tf-seal" style="color:${t.seal};font-size:12px;">◆</span> ${escHtml(b.title)}</td></tr></table>`;
|
||||
return `<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:10px 0 8px 0;"><tr><td class="tf-text tf-ink-rule" style="padding:0 0 5px 0;border-bottom:2px solid ${t.text};font-family:${t.headingFont};font-size:20px;line-height:25px;font-weight:600;color:${t.text};">${escHtml(b.title)}</td></tr></table>`;
|
||||
case "table":
|
||||
return renderTable(b, t);
|
||||
case "facts":
|
||||
return b.facts.length
|
||||
? `<table role="presentation" width="100%" cellpadding="0" cellspacing="0" class="tf-facts" style="margin:0 0 16px 0;background:${t.factBg};border:1px solid ${t.line};border-radius:${t.radius};border-collapse:separate;">
|
||||
${b.facts.map(([k, v], i) => `<tr><td class="tf-muted" style="padding:8px 12px;font-size:13px;line-height:18px;color:${t.muted};${i ? `border-top:1px solid ${t.line};` : ""}">${escHtml(k)}</td><td class="tf-text" align="right" style="padding:8px 12px;font-size:14px;line-height:19px;font-weight:600;color:${t.text};${i ? `border-top:1px solid ${t.line};` : ""}">${escHtml(v)}</td></tr>`).join("\n")}
|
||||
? `<table role="presentation" width="100%" cellpadding="0" cellspacing="0" class="tf-facts" style="margin:0 0 16px 0;border-collapse:collapse;">
|
||||
${b.facts.map(([k, v]) => `<tr><td class="tf-muted" style="padding:8px 0;font-size:13px;line-height:18px;color:${t.muted};border-top:1px solid ${t.line};">${escHtml(k)}</td><td class="tf-text" align="right" style="padding:8px 0;font-family:${t.mono};font-size:14px;line-height:19px;font-weight:600;color:${t.text};border-top:1px solid ${t.line};">${escHtml(v)}</td></tr>`).join("\n")}
|
||||
</table>`
|
||||
: "";
|
||||
case "list":
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// E-Mail-Vorlagen: tabellenbasiert mit Inline-CSS, hell und dunkel, mit Textversion.
|
||||
// E-Mail-Vorlagen (Stil „Hafenpapier“ wie die App): tabellenbasiert mit Inline-CSS, hell und dunkel, mit Textversion.
|
||||
// Das Erscheinungsbild hängt nur an MAIL_THEME; ein neues Design ändert hier Farben und Schrift.
|
||||
import { blockDarkCss, blockHtml, blockText, type MailBlock } from "./mail-blocks.ts";
|
||||
export type { Cell, MailBlock, Tone } from "./mail-blocks.ts";
|
||||
@@ -6,53 +6,56 @@ export type { Cell, MailBlock, Tone } from "./mail-blocks.ts";
|
||||
export const MAIL_THEME = {
|
||||
brand: "TIDEFRONT",
|
||||
tagline: "Nordatlantik · Mittelmeer",
|
||||
/** Stil „Seekarte“: Papier, marineblaue Tinte, Siegelrot. Schriften nur als Wunsch, Rückfall auf Systemschriften. */
|
||||
font: "'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
||||
headingFont: "Fraunces, Georgia, 'Times New Roman', serif",
|
||||
radius: "4px",
|
||||
/** Hell */
|
||||
page: "#f4eee1",
|
||||
panel: "#fffdf8",
|
||||
text: "#18273a",
|
||||
muted: "#4f5b69",
|
||||
line: "#d5cab2",
|
||||
header: "#18273a",
|
||||
headerText: "#f4eee1",
|
||||
headerMuted: "#c9cfd6",
|
||||
/** Stil „Hafenpapier“ (wie die App): Papier, Tinte, Haarlinien; Akzentblau für Zeichen, Rot nur für Verlust/Alarm.
|
||||
* Schriften der App als Wunsch, dahinter web-sichere Rückfälle (Arial, Georgia, Menlo). */
|
||||
font: "Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
||||
headingFont: "Newsreader, Georgia, 'Times New Roman', serif",
|
||||
mono: "'JetBrains Mono', Menlo, Consolas, 'Courier New', monospace",
|
||||
radius: "2px",
|
||||
/** Hell (Hafenpapier) */
|
||||
page: "#f5f1e8",
|
||||
panel: "#fffdf7",
|
||||
text: "#1a2230",
|
||||
muted: "#545d6b",
|
||||
line: "#ddd5c4",
|
||||
/** Kopf: Papier mit Tintenlinie (wie die Kopfleiste der App). */
|
||||
header: "#f5f1e8",
|
||||
headerText: "#1a2230",
|
||||
headerMuted: "#545d6b",
|
||||
/** Knopf: Tinte mit Papierschrift */
|
||||
accent: "#18273a",
|
||||
accentText: "#f4eee1",
|
||||
/** Siegelrot für Aufzählungszeichen und Kennlinie */
|
||||
seal: "#a8331f",
|
||||
factBg: "#f7f2e7",
|
||||
/** Dunkel (prefers-color-scheme: dark) */
|
||||
darkPage: "#11161d",
|
||||
darkPanel: "#18202a",
|
||||
darkText: "#ede6d6",
|
||||
darkMuted: "#a9b2bd",
|
||||
darkLine: "#2e3946",
|
||||
darkFactBg: "#141b24",
|
||||
darkAccent: "#ede6d6",
|
||||
darkAccentText: "#11161d",
|
||||
darkSeal: "#e58a73",
|
||||
accent: "#1a2230",
|
||||
accentText: "#f5f1e8",
|
||||
/** Akzentblau für Aufzählungszeichen (früher Siegelrot – Rot bleibt dem Alarm vorbehalten). */
|
||||
seal: "#1f4e79",
|
||||
factBg: "#f8f4ec",
|
||||
/** Dunkel (prefers-color-scheme: dark) – „Nachtpapier“ */
|
||||
darkPage: "#121417",
|
||||
darkPanel: "#1a1d21",
|
||||
darkText: "#ece6da",
|
||||
darkMuted: "#a9a397",
|
||||
darkLine: "#30343a",
|
||||
darkFactBg: "#16181b",
|
||||
darkAccent: "#ece6da",
|
||||
darkAccentText: "#121417",
|
||||
darkSeal: "#8db6e0",
|
||||
/** Ergebnisfarben (Banner, Kacheln, Zellen): Schrift kräftig, Grund hell getönt; dunkel umgekehrt. */
|
||||
win: "#2d6a3a",
|
||||
winBg: "#e5efe1",
|
||||
loss: "#a8331f",
|
||||
lossBg: "#f7e3dd",
|
||||
warn: "#8a5800",
|
||||
warnBg: "#f8ecd0",
|
||||
infoBg: "#ebeee9",
|
||||
win: "#2c6a4a",
|
||||
winBg: "#e4eee6",
|
||||
loss: "#b3361f",
|
||||
lossBg: "#f8e6e1",
|
||||
warn: "#93441a",
|
||||
warnBg: "#f6e9de",
|
||||
infoBg: "#ede7da",
|
||||
/** Abgesetzte Tabellenzeilen. */
|
||||
stripe: "#faf6ed",
|
||||
darkWin: "#9fd3a8",
|
||||
darkWinBg: "#142619",
|
||||
darkLoss: "#f0a08c",
|
||||
darkLossBg: "#2d1612",
|
||||
darkWarn: "#e8c27a",
|
||||
darkWarnBg: "#2a2110",
|
||||
darkInfoBg: "#1a2430",
|
||||
darkStripe: "#1d2733",
|
||||
stripe: "#faf7f0",
|
||||
darkWin: "#8fc9a3",
|
||||
darkWinBg: "#15291d",
|
||||
darkLoss: "#ff8f78",
|
||||
darkLossBg: "#3a1a14",
|
||||
darkWarn: "#f0a070",
|
||||
darkWarnBg: "#2e2016",
|
||||
darkInfoBg: "#1f2226",
|
||||
darkStripe: "#1d2024",
|
||||
};
|
||||
|
||||
export type MailTheme = typeof MAIL_THEME;
|
||||
@@ -97,8 +100,8 @@ export function renderMail(c: MailContent, theme: MailTheme = MAIL_THEME): Rende
|
||||
const p = (s: string) =>
|
||||
`<p class="tf-text" style="margin:0 0 14px 0;font-size:16px;line-height:24px;color:${t.text};">${esc(s)}</p>`;
|
||||
const facts = (c.facts ?? []).length
|
||||
? `<table role="presentation" width="100%" cellpadding="0" cellspacing="0" class="tf-facts" style="margin:6px 0 18px 0;background:${t.factBg};border:1px solid ${t.line};border-radius:${t.radius};border-collapse:separate;">
|
||||
${(c.facts ?? []).map(([k, v], i) => `<tr><td class="tf-muted" style="padding:10px 14px;font-size:13px;color:${t.muted};${i ? `border-top:1px solid ${t.line};` : ""}">${esc(k)}</td><td class="tf-text" align="right" style="padding:10px 14px;font-family:'IBM Plex Mono',Menlo,Consolas,monospace;font-size:15px;font-weight:600;color:${t.text};${i ? `border-top:1px solid ${t.line};` : ""}">${esc(v)}</td></tr>`).join("\n")}
|
||||
? `<table role="presentation" width="100%" cellpadding="0" cellspacing="0" class="tf-facts" style="margin:6px 0 18px 0;border-collapse:collapse;">
|
||||
${(c.facts ?? []).map(([k, v]) => `<tr><td class="tf-muted" style="padding:9px 0;font-size:13px;color:${t.muted};border-top:1px solid ${t.line};">${esc(k)}</td><td class="tf-text" align="right" style="padding:9px 0;font-family:${t.mono};font-size:15px;font-weight:600;color:${t.text};border-top:1px solid ${t.line};">${esc(v)}</td></tr>`).join("\n")}
|
||||
</table>`
|
||||
: "";
|
||||
const items = (c.items ?? []).length
|
||||
@@ -109,7 +112,7 @@ ${(c.items ?? []).map((s) => `<tr><td width="18" valign="top" class="tf-seal" st
|
||||
const blocks = (c.blocks ?? []).map((b) => blockHtml(b, t)).filter(Boolean).join("\n");
|
||||
const button = c.button
|
||||
? `<table role="presentation" cellpadding="0" cellspacing="0" style="margin:8px 0 6px 0;"><tr><td class="tf-btn" style="border-radius:${t.radius};background:${t.accent};">
|
||||
<a href="${esc(c.button.url)}" class="tf-btn-a" style="display:inline-block;padding:14px 26px;font-size:14px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;color:${t.accentText};text-decoration:none;border-radius:${t.radius};font-family:${t.font};">${esc(c.button.label)}</a>
|
||||
<a href="${esc(c.button.url)}" class="tf-btn-a" style="display:inline-block;padding:15px 26px;font-size:16px;line-height:20px;font-weight:600;color:${t.accentText};text-decoration:none;border-radius:${t.radius};font-family:${t.font};">${esc(c.button.label)}</a>
|
||||
</td></tr></table>`
|
||||
: "";
|
||||
const link = c.link
|
||||
@@ -129,12 +132,13 @@ ${(c.items ?? []).map((s) => `<tr><td width="18" valign="top" class="tf-seal" st
|
||||
@media (prefers-color-scheme: dark){
|
||||
.tf-page{background:${t.darkPage}!important;} .tf-panel{background:${t.darkPanel}!important;}
|
||||
.tf-text{color:${t.darkText}!important;} .tf-muted{color:${t.darkMuted}!important;}
|
||||
.tf-facts{background:${t.darkFactBg}!important;border-color:${t.darkLine}!important;} .tf-facts td{border-color:${t.darkLine}!important;}
|
||||
.tf-head{background:${t.darkPage}!important;} .tf-head-ink{color:${t.darkText}!important;} .tf-head-muted{color:${t.darkMuted}!important;}
|
||||
.tf-ink-rule{border-color:${t.darkText}!important;} .tf-facts td{border-color:${t.darkLine}!important;}
|
||||
.tf-btn{background:${t.darkAccent}!important;} .tf-btn-a{color:${t.darkAccentText}!important;} .tf-seal{color:${t.darkSeal}!important;}
|
||||
.tf-panel{border-color:${t.darkLine}!important;}
|
||||
.tf-panel{border-color:${t.darkLine}!important;border-top-color:${t.darkText}!important;}
|
||||
${blockDarkCss(t)}
|
||||
}
|
||||
@media only screen and (max-width:620px){ .tf-wrap{width:100%!important;} .tf-pad{padding:20px 16px!important;} .tf-h1{font-size:22px!important;line-height:28px!important;} }
|
||||
@media only screen and (max-width:620px){ .tf-wrap{width:100%!important;} .tf-pad{padding:20px 16px!important;} .tf-h1{font-size:24px!important;line-height:29px!important;} }
|
||||
@media only screen and (max-width:480px){ .tf-tag{display:none!important;} }
|
||||
</style></head>
|
||||
<body class="tf-page" style="margin:0;padding:0;background:${t.page};font-family:${t.font};">
|
||||
@@ -142,13 +146,12 @@ ${(c.items ?? []).map((s) => `<tr><td width="18" valign="top" class="tf-seal" st
|
||||
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" class="tf-page" style="background:${t.page};">
|
||||
<tr><td align="center" style="padding:24px 12px;">
|
||||
<table role="presentation" width="600" cellpadding="0" cellspacing="0" class="tf-wrap" style="width:600px;max-width:600px;">
|
||||
<tr><td style="background:${t.header};border-radius:${t.radius} ${t.radius} 0 0;padding:18px 28px;font-family:${t.font};">
|
||||
<span style="font-family:${t.headingFont};font-size:19px;font-weight:600;letter-spacing:5px;color:${t.headerText};">${esc(t.brand)}</span>
|
||||
<span class="tf-tag" style="font-size:12px;color:${t.headerMuted};padding-left:10px;">${esc(t.tagline)}</span>
|
||||
<tr><td class="tf-head" style="background:${t.header};padding:6px 4px 12px 4px;font-family:${t.font};">
|
||||
<span class="tf-head-ink" style="font-family:${t.headingFont};font-size:22px;font-weight:600;letter-spacing:5px;color:${t.headerText};">${esc(t.brand)}</span>
|
||||
<span class="tf-tag tf-head-muted" style="font-size:12px;color:${t.headerMuted};padding-left:10px;">${esc(t.tagline)}</span>
|
||||
</td></tr>
|
||||
<tr><td style="background:${t.header};padding:0 28px 12px 28px;font-size:0;line-height:0;"><div style="border-top:3px double ${t.headerText};opacity:0.55;"> </div></td></tr>
|
||||
<tr><td class="tf-panel tf-pad" style="background:${t.panel};padding:28px;border:1px solid ${t.line};border-top:0;border-left:4px solid ${t.seal};border-radius:0 0 ${t.radius} ${t.radius};font-family:${t.font};">
|
||||
<h1 class="tf-text tf-h1" style="margin:0 0 14px 0;font-family:${t.headingFont};font-size:25px;line-height:31px;font-weight:600;color:${t.text};">${esc(c.heading)}</h1>
|
||||
<tr><td class="tf-panel tf-pad" style="background:${t.panel};padding:26px 28px 28px 28px;border:1px solid ${t.line};border-top:2px solid ${t.text};border-radius:0;font-family:${t.font};">
|
||||
<h1 class="tf-text tf-h1" style="margin:0 0 14px 0;font-family:${t.headingFont};font-size:28px;line-height:33px;font-weight:600;letter-spacing:-0.2px;color:${t.text};">${esc(c.heading)}</h1>
|
||||
${c.paragraphs.map(p).join("\n")}
|
||||
${blocks}
|
||||
${facts}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Seekarte 2.0: Kontrast der Design-Tokens (apps/web/src/theme.css) in hell und dunkel – Schrift ≥ 4,5:1 auf allen
|
||||
// Hafenpapier (V1): Kontrast der Design-Tokens (apps/web/src/theme.css) in hell und dunkel – Schrift ≥ 4,5:1 auf allen
|
||||
// Flächen, auf denen sie steht (WCAG 2.1 AA). Liest die Datei direkt, damit Werte und Prüfung nicht auseinanderlaufen.
|
||||
import { test } from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
@@ -30,17 +30,18 @@ const dark = { ...light, ...block(':root[data-theme="dark"]') };
|
||||
/** Schrift-Token → Flächen, auf denen es als Text vorkommt. */
|
||||
const TEXT_ON: [string, string[]][] = [
|
||||
["ink", ["paper", "card", "inset", "track", "field", "plate", "nav-sel", "moos-bg", "siegel-bg"]],
|
||||
["ink2", ["paper", "card", "inset", "field", "plate", "moos-bg"]],
|
||||
["accent-ink", ["paper", "card", "inset", "nav-sel"]],
|
||||
["ink2", ["paper", "card", "inset", "track", "field", "plate", "nav-sel", "moos-bg"]],
|
||||
["accent-ink", ["paper", "card", "inset", "track", "nav-sel"]],
|
||||
["see", ["paper", "card", "inset"]],
|
||||
["siegel", ["paper", "card", "inset", "siegel-bg"]],
|
||||
["siegel-ink", ["siegel-bg"]],
|
||||
["moos", ["paper", "card", "inset", "moos-bg"]],
|
||||
["messing", ["paper", "card", "inset"]],
|
||||
["warn-ink", ["paper", "card"]],
|
||||
["warn-ink", ["paper", "card", "inset"]],
|
||||
["on-accent", ["accent"]],
|
||||
["on-strong", ["siegel", "moos"]],
|
||||
["head-ink", ["head", "head-track"]],
|
||||
["head-muted", ["head-track"]],
|
||||
["head-muted", ["head"]],
|
||||
["head-good", ["head"]],
|
||||
["head-alarm", ["head"]],
|
||||
@@ -49,7 +50,7 @@ const TEXT_ON: [string, string[]][] = [
|
||||
];
|
||||
|
||||
for (const [mode, t] of [["hell", light], ["dunkel", dark]] as const) {
|
||||
test(`Seekarte 2.0 ${mode}: Schrift-Tokens ≥ 4,5:1`, () => {
|
||||
test(`Hafenpapier ${mode}: Schrift-Tokens ≥ 4,5:1`, () => {
|
||||
const low: string[] = [];
|
||||
for (const [fg, bgs] of TEXT_ON) for (const bg of bgs) {
|
||||
assert.ok(t[fg] && t[bg], `${fg}/${bg} fehlt`);
|
||||
|
||||
Reference in new issue
Block a user