{% extends "base.html" %} {% import "food/_head.html" as fd with context %} {% block title %}Food{% endblock %} {% block head %}{{ fd.assets() }}{% endblock %} {% block main_attrs %} data-norefresh{% endblock %} {# One day: the week strip (energy per day, click = that day), the meals with their foods (click one = edit, a meal's + = add to it), left: ring + bars + the add / describe box. food.js: the dialogs; after a save it swaps in .fd from a fresh copy of the page. #} {% set n, g = fd.n, fd.g %} {% macro amount(e) %}{% if e.amount is not none %}{{ g(e.amount) }}{% if e.unit %} {{ e.unit }}{% endif %}{% endif %}{% endmacro %} {% block page %} {{ fd.head(fd.day_label(v.day, v.today), v.day.strftime("%A ") ~ v.day.day ~ v.day.strftime(" %B %Y") ~ (" · planned" if v.future else " · food"), v.day == v.today, "/food", "/food?d=" ~ v.prev.isoformat(), ("/food?d=" ~ v.next.isoformat()) if v.next else None, v.next is not none) }}