{% macro render_paragraph(block) %}
<p>
{% for el in block.content.paragraph.rich_text -%}
{{ el.text.content }}
{%- endfor %}
</p>
{% endmacro %}

{% macro render_heading_1(block) %}
<h1>
{% for el in block.content.heading_1.rich_text -%}
{{ el.text.content }}
{%- endfor %}
</h1>
{% endmacro %}

{% macro render_heading_2(block) %}
<h2>
{% for el in block.content.heading_2.rich_text -%}
{{ el.text.content }}
{%- endfor %}
</h2>
{% endmacro %}

{% macro render_heading_3(block) %}
<h3>
{% for el in block.content.heading_3.rich_text -%}
{{ el.text.content }}
{%- endfor %}
</h3>
{% endmacro %}

{% macro render_quote(block) %}
<blockquote>
    {% for el in block.content.quote.rich_text -%}
    {{ el.text.content }}
    {%- endfor %}
</blockquote>
{% endmacro %}

{% macro render_divider(block) %}
<hr></hr>
{% endmacro %}

{% macro render_block(block) %}
{% if block.type == 'paragraph' %}
    {{ render_paragraph(block) }}
{% elif block.type == 'heading_1' %}
    {{ render_heading_1(block) }}
{% elif block.type == 'heading_2' %}
    {{ render_heading_2(block) }}
{% elif block.type == 'heading_3' %}
    {{ render_heading_3(block) }}
{% elif block.type == 'quote' %}
    {{ render_quote(block) }}
{% elif block.type == 'divider' %}
    {{ render_divider(block) }}
{% else %}
<p>Unknown: {{ block.type }} </p>
{% endif %}
{% endmacro %}
