From 01a145946cab4fe4fafe4280b447490c43558525 Mon Sep 17 00:00:00 2001 From: hubobel Date: Sat, 20 Jun 2026 17:45:28 +0200 Subject: [PATCH] =?UTF-8?q?WebApp=20Kacheln=20erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 2 +- static/style.css | 54 ++++++++++++++++++++++++++++++++++++++++++++ templates/index.html | 47 ++++++++++++++++++++++++++------------ 3 files changed, 87 insertions(+), 16 deletions(-) diff --git a/app.py b/app.py index 4dee0cd..bdf7223 100644 --- a/app.py +++ b/app.py @@ -92,7 +92,7 @@ def index(): year=year, week=week, summary=summary, - transactions=transactions[:10], + transactions=transactions, total_income=total_income, total_expenses=total_expenses, total_saldo=total_saldo diff --git a/static/style.css b/static/style.css index 127a664..80962b6 100644 --- a/static/style.css +++ b/static/style.css @@ -193,4 +193,58 @@ text-decoration: underline; .transaction-table td { padding: 6px; border-bottom: 1px solid #eee; +} +.transaction-table { + width: 100%; + border-collapse: collapse; +} + +.transaction-table th { + background: #ff6200; + color: white; + padding: 10px; + text-align: left; + position: sticky; + top: 0; +} + +.transaction-table td { + padding: 8px; + border-bottom: 1px solid #eee; +} + +.transaction-table tr:hover { + background: #f8f8f8; +} + +.transaction-container { + max-height: 500px; + overflow-y: auto; +} +.transaction-container { + max-height: 500px; + overflow-y: auto; +} + +.transaction-table { + width: 100%; + border-collapse: collapse; +} + +.transaction-table th { + background: #ff6200; + color: white; + padding: 10px; + text-align: left; + position: sticky; + top: 0; +} + +.transaction-table td { + padding: 8px; + border-bottom: 1px solid #eee; +} + +.transaction-table tr:hover { + background: #f8f8f8; } \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 11f6be8..a74b25e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -188,35 +188,52 @@

- Letzte Transaktionen + Transaktionen in dieser Woche

{% if transactions %} - +
+ - {% for t in transactions[-10:]|reverse %} + + + + + + + + + + + + + {% for t in transactions|reverse %} - + - + - + - + + + {% endfor %} - +
DatumNameKategorieBetrag
- {{ t.date }} - + {{ t.date }} + - {{ t.applicant_name }} - + {{ t.applicant_name }} + - {{ "%.2f"|format(t.amount) }} € - + {{ t.category }} +
+ {{ "%.2f"|format(t.amount) }} € +
- +
{% else %}