{% if logged_in or tema.links %}
  <h4 class="pt-4 text-xl text-beige">Enllaços</h4>
  <hr class="h-px mt-1 mb-3 bg-beige border-0">
  <ul class="flex flex-col justify-center"
      id="new-link-target">
    {% for link in tema.links %}
      {% include "fragments/tema/link.html" %}
    {% endfor %}
  </ul>
{% endif %}

{% if logged_in %}
<div class="flex flex-row my-2 justify-end">
  <button title="Afegeix un enllaç"
          class="text-sm text-beige text-right"
          hx-post="/api/tema/{{ tema.id }}/link"
          hx-target="#new-link-target"
          hx-swap="beforeend transition:true">
    <i class="fa fa-plus" aria-hidden="true"></i>
    Afegeix un enllaç
  </button>
</div>
{% endif %}
