{%- macro summarize(node) -%} {# The label class is added to style the combination of item + caption in styles.css #} {%- set clean_item = node.item|default('Container')|string -%} {%- if clean_item|is_hidden -%} {%- if node.caption -%} {{node.caption}} {%- endif -%} {%- else -%} {{clean_item}} {%- if node.caption -%} {{node.caption}} {%- endif -%} {%- endif -%} {%- endmacro -%} {%- macro create_branch(node) -%} {{ summarize(node)}} {# Create the label based on and tags #} {%- if node.content -%} {{node.content|trim|safe|md_to_html }} {# Needs to be safe since some unit content may have html #} {%- endif -%} {%- if node|is_par -%} {%- endif -%} {# Fill missing node since paragraphs will not have a clickable prefix e.g Art. 1, Sec. 5, etc. #} {%- endmacro -%} {# special rule: check on the first child to determine whether it should form part of the ul tag or whether only ul to start with paragraph 2 onwards #} {# id relevant for branch unit; this enables a hook to referenced instances #} {# data-par relevant so that this can indented via a css #} {%- macro create_branches(units) -%} {%- endmacro -%} {%- macro connect_breadcrumbs(nodes) -%}

{% for node in nodes -%} {{ node|crumb }} {%- endfor %}

{%- endmacro -%}