full functionality
This commit is contained in:
parent
bc4203aee0
commit
fc64df2b2a
3 changed files with 41 additions and 7 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue