{% extends "base.html" %} {% import "health/_parts.html" as hp with context %} {% import "health/_blk.html" as blk with context %} {% block title %}{{ {"overview": "Health", "body": "Body", "sleep": "Sleep", "heart": "Heart", "activity": "Activity"}[tab] }}{% endblock %} {% block head %}{{ hp.assets() }}{% endblock %} {% block main_attrs %} data-norefresh{% endblock %} {# Any health tab, drawn from its layout (blocks.py: an ordered list of {id, w}; the blocks are macros in _blocks.html): a few fixed parts, the shared range bar, the tiles row, the cards. Widths: --f = the share of the row (health.css: flex rows, exact with the gaps). Edit mode (⋮ ▸ Edit layout, layout.js): drag, resize, add (Overview), remove (Overview), save to /health/api/layout. #} {% macro dq(d) %}?d={{ d.isoformat() }}&r={{ V.sleep.range }}&g={{ V.sleep.grain }}{% endmacro %} {% block page %} {{ hp.head(tab, "bp" if tab == "heart" else "measure") }}