{#- Shared macros for the HTML displays of EyeData and SegmentedEyeData. -#} {% set card = "background:#f6f6f6; border-radius:4px; padding:6px 8px; border:1px solid #e0e0e0;" %} {#- Grid of (label, value) pairs. -#} {% macro overview_grid(items, min_width=220) %}
{% for label, value in items %}
{{ label }}
{{ value }}
{% endfor %}
{% endmacro %} {#- Collapsible grid of sparklines (dicts with "label" and "image", a data URI or None). -#} {% macro sparkline_grid(title, items, min_width=220, open=True) %} {% if items %}
{{ title }}
{% for item in items %}
{{ item.label }}
{% if item.image %} {{ item.label }} sparkline {% endif %}
{% endfor %}
{% endif %} {% endmacro %}