{% if tags|length > 0 %}
{% for tag in tags %}
{% if tag.is_selected %}
<span
    class="text-xs font-semibold inline-block py-1 px-2 uppercase rounded text-pink-600 bg-pink-200 uppercase last:mr-0 mr-1 max-h-fit cursor-pointer"
    hx-get="{{ url_for('tags.goto_tag') }}"
    hx-vals='{"filter": "{{ tag.tag_filter }}", "person_id": "{{ tag.person_id }}"}' hx-target="#container"
    hx-push-url="true">
    {{ tag.tag_name }}
</span>
{% endif %}
{% endfor %}
{% else %}
<span
    class="text-xs font-semibold inline-block py-1 px-2 uppercase rounded text-gray-400 bg-gray-200 last:mr-0 mr-1 max-h-fit">
    No tags
</span>
{% endif %}