feat: enconf-Layout-Patterns übertragen — responsive Card-Tabellen, PageHeader, StatCards

Über die Architect-RAG-Suche (ac_search_code_global) drei UX-Muster
aus dem enconf-Schwesterprojekt (React/Ant Design) identifiziert und
als reines CSS/HTML nachgebaut, da Deklarix bewusst kein SPA ist:

- .table-responsive: Tabellen werden unter 640px zu einer Card-Liste
  statt horizontal zu scrollen (enconfs ProTable-Verhalten), via
  data-label-Attribut je <td>. Angewendet auf beide
  Werkzeugkatalog-Tabellen.
- .page-header: Titel+Unterzeile links, primäre Aktion rechts, statt
  eines nackten <h1> mit Link irgendwo unten.
- .stat-cards: Kennzahl-Kacheln mit farbigem Akzentrand (nur farbig
  bei Wert > 0) statt einfacher Text-Links, auf der Startseite.
This commit is contained in:
noroot
2026-08-31 15:55:34 +02:00
parent 3aecbb446c
commit bc99858c94
6 changed files with 287 additions and 51 deletions

View File

@@ -792,6 +792,183 @@ tbody tr:hover {
font-size: 0.875rem;
}
/* ── Responsive Tabellen — Card-Ansicht auf dem Handy ────────────────
enconf-Pattern (ProTable.tsx): auf schmalen Screens wird nicht
horizontal gescrollt, sondern jede Zeile zu einer eigenen Karte mit
Label/Wert-Paaren. Braucht data-label="Spaltenname" auf jedem <td>.
Ab 640px bleibt es eine normale Tabelle (mit Scroll-Fade als
Sicherheitsnetz bei vielen Spalten). */
.table-responsive {
overflow-x: auto;
box-shadow: var(--shadow);
border-radius: var(--radius-md);
margin-bottom: 16px;
-webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
}
@media (max-width: 639px) {
.table-responsive {
overflow-x: visible;
box-shadow: none;
border-radius: 0;
-webkit-mask-image: none;
mask-image: none;
}
.table-responsive table,
.table-responsive tbody,
.table-responsive tr,
.table-responsive td {
display: block;
width: 100%;
}
.table-responsive thead {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
}
.table-responsive tbody tr {
margin-bottom: 12px;
border: 1px solid var(--color-border);
border-radius: var(--radius-md);
background: #fff;
box-shadow: var(--shadow-sm);
}
.table-responsive td {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 12px;
text-align: right;
padding: 8px 12px;
border-bottom: 1px solid var(--color-border);
white-space: normal;
}
.table-responsive td:last-child {
border-bottom: none;
}
.table-responsive td::before {
content: attr(data-label);
font-weight: 600;
color: var(--color-heading);
text-align: left;
flex-shrink: 0;
}
}
/* ── Seitenkopf (PageHeader-Pattern, enconf) ─────────────────────────
Titel + Unterzeile links, primäre Aktion rechts — statt eines
nackten <h1> mit einem Link irgendwo unten auf der Seite. */
.page-header {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
margin-bottom: 20px;
}
.page-header h1 {
margin-bottom: 4px;
}
.page-header .hinweis {
margin-top: 0;
}
.page-header .page-header-action {
margin-top: 4px;
white-space: nowrap;
display: inline-block;
padding: 10px 18px;
border-radius: var(--radius);
background: var(--branding-primary);
color: #fff;
font-weight: 500;
font-size: 0.9375rem;
text-decoration: none;
box-shadow: var(--shadow-sm);
}
.page-header .page-header-action:hover {
filter: brightness(0.94);
}
/* ── Kennzahl-Kacheln (StatCard-Pattern, enconf Dashboard) ───────────
Vorher: einfache Text-Links in einer Liste ohne visuelle Priorität.
Jetzt: farbiger oberer Akzentrand + große Zahl + Klick navigiert zur
Liste, wie enconfs StatCard-Komponente — nur ohne Icon-Bibliothek. */
.stat-cards {
list-style: none;
margin: 0 0 24px;
padding: 0;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 12px;
}
.stat-card {
display: block;
background: #fff;
border: 1px solid var(--color-border);
border-top: 3px solid var(--branding-primary);
border-radius: var(--radius-md);
box-shadow: var(--shadow-sm);
padding: 16px 18px;
text-decoration: none;
transition: box-shadow 0.15s ease;
}
.stat-card:hover {
box-shadow: var(--shadow-md);
}
.stat-card-value {
display: block;
font-size: 1.75rem;
font-weight: 700;
color: var(--color-heading);
line-height: 1.2;
}
.stat-card-label {
display: block;
font-size: 0.875rem;
color: var(--color-muted);
margin-top: 4px;
}
.stat-card-mittel {
border-top-color: var(--color-mittel);
}
.stat-card-hoch {
border-top-color: var(--color-hoch);
}
.stat-card-action {
background: var(--branding-primary);
border-color: var(--branding-primary);
display: flex;
align-items: center;
height: 100%;
}
.stat-card-action .stat-card-label {
color: #fff;
font-weight: 600;
font-size: 0.9375rem;
margin-top: 0;
}
/* Ab hier mehr Platz (Tablet) — der Container bekommt spürbaren
Rand statt volle Breite, sonst bleibt alles identisch. */
@media (min-width: 640px) {