{% extends "base.html" %} {% import "food/_head.html" as fd with context %} {% block title %}My foods{% endblock %} {% block head %}{{ fd.assets() }}{% endblock %} {% block main_attrs %} data-norefresh{% endblock %} {# My foods — your own food database: values per 100 g + portions (db.my_foods), meals among them (made of other foods). Click a row = the food dialog (food.js, mode foodonly) or, for a meal, the meal builder: change it, delete it (hidden — entries made from it keep their numbers). New ones also come from the add dialog (a typed-in food, or a database food after "Edit item"). Left column: today. #} {% set n, g = fd.n, fd.g %} {% block page %} {{ fd.head("My foods", "your own food database · food", True, "/food/foods") }}
Nothing yet. Foods land here when you add one that isn't in the list (its values per 100 g, from the label), change a food from the database with Edit item, or make a meal.
{% else %}| Food | kcal | Protein | Carbs | Fat | Portions | Used |
|---|---|---|---|---|---|---|
| {{ f.name }}{% if f.recipe %}meal · {{ f.recipe.ingredients | length }} ingredient{{ "s" if f.recipe.ingredients | length != 1 }}: {{ f.recipe.ingredients | map(attribute="name") | join(", ") | truncate(70) }}{% elif f.based_on_name %}from {{ f.based_on_name }}{% endif %} | {{ n(f.per100.kcal) }} | {{ g(f.per100.protein) }} | {{ g(f.per100.carbs) }} | {{ g(f.per100.fat) }} | {% for p in f.portions %}{{ p.label }} {{ g(p.grams) }} g{{ ", " if not loop.last }}{% else %}—{% endfor %} | {{ f.uses or "" }} |
Values per 100 g. Changing a food doesn't change entries already logged.
{% endif %}