Files
PythonFlaskAusgaben/files/templates/index.html
jonnybravo 5e6d25703c
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 39s
test
2026-07-08 12:19:52 +02:00

53 lines
2.5 KiB
HTML

{% extends "base.html" %}
{% block body %}
{% if csv_value_text %}
<div class="mb-6 p-4 bg-emerald-50 border-l-4 border-emerald-500 text-emerald-800 rounded-r-lg shadow-sm animate-fade-in" role="alert">
<p class="font-semibold">Erfolgreich hinzugefügt!</p>
<p class="text-sm">Ausgabe von {{ csv_value_text }} € für "{{ csv_value_disc }}" wurde gespeichert.</p>
</div>
{% endif %}
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<div class="bg-white p-6 rounded-2xl shadow-sm border border-slate-100 flex flex-col justify-between md:col-span-1">
<span class="text-sm font-medium text-slate-500 uppercase tracking-wider">Gesamtausgaben</span>
<span class="text-3xl font-extrabold text-indigo-600 mt-2">{{ sum_all }} €</span>
</div>
<div class="bg-white p-6 rounded-2xl shadow-sm border border-slate-100 flex flex-col justify-between md:col-span-2">
<h4 class="text-lg font-semibold text-slate-800">Übersicht unserer Finanzen</h4>
<p class="text-sm text-slate-500 mt-1">Hier behalten wir unsere monatlichen Haushaltsausgaben im Blick.</p>
</div>
</div>
<div class="bg-white rounded-2xl shadow-sm border border-slate-100 overflow-hidden">
<div class="px-6 py-4 border-b border-slate-100 flex justify-between items-center">
<h3 class="font-bold text-slate-800 text-lg">Letzte Ausgaben</h3>
</div>
<div class="overflow-x-auto">
<table class="w-full text-left border-collapse">
<thead>
<tr class="bg-slate-50 text-slate-500 text-xs font-semibold uppercase tracking-wider border-b border-slate-100">
<th class="px-6 py-4">Datum</th>
<th class="px-6 py-4">Beschreibung</th>
<th class="px-6 py-4 text-right">Betrag</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-100 text-slate-700">
{% for name in data %}
<tr class="hover:bg-slate-50/50 transition-colors">
<td class="px-6 py-4 text-sm text-slate-500">{{ name.get("datum") }}</td>
<td class="px-6 py-4 text-sm font-medium text-slate-800">{{ name.get("beschreibung") }}</td>
<td class="px-6 py-4 text-sm font-semibold text-slate-900 text-right">{{ name.get("ausgabe") }} €</td>
</tr>
{% endfor %}
{% if not data %}
<tr>
<td colspan="3" class="px-6 py-8 text-center text-slate-400 text-sm">Keine Ausgaben vorhanden.</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</div>
{% endblock %}