web: vzhled sjednocený s mobilní aplikací

Barvy a text podle Material 3 tématu mobilu, logo stejné jako ikona
aplikace, zaoblení karet a tlačítek. Štítky stavů závad a návrhů ve stylu
StatusBadge z mobilu a české názvy stavů podle návrhového dokumentu.
This commit is contained in:
PatTheEvil committed 2026-12-02 01:17:54 +01:00
1 parent 08ca55dd6b
commit 6e742b4029
6 files changed
+117 -39

No files matched your search

+60 -37
View File
@@ -1,29 +1,43 @@
/* Vzhled NTBug nad Bootstrapem 5. Barvy stavů závad odpovídají kap. 13.2 návrhu
a jsou stejné jako v mobilní aplikaci. */
/* Vzhled NTBug nad Bootstrapem 5. Barvy, zaoblení a štítky stavů převzaté z tématu
mobilní aplikace (mobile/…/ui/Theme.kt a ui/features/Components.kt), aby web
i mobil vypadaly jako jedna aplikace. Při změně tématu upravte obě místa. */
:root {
--app-accent: #0d6b66;
--app-accent-hover: #0a5551;
--app-accent-soft: #e0f0ee;
--app-surface: #f4f6f8;
--app-line: #d9dfe6;
/* Material 3 schéma z mobilu (světlé) */
--app-accent: #006b5c; /* primary */
--app-accent-hover: #00574b;
--app-accent-rgb: 0, 107, 92;
--app-accent-soft: #d4f5e9; /* primaryContainer */
--app-on-accent-soft: #00382e; /* onPrimaryContainer */
--app-ink: #142e38; /* onBackground, onSurface */
--app-muted: #53666f; /* onSurfaceVariant */
--app-surface: #f5f7f9; /* background */
--app-line: #d9e3e7; /* outlineVariant */
--app-radius-card: 1.25rem; /* karty v mobilu: 20 dp */
--app-radius-badge: .5rem; /* štítky stavů: 8 dp */
--status-received: #6c757d; /* Přijata – šedá */
--status-assigned: #2563eb; /* Přiřazena – modrá */
--status-in-progress: #d97706; /* V řešení – oranžová */
--status-verification: #7c3aed; /* Čeká na ověření – fialová */
--status-resolved: #15803d; /* Vyřešena – zelená */
--status-rejected: #dc2626; /* Zamítnuta – červená */
/* Barvy stavů závad a návrhů (StatusBadge v mobilu) */
--status-neutral: var(--app-muted); /* Přijata, Podán */
--status-assigned: #3267a0; /* Přiřazena */
--status-in-progress: #986015; /* V řešení */
--status-review: #7953a5; /* Čeká na ověření, V posouzení */
--status-done: #25725b; /* Vyřešena, Přijat, Realizován */
--status-rejected: #ac3e42; /* Zamítnuta / Zamítnut */
--bs-primary: var(--app-accent);
--bs-primary-rgb: 13, 107, 102;
--bs-primary-rgb: var(--app-accent-rgb);
--bs-link-color: var(--app-accent);
--bs-link-color-rgb: 13, 107, 102;
--bs-link-color-rgb: var(--app-accent-rgb);
--bs-link-hover-color: var(--app-accent-hover);
--bs-link-hover-color-rgb: 10, 85, 81;
--bs-link-hover-color-rgb: 0, 87, 75;
--bs-body-bg: var(--app-surface);
--bs-body-color: var(--app-ink);
--bs-emphasis-color: var(--app-ink);
--bs-secondary-color: var(--app-muted);
--bs-border-color: var(--app-line);
}
/* Tlačítka jsou jako v Material 3 plně zaoblená. */
.btn { --bs-btn-border-radius: 999px; --bs-btn-padding-x: 1.1rem; --bs-btn-font-weight: 600; }
.btn-primary {
--bs-btn-bg: var(--app-accent);
--bs-btn-border-color: var(--app-accent);
@@ -46,25 +60,24 @@
.form-control, .form-select { background-color: #fff; }
.form-control:focus, .form-select:focus, .form-check-input:focus {
border-color: var(--app-accent);
box-shadow: 0 0 0 .2rem rgba(13, 107, 102, .2);
box-shadow: 0 0 0 .2rem rgba(var(--app-accent-rgb), .2);
}
.form-check-input:checked { background-color: var(--app-accent); border-color: var(--app-accent); }
.form-label { font-weight: 600; }
body { min-height: 100vh; display: flex; flex-direction: column; }
.skip-link { position: absolute; left: 1rem; top: .5rem; z-index: 1100; background: #fff; padding: .5rem .75rem; border-radius: .375rem; }
/* hlavička */
.app-header { background: #fff; }
/* hlavička – jako horní lišta v mobilu má barvu pozadí stránky */
.app-header { background: var(--app-surface); }
.app-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: inherit; }
.app-brand-mark {
display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: .45rem;
background: var(--app-accent); color: #fff; font-size: .8rem; letter-spacing: .02em;
}
.app-brand-sub { font-weight: 400; color: var(--bs-secondary-color); }
.navbar .nav-link.active { color: var(--app-accent); font-weight: 600; }
.app-brand-mark { width: 2rem; height: 2rem; border-radius: .5rem; }
.app-brand-sub { font-weight: 400; color: var(--app-muted); }
.navbar .nav-link { font-weight: 500; }
.navbar .nav-link.active { color: var(--app-accent); font-weight: 700; }
.app-user-toggle { color: inherit; text-decoration: none; }
.app-role-badge { background: var(--app-accent-soft); color: var(--app-accent); font-weight: 600; }
.app-role-badge { background: var(--app-accent-soft); color: var(--app-on-accent-soft); font-weight: 600; }
/* obsah */
.app-main { flex: 1; padding-block: 2rem 3rem; }
@@ -72,12 +85,15 @@ body { min-height: 100vh; display: flex; flex-direction: column; }
.app-page-head h1 { font-size: 1.75rem; font-weight: 700; text-wrap: balance; }
.app-page-head .lead { max-width: 65ch; }
.app-card { background: #fff; border: 1px solid var(--app-line); border-radius: .6rem; padding: 1.5rem; }
/* karta = OutlinedCard z mobilu */
.app-card { background: #fff; border: 1px solid var(--app-line); border-radius: var(--app-radius-card); padding: 1.5rem; }
.app-facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin-bottom: 1.5rem; }
.app-facts dt { font-weight: 600; color: var(--bs-secondary-color); }
.app-facts dt { font-weight: 600; color: var(--app-muted); }
.app-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.alert { border-radius: 1rem; }
/* přihlášení, registrace a další jednoduché formuláře */
.app-auth { max-width: 26rem; margin: 1rem auto 0; }
.app-auth h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: .25rem; }
@@ -89,16 +105,23 @@ body { min-height: 100vh; display: flex; flex-direction: column; }
.app-empty { max-width: 32rem; margin: 3rem auto; text-align: center; }
.app-empty-code { font-size: 3rem; font-weight: 700; color: var(--app-accent); margin-bottom: 0; font-variant-numeric: tabular-nums; }
.app-footer { padding-block: 1.25rem; color: var(--bs-secondary-color); font-size: .875rem; border-top: 1px solid var(--app-line); }
.app-footer { padding-block: 1.25rem; color: var(--app-muted); font-size: .875rem; border-top: 1px solid var(--app-line); }
/* štítky stavů závad */
.status-badge { display: inline-block; padding: .2em .6em; border-radius: 999px; font-size: .8rem; font-weight: 600; color: #fff; white-space: nowrap; }
.status-RECEIVED { background: var(--status-received); }
.status-ASSIGNED { background: var(--status-assigned); }
.status-IN_PROGRESS { background: var(--status-in-progress); }
.status-PENDING_VERIFICATION { background: var(--status-verification); }
.status-RESOLVED { background: var(--status-resolved); }
.status-REJECTED { background: var(--status-rejected); }
/* Štítek stavu jako StatusBadge v mobilu: tečka a text v barvě stavu na pozadí s 11 % té barvy. */
.status-badge {
--status-color: var(--status-neutral);
display: inline-flex; align-items: center; gap: .4rem;
padding: .3rem .6rem; border-radius: var(--app-radius-badge);
font-size: .8rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
color: var(--status-color);
background: color-mix(in srgb, var(--status-color) 11%, transparent);
}
.status-badge::before { content: ""; width: .35rem; height: .35rem; border-radius: 50%; background: currentColor; flex: none; }
.status-ASSIGNED { --status-color: var(--status-assigned); }
.status-IN_PROGRESS { --status-color: var(--status-in-progress); }
.status-PENDING_VERIFICATION, .status-UNDER_REVIEW { --status-color: var(--status-review); }
.status-RESOLVED, .status-ACCEPTED, .status-IMPLEMENTED { --status-color: var(--status-done); }
.status-REJECTED { --status-color: var(--status-rejected); }
@media (prefers-reduced-motion: reduce) {
.fade, .collapsing { transition: none !important; }