gwoe-antragspruefer/app/templates/v2/components/score_hero.html
Dotty Dotter eb0669d6ac feat(#147): Hover-Tooltips fuer Abkuerzungen auf Antrag-Detail
User-Feedback: '(A)' hinter Partei, 'WP', 'PP' brauchen Erklaerung
fuer Erstleser:innen. Loesung: ausfuehrliche title-Tooltips plus
visuelle Affordanz (cursor:help).

Geaendert:
- v2-badge-antragsteller / -regierung: cursor:help
- v2-score-chip[title]: cursor:help
- (A) → 'A — Antragstellende Fraktion: hat den Antrag eingereicht.'
- (R) → 'R — Regierungsfraktion: traegt die aktuelle Mehrheit im Landtag.'
- WP-Chip: 'WP — Wahlprogramm-Treue (0–10): wie gut passt der Antrag
  zum aktuellen Wahlprogramm? + Begruendung'
- PP-Chip: analog fuer Parteiprogramm-Treue
- Score-Hero: Tooltip mit GWÖ-Score-Definition + Methodik-Verweis
- 'Enth.:' im Abstimmungs-Block: dotted underline + Tooltip 'Enth. —
  Enthaltung: weder Zustimmung noch Ablehnung'

Closes #147
2026-04-28 08:46:27 +02:00

35 lines
1.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{#
score_hero.html — Großer Score-Block für die Detailseite
Props:
score : float (010) — der GWÖ-Score
verdict_title : str — kurzes Urteil (z.B. "Vorbildlich"), UPPERCASE
verdict_body : str — ein bis zwei Sätze Urteilsbeschreibung
Verhalten:
- score >= 8: var(--ecg-green) als Akzentfarbe
- score < 5: var(--redline-contra) als Akzentfarbe (CSS-Klasse "low")
- 57: Neutral (var(--ecg-dark))
Verwendung:
{% from "v2/components/score_hero.html" import score_hero %}
{{ score_hero(9.1, "Vorbildlich", "Starker Beitrag zur ökologischen Nachhaltigkeit.") }}
#}
{% macro score_hero(score, verdict_title="", verdict_body="") %}
{% set s = score | float %}
{% if s < 5 %}{% set modifier = "low" %}{% else %}{% set modifier = "" %}{% endif %}
<div class="v2-score-hero {{ modifier }}" role="region" aria-label="GWÖ-Score {{ '%.1f'|format(s) }} von 10"
title="GWÖ-Score (010): Gesamt-Bewertung des Antrags nach der Gemeinwohl-Matrix 2.0 für Gemeinden — gewichteter Durchschnitt der 25 Matrix-Felder. Höher = stärkerer Beitrag zum Gemeinwohl. Details unter /methodik."
style="cursor:help;">
<div class="big-num" aria-hidden="true">
{{ "%.1f" | format(s) }}<span class="slash">/10</span>
</div>
<div class="verdict">
{% if verdict_title %}<b>{{ verdict_title }}</b>{% endif %}
{{ verdict_body }}
</div>
</div>
{% endmacro %}