feat(11ty): render flag outside link in toc

This commit is contained in:
Oscar 2019-11-17 18:27:28 +01:00
parent 4f4418583f
commit a83f278cee

View File

@ -1,19 +1,10 @@
{% set renderedName %}
{{ definition.data.title}}
<li>
{{ definition.data.title | linkIfExistsInCollection(collections.definedWords) | safe }}
{%- if
definition.data.flag and
definition.data.flag.type and
(definition.data.flag.level == 'avoid') -%}
<span class="flag__red">{{ definition.data.flag.type }}</span>
{% endif %}
{% endset %}
<li>
{%- if definition.data.defined -%}
<a
href={{ definition.data.slug | linkTarget | url }}
class="word__link"
>{{ renderedName | safe }}</a>
{%- else -%}
{{ renderedName | safe }}
{% endif %}
</li>