<div id="cartell"
     class="flex flex-col items-center">
{% if session.cartell_url %}
  <div class="max-w-[655px] w-full
              flex flex-col items-center">
    {% if logged_in %}
    <div class="my-2 w-full text-beige text-right">
        <button title="Modifica el cartell"
                class="mx-1"
                hx-get="/api/sessio/{{ session_id }}/cartell/editor"
                hx-target="#cartell"
                hx-swap="outerHTML">
          <i class="fa fa-pencil" aria-hidden="true"></i>
        </button>
        <button title="Esborra el cartell"
                class="mx-1"
                hx-delete="/api/sessio/{{ session_id }}/cartell"
                hx-target="#cartell"
                hx-swap="outerHTML">
          <i class="fa fa-times" aria-hidden="true"></i>
        </button>
    </div>
    {% endif %}
    <img class="w-full h-auto"
         src="{{ session.cartell_url }}"/>
  </div>
{% elif logged_in %}
  <button class="text-beige mt-2"
          hx-get="/api/sessio/{{ session_id }}/cartell/editor"
          hx-target="#cartell"
          hx-swap="outerHTML">
      <i class="fa fa-plus" aria-hidden="true"></i>
      Afegeix cartell
  </button>
{% endif %}
</div>
