Redesign the web app from a written design concept
Design concept and design system in docs/design/: principles (evidence
first, neutral, fair to the people shown, plain language, time as a
dimension, accessible and private), information architecture, core
patterns and a concept for every page; tokens with checked contrast,
component catalogue, content and accessibility rules.
web:
- neutral ink-indigo accent instead of flag red; party colours only as
small markers next to the name; light/dark theme with a switcher
- stylesheets split into tokens, base, layout, components, print
- new header (search, filter count, language, theme, mobile menu) and
footer; breadcrumbs, page headers, tabs with counts, filter bars that
collapse on phones, pagination, notices and empty states
- claim cards with source meter, legal stage, innocence notice inside
the card and a permalink; claim pages with citation (/angaben/{id})
- profiles with role timeline and key figures; party and organisation
dashboards; vote list with position chips; calendar agenda on phones;
tables that stack into cards; loading and error pages; favicon
backend:
- GET /api/v1/claims/{id} and MCP tool get_claim for permalinks
- parties list: evaluate person_status once instead of per party
(30 s -> 1 s on the sample database, identical result)
- parliament calendar: HTML-decode titles ("84. Sitzung")
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
45514624f4
commit
456f9816f4
76 files changed
+7127
-1280
No files matched your search
@@ -8,13 +8,21 @@ from psycopg import Connection
|
||||
def list_parties(conn: Connection) -> list[dict]:
|
||||
return conn.execute(
|
||||
"""
|
||||
-- person_status is an expensive view: evaluate it once, not once per party
|
||||
WITH active AS (
|
||||
SELECT party_id, count(DISTINCT ps.person_id) AS n
|
||||
FROM person_status ps, unnest(ps.current_party_ids) AS party_id
|
||||
WHERE ps.status = 'active'
|
||||
GROUP BY party_id
|
||||
)
|
||||
SELECT o.slug, o.name, o.short_name, o.color, o.logo_url,
|
||||
(SELECT count(*) FROM person_status ps WHERE ps.status = 'active' AND o.id = ANY(ps.current_party_ids))
|
||||
AS active_officials,
|
||||
COALESCE(a.n, 0) AS active_officials,
|
||||
count(DISTINCT r.person_id) AS total_people
|
||||
FROM organization o LEFT JOIN role r ON r.party_id = o.id
|
||||
FROM organization o
|
||||
LEFT JOIN role r ON r.party_id = o.id
|
||||
LEFT JOIN active a ON a.party_id = o.id
|
||||
WHERE o.kind = 'party'
|
||||
GROUP BY o.id
|
||||
GROUP BY o.id, a.n
|
||||
ORDER BY active_officials DESC, total_people DESC, o.name
|
||||
"""
|
||||
).fetchall()
|
||||
|
||||
Reference in new issue
Block a user