{%- macro summarize(unit) -%} {# The label class is added to style the combination of item + caption in styles.css #} {%- set clean_item = unit.item|default('Container')|string -%} {%- if clean_item|is_hidden -%} {%- if unit.caption -%} {{unit.caption}} {%- endif -%} {%- else -%} {{clean_item}} {%- if unit.caption -%} {{unit.caption}} {%- endif -%} {%- endif -%} {%- endmacro -%} {%- macro create_branch(unit) -%} {{ summarize(unit)}} {# Create the label based on and tags #} {%- if unit.content -%} {{unit.content|trim|safe|md_to_html }} {# Needs to be safe since some unit content may have html #} {%- endif -%} {% if unit|is_par %} {% endif %} {%- endmacro -%} {%- macro create_branches(units) -%} {%- if units -%} {%- endif -%} {%- endmacro -%} {%- macro connect_breadcrumbs(units) -%} {% for unit in units -%} {{ unit|crumb }} {%- endfor %} {%- endmacro -%} {%- macro create_paragraphs(units) -%} {% if units %} {%- for unit in units -%} {{ unit|paragrapher }} {{ create_paragraphs(unit.units|from_json) }} {%- endfor -%} {% endif %} {%- endmacro -%}