{# Page header (top bar): ⌂ plugins (📅 calendar, ☀ weather, stations, …) ··· ‹ title › ··· ⚙ (a flex row, see .head) Every page but Home has it, and only these: the nav buttons (nav_btns, the page you're on marked .on), the yellow title in a fixed-width slot with round ‹ › either side (title_block — nothing in the bar moves from page to page), the cog last (settings_btn: opens that page's Settings tab). Under the bar: the grey sub-heading (subline), then a page's sections as a tab row (tabs: Week | Month, Overview | Body | …). #} {% macro home_btn() %} {% endmacro %} {# tab = the Settings tab to open (#calendar, #work, …) #} {% macro settings_btn(tab="") %} {% set me = viewer() %} {% if me.kind != "admin" %}{# not an admin: the person button — log in, or who you are + log out #} {% else %} {% endif %} {% endmacro %} {# a plugin's icon: its SVG (glyph_svg) or its glyph, in its colour #} {% macro plugin_icon(glyph, color=None, svg=None, label="") %}{% if svg %}{% else %}{{ glyph or label[:1] }}{% endif %}{% endmacro %} {# one button per enabled plugin (pluginhost.nav): its glyph, the label as tooltip #} {% macro plugin_btns() %} {% for p in plugin_nav() %}{% set here = [p.href] + p.also %}{{ plugin_icon(p.glyph, p.color, p.svg, p.label) }}{% endfor %} {% endmacro %} {# the page buttons, the same row on every page #} {% macro nav_btns() %} {% endmacro %} {% macro prev_btn(href, title="Previous", can=True) %} {% endmacro %} {% macro next_btn(href, title="Next", can=True) %} {% endmacro %} {# the yellow title in a fixed-width slot, the round ‹ › either side of it (omit an href = no arrow; its place stays empty, so the title never shifts) #} {% macro title_block(title, href=None, current=True, prev_href=None, next_href=None, can_prev=True, can_next=True, prev_title="Previous", next_title="Next", link_title=None) %}