diff --git a/foods.db b/foods.db index 3776fcc..218fe6a 100644 Binary files a/foods.db and b/foods.db differ diff --git a/templates/food.html b/templates/food.html new file mode 100644 index 0000000..348ac28 --- /dev/null +++ b/templates/food.html @@ -0,0 +1,23 @@ +
+
+

+ {{ food.name }} +

+ {{ food.portion }} ({{ food.kc_per_serving }} kc.) +
+ + food.target_servings %} + style="accent-color: red;" + {% endif %}> + + {{ food.actual_servings }}/{{ food.target_servings }} +
+
+
+
+ + +
+
+
\ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 5b6b573..435e279 100644 --- a/templates/index.html +++ b/templates/index.html @@ -12,29 +12,7 @@
{% for food in foods %} -
-
-

- {{ food.name }} -

- {{ food.portion }} ({{ food.kc_per_serving }} kc.) -
- - food.target_servings %} - style="accent-color: red;" - {% endif %}> - - {{ food.actual_servings }}/{{ food.target_servings }} -
-
-
-
- - -
-
-
+ {% include "food.html" %} {% endfor %}
Total: {{ sum }} kc.