{%- macro chart(content, type, data, labels) -%} {# Documentation: https://chartist.dev/ #} {%- if data -%} {%- set id = ui.util.id() -%} {%- set payload = {"series": data or [], "labels": labels or []} -%}
{{ content }}
{%- else -%}
{{ _("No data provided") }}
{%- endif %} {%- endmacro %} {%- macro code(content, language, dedent) -%}

        {%- if dedent -%}
            {%- set ns = namespace(skip=none) -%}
            {%- for line in content.splitlines() -%}
                {%- if ns.skip is none and loop.index < 3 and line -%}
                    {%- set ns.skip = line|length - line.lstrip(" ")|length -%}
                {%- endif -%}
                {{ line[ns.skip or 0:] ~ "\n" if line or not loop.first}}
            {%- endfor -%}
        {%- else -%}
            {{ content }}
        {%- endif -%}

    
{%- endmacro %} {%- macro definition_list(items) -%}
{%- for term, definition in items %}
{{ term }}
{{ definition }}
{%- endfor %}
{%- endmacro %} {%- macro table(content, striped=false, bordered=false) -%} {{ content }}
{%- endmacro %} {%- macro table_head(content) -%} {{ content }} {%- endmacro %} {%- macro table_body(content) -%} {{ content }} {%- endmacro %} {%- macro table_row(content) -%} {{ content }} {%- endmacro %} {%- macro table_cell(content, header=false) -%} {% set tag = "th" if header else "td" %} <{{ tag }} {{ ui.util.attrs(kwargs) }}> {{ content }} {%- endmacro %}