{# Activity pages: the core header (⌂ 📅 … ··· ‹ title › ··· ⚙ → Settings ▸ Activity), the sub-heading, the Day | Categories & rules switch with Work's Week / Report buttons at its right end (Activity lives inside Work: Work has an Activity button in the same spot), the stylesheet + script. #} {% from "_header.html" import nav_btns, settings_btn, title_block, subline %} {% macro assets() %}{% endmacro %} {% macro script() %}{% endmacro %} {% macro head(title, sub, current=True, center="/activity", prev=None, next=None, can_next=True) %}
{{ nav_btns() }} {{ title_block(title, center, current, prev, next, can_next=can_next, prev_title="Day before", next_title="Day after", link_title="Today") }} {{ settings_btn("activity") }}
{{ subline(sub) }}
{# Day | Categories & rules — and back to Work's pages, where Work has its Activity button #} {% for href, label in [("/activity", "Day"), ("/activity/rules", "Categories & rules")] %}{{ label }}{% endfor %} WeekReport
{% endmacro %} {% macro day_label(d, today) %}{% if d == today %}Today{% elif (today - d).days == 1 %}Yesterday{% else %}{{ d.strftime("%a") }} {{ d.day }} {{ d.strftime("%b") }}{% endif %}{% endmacro %}