table rendering
This commit is contained in:
parent
d4db9155a6
commit
bc4203aee0
5 changed files with 59 additions and 34 deletions
|
|
@ -1,21 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Task Counter</title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>Task Counter!</h1>
|
||||
</header>
|
||||
<main>
|
||||
<ul>
|
||||
{% for task in tasks %}
|
||||
<li>{{ task.name }}</li>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Food Tracker</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main>
|
||||
<table style="display: flex">
|
||||
<tr>
|
||||
<th>Portion</th>
|
||||
<th>Lebensmittel</th>
|
||||
<th>kc.</th>
|
||||
<th>Servings (target)</th>
|
||||
</tr>
|
||||
{% for food in foods %}
|
||||
<tr>
|
||||
<td>{{ food.portion }}</td>
|
||||
<td>{{ food.name }}</td>
|
||||
<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.actual_servings }}/{{ food.target_servings }}
|
||||
<button>+</button>
|
||||
<button>-</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
</table>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue