From bf577733ce9c5cbc17fd943b0a6e9d48d8a49e41 Mon Sep 17 00:00:00 2001 From: Flo Ha Date: Sun, 17 Jul 2022 16:52:43 +0200 Subject: [PATCH] use dynamic drinks table in finance template and rework table styling --- gaehsnitz/static/gaehsnitz/style.css | 39 ++++++-- gaehsnitz/templates/gaehsnitz/finance.html | 100 +++------------------ 2 files changed, 43 insertions(+), 96 deletions(-) diff --git a/gaehsnitz/static/gaehsnitz/style.css b/gaehsnitz/static/gaehsnitz/style.css index af93573..6659b3c 100644 --- a/gaehsnitz/static/gaehsnitz/style.css +++ b/gaehsnitz/static/gaehsnitz/style.css @@ -2,7 +2,7 @@ html, body, div, h1, h2, h3, h4, h5, h6, a, p, b, i, form, label, input, -table, thead, tbody, tr, td { +table, thead, tfoot, tr, td { margin: 0; border: none; padding: 0; @@ -104,18 +104,41 @@ p, ul { table { margin-top: 12px; margin-bottom: 12px; - border-spacing: 0; - border-right: 1px solid #664422; - border-bottom: 1px solid #664422; + border-spacing: 1px; +} + +thead { + color: #EECC66; +} + +.odd-row { + background-color: rgba(102, 68, 24, 0.3); +} + +.even-row { + background-color: rgba(102, 68, 24, 0.1); } td { - white-space: nowrap; + padding: 3px 8px; +} + +.align-right { text-align: right; +} + +#drinks-table { font-size: 0.9rem; - border-top: 1px solid #664422; - border-left: 1px solid #664422; - padding: 3px 6px; +} + +#drinks-table td { + padding: 2px 5px; + text-align: right; + white-space: nowrap; +} + +#drinks-table tfoot { + color: #EE9933; } .bandbox { diff --git a/gaehsnitz/templates/gaehsnitz/finance.html b/gaehsnitz/templates/gaehsnitz/finance.html index 7a46115..2fba20b 100644 --- a/gaehsnitz/templates/gaehsnitz/finance.html +++ b/gaehsnitz/templates/gaehsnitz/finance.html @@ -32,9 +32,9 @@

{{ topic }}:

{% for payment in payments %} - + - +
{{ payment.date|date:"d.m." }}{{ payment.amount }}€{{ payment.amount }}€ {{ payment.other_party }} {% if payment.is_estimated %}(geschätzt){% endif %} @@ -46,92 +46,16 @@ {% endfor %}

geplante Getränke

-

Wir haben hier mal mit der Erfahrung des letzten Jahres grob überschlagen:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
KästenFl./K.Fl. ges.Preis/K.Preis ges.Pfand/K.Pfand ges.
Sterni25205008,- €200,- €3,10 €77,50 €
Uri152030011,- €165,- €3,10 €46,50 €
Radler102020011,- €110,- €3,10 €31,- €
Wasser10121206,- €60,- €3,10 €31,- €
Limo512608,- €40,- €3,10 €15,50 €
Mate4208014,- €56,- €4,50 €18,- €
Summe69-1260-631,- €-219,50 €
+ {% for line in drinks_table %} + {% if forloop.first %} {% elif forloop.last %} {% endif %} + + {% for cell in line %} + + {% endfor %} + + {% if forloop.first %} {% elif forloop.last %} {% endif %} + {% endfor %}
{{ cell }}
- - {% endblock %}