full functionality

This commit is contained in:
Khaïs COLIN 2025-10-18 22:12:51 +02:00
parent bc4203aee0
commit fc64df2b2a
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
3 changed files with 41 additions and 7 deletions

View file

@ -10,7 +10,7 @@
<body>
<main>
<table style="display: flex">
<table>
<tr>
<th>Portion</th>
<th>Lebensmittel</th>
@ -24,13 +24,22 @@
<td style="text-align: right;">{{ food.kc_per_serving }}</td>
<td>
<progress max="{{food.target_servings}}" value="{{food.actual_servings}}" {% if food.actual_servings>
food.target_servings %}style="accent-color: red;"{% endif %}></progress>
food.target_servings %}
style="accent-color: red;"
{% endif %}>
</progress>
{{ food.actual_servings }}/{{ food.target_servings }}
<button>+</button>
<button>-</button>
<form method="post" style="display: inline;">
<button formaction="/increase/{{ food.id }}">+</button>
<button formaction="/decrease/{{ food.id }}">-</button>
</form>
</td>
</tr>
{% endfor %}
<tr>
<th colspan=3 style="text-align: right;">kc.:</th>
<th style="text-align: left;">{{ sum }}</th>
</tr>
</table>
</main>
</body>