Files
xrpl-dev-portal/template/component-label-list.html.jinja
2021-06-15 12:01:08 -07:00

21 lines
780 B
Django/Jinja

{% if use_page is undefined %}{% set use_page = currentpage %}{% endif %}
{% if use_page.labels %}
<div class="labels-wrap">
<ul class="list-inline">
{% for label in use_page.labels %}
{% set label_landing = pages|selectattr("landing_for", "defined_and_equalto", label)|first %}
{% if label_landing %}
<li class="list-inline-item">
<a href="{% if "//" not in label_landing.html %}{{target.prefix}}{% endif %}{{label_landing.html}}" class="label label-{{slug(label)}}">{{label}}</a>
</li>
{% else %}
<li class="list-inline-item">
<span class="label label-{{slug(label)}}">{{label}}</span>
<!-- TEMPLATE WARNING: no label landing found for "{{label}}" -->
</li>
{% endif %}
{% endfor %}
</ul>
</div><!--/.labels-wrap-->
{% endif %}