{% macro title_text(title, text) -%}

{{ title }}

{{ text }}

{%- endmacro %} {% macro header_card(title, date, pages, break=True) -%} {% if break %}

{% endif %}

Experimental Protocol: {{ title }}

{{ title_text('Issuer', 'Cryo-EM Facility') }}
{{ title_text('Date', date|pretty_date) }}
{{ title_text('Page', '%s of %s'|format(pages[0], pages[1])) }}
{%- endmacro %} {% macro table_card(title, rows) -%}

{{ title }}

{% for row in rows %} {% set n = row|length %} {% set w = 12 // n %} {% set r = w + 12 % n %} {% for value in row[1:] %} {% endfor %} {% endfor %}
{{ row[0] }}{{ value }}
{%- endmacro %} {% macro image_card(title, imgSource) -%}

{{ title }}

{%- endmacro %}