{# The parts every page is built from. A page has no markup of its own for
a card, a field, a source badge, a tag, a notice, the CSRF field or an
action with a question before it. Imported "with context", so the CSRF
field finds the session's token. #}
{# A card with a heading. ``meta``: the small line beside it, ``group``:
the group the script ticks within, ``actions``: the caller is asked
twice, for "actions" beside the heading and for "body". #}
{% macro card(title=None, meta=None, id=None, group=None, actions=False) %}
{{ title }}
{% if meta %}{% endif %}{% if actions %}{{ caller("actions") }}{% endif %}{{ title }}
{% if meta %} {% endif %}
{{ code }}{% endif %}{% if source %} {{ badge(source) }}{% endif %}{% endmacro %}
{# The hidden field every form that changes something carries. #}
{% macro csrf_field() %}{% endmacro %}
{# A labelled input. ``code``: the variable's name beside the label,
``source``: where its value came from, ``enter``: the value of the
action button Enter in this field presses, where it is not the form's
first. #}
{% macro field(name, label, value="", type="text", placeholder="", hint=None, code=None, source=None, autocomplete=None, maxlength=None, enter=None) %}