Skip to main content

Ivan Teoh

Something personal yet public

188-template30.html

(Source)

{% macro render_dialog(title, class=’dialog’) -%}
<div class="{{ class }}">
    <h2>{{ title }}</h2>
    <div class="contents">
        {{ caller() }}
    </div>
</div>
{%- endmacro %}

{% call render_dialog(’Hello World’) %}
    This is a simple dialog rendered by using a macro and
    a call block.
{% endcall %}