Switch from bottle to flask

This commit is contained in:
Felix Breidenstein 2020-10-16 01:07:14 +02:00
parent dc3c2b309c
commit eeea40b125
10 changed files with 250 additions and 141 deletions

28
templates/index.html Normal file
View file

@ -0,0 +1,28 @@
{% extends "base.html" %}
{% block main %}
<h1 class="text-2xl font-bold text-indigo-500">Monatsübersicht</h1>
{% if categories|length > 0 %}
<table class="table-auto border-none">
<thead>
<tr>
<th class="px-4 py-2">Categorie</th>
<th class="px-4 py-2 text-right">Summe</th>
</tr>kk
</thead>
<tbody>
{% for c in categories %}
<tr>
<td class="border px-4 py-2">{{ c["name"] }}</td>
<td class="border px-4 py-2 text-right {{ 'text-red-500' if c['amount'][0] == "-" else 'text-green-500' }}">{{ c["amount"] }} €</td>
</tr>
{% endfor %}
</tbody>
{% else %}
No transactions this month
{% endif %}
{% endblock %}