diff --git a/app/main.py b/app/main.py index 86a8f0c..201d4c8 100644 --- a/app/main.py +++ b/app/main.py @@ -434,7 +434,15 @@ def _row_to_detail(row): if rating_normalized < -5: rating_normalized = -5 if rating_normalized > 5: rating_normalized = 5 symbol = cell.get("symbol", "○") - matrix_dict[field] = {"rating": rating_normalized, "symbol": symbol} + matrix_dict[field] = { + "rating": rating_normalized, + "symbol": symbol, + # Antrags-spezifische Beschriftung + Begruendung fuer Click-Info. + # (LLM liefert pro Feld einen prägnanten Titel und einen Satz + # zur Begründung; in v1 wurde das ausgeschrieben angezeigt.) + "label": cell.get("label", "") or "", + "aspect": cell.get("aspect", "") or "", + } # Fallback fuer ist_antragsteller / ist_regierung wenn LLM-Output sie # nicht gesetzt hat: aus den Drucksachen-Metadaten ableiten. diff --git a/app/static/v2/v2.css b/app/static/v2/v2.css index e55f199..3630024 100644 --- a/app/static/v2/v2.css +++ b/app/static/v2/v2.css @@ -1174,3 +1174,89 @@ body.v2 .v2-admin-badge.running { background: rgba(0,120,100,.18); color: var(--ecg-teal); } + +/* ── Abstimmungsergebnis: Pills, Marker, Legende ───────────────────── */ +.v2-vote-pill { + display: inline-block; + padding: 1px 6px; + border-radius: 3px; + margin-right: 3px; +} +.v2-vote-ja { background: color-mix(in srgb, #2da44e 15%, transparent); color: #1a7f37; } +.v2-vote-nein { background: color-mix(in srgb, #cf222e 15%, transparent); color: #a40e26; } +.v2-vote-enth { background: color-mix(in srgb, #6e7781 15%, transparent); color: #57606a; } + +/* Marker (⚠ Heuchelei / ! Opportunismus): kompakt, mit klarer + Hover-/Focus-Affordanz fuer Bürger:innen, die Tooltip-Konventionen + nicht kennen. Native title= bleibt fuer Screenreader/Tooltip aktiv. */ +.v2-vote-marker { + display: inline-block; + margin-left: 4px; + padding: 0 4px; + border-radius: 8px; + cursor: help; + font-weight: 700; + line-height: 1.4; + border-bottom: 1px dotted transparent; + transition: background 0.12s ease, border-color 0.12s ease; +} +.v2-vote-marker:hover, +.v2-vote-marker:focus-visible { + outline: none; + border-bottom-color: currentColor; +} +.v2-marker-heuchelei { + color: #a40e26; + background: rgba(207, 34, 46, 0.08); +} +.v2-marker-heuchelei:hover, +.v2-marker-heuchelei:focus-visible { + background: rgba(207, 34, 46, 0.18); +} +.v2-marker-opp { + color: #bf8700; + background: rgba(191, 135, 0, 0.10); + font-style: italic; +} +.v2-marker-opp:hover, +.v2-marker-opp:focus-visible { + background: rgba(191, 135, 0, 0.20); +} + +/* Legende unter den Vote-Pills: erklärt sichtbar, was die Marker + bedeuten. Wird nur eingeblendet, wenn auf dem Block tatsaechlich + ein Marker vorkommt (Template-Logik). */ +.v2-marker-legend { + margin-top: 8px; + padding-top: 8px; + border-top: 1px dashed var(--hairline); + display: flex; + flex-wrap: wrap; + gap: 16px 24px; + font-family: var(--font-mono); + font-size: 10.5px; + color: var(--ecg-dark); + opacity: 0.78; + line-height: 1.5; +} +.v2-marker-legend .v2-marker-icon { + display: inline-block; + padding: 0 4px; + border-radius: 8px; + font-weight: 700; + margin-right: 2px; +} +.v2-marker-legend .v2-marker-heuchelei { + background: rgba(207, 34, 46, 0.12); + color: #a40e26; +} +.v2-marker-legend .v2-marker-opp { + background: rgba(191, 135, 0, 0.12); + color: #bf8700; + font-style: italic; +} + +/* Plenarprotokoll-Outlink in der Header-Zeile */ +.v2-quelle-link:hover { + background: rgba(0, 157, 165, 0.08); +} diff --git a/app/templates/v2/screens/antrag_detail.html b/app/templates/v2/screens/antrag_detail.html index f09f96e..3a49f47 100644 --- a/app/templates/v2/screens/antrag_detail.html +++ b/app/templates/v2/screens/antrag_detail.html @@ -293,9 +293,16 @@ {{ v.ergebnis | capitalize }}{% if v.einstimmig %} · einstimmig{% endif %} - - {{ v.quelle_protokoll }}{% if v.quelle_url %} ↗{% endif %} - + {% if v.quelle_url %} + + {{ v.quelle_protokoll }} + + {% else %} + {{ v.quelle_protokoll }} + {% endif %} {% if v.fraktionen_ja or v.fraktionen_nein or v.fraktionen_enthaltung %} {# Mehrheits-Bar: Fraktions-Anzahlen pro Lager als Stacked Bar #} @@ -322,7 +329,7 @@