Added indexed lists and link edition in tunes

This commit is contained in:
marc
2025-03-11 23:05:20 +01:00
parent efd26ce19d
commit a85efd0838
22 changed files with 498 additions and 137 deletions

View File

@@ -1,21 +1,29 @@
<li class="flex flex-row items-start">
<div class="p-2 m-2 text-beige border border-beige rounded-md">
<a href="{{ link.url }}" target="_blank">
{% if link.subtype == LinkSubtype.SPOTIFY %}
{% include "icons/spotify.svg" %}
{% elif link.subtype == LinkSubtype.YOUTUBE %}
{% include "icons/youtube.svg" %}
{% elif link.subtype == LinkSubtype.PDF %}
{% include "icons/pdf.svg" %}
{% elif link.type == LinkType.AUDIO %}
{% include "icons/notes.svg" %}
{% else %}
{% include "icons/link.svg" %}
{% endif %}
</a>
</div>
<li id="tema-link-{{ link.id }}"
class="flex flex-row items-start">
{% include "fragments/tema/link_icon.html" %}
<div class="my-2">
<p class="text-sm text-beige">Partitura</p>
<p>Hola</p>
<p class="text-sm text-beige">
{{ link.content_type.value.capitalize() }}
</p>
{% if link.title %}
<p>{{ link.title }}</p>
{% endif %}
</div>
{% if logged_in %}
<div class="grow"></div>
<div class="m-2 text-sm text-beige">
<button title="Modifica l'enllaç"
hx-get="/api/tema/{{ tema.id }}/editor/link/{{ link.id }}"
hx-target="#tema-link-{{ link.id }}"
hx-swap="outerHTML">
<i class="fa fa-pencil" aria-hidden="true"></i>
</button>
<button title="Esborra l'enllaç"
hx-delete="/api/tema/{{ tema.id }}/link/{{ link.id }}"
hx-target="#tema-link-{{ link.id }}"
hx-swap="outerHTML">
<i class="fa fa-times" aria-hidden="true"></i>
</button>
</div>
{% endif %}
</li>