{% import "macros/render.nunj" as render %}
<section class="browser-code is-active" data-role="tab-panel" id="browser-{{ entity.id }}-panel-html">
    <h2>Example</h2>
    <code class="code-block code code--lang-html">
{# KEEP THIS WEIRD WHITESPACE to avoid extra space being fed into the <code> #}
{% if not entity.isCollated or entity.isVariant or entity.variants().size == 1 %}
<pre>{{ render.entity(entity.render(null, renderEnv, {preview: false, collate: false}) | async(true)) | trim }}</pre>
{% else %}
{% for variant in entity.variants().items() %}
<pre>{{ '<span class="hljs-comment">&lt;!-- ' + variant.label + ' --&gt;</span>' }}
{{ render.entity(variant.render(null, renderEnv, {preview: false, collate: false}) | async(true)) | trim }}
</pre>
{% if not loop.last %}<br>{% endif %}
{% endfor %}
{% endif %}
    </code>
</section>
