Session editor and live sessions!

This commit is contained in:
marc
2025-03-21 19:42:43 +01:00
parent 6c83d11e5b
commit ac54453b7f
54 changed files with 1247 additions and 173 deletions

View File

@@ -10,7 +10,8 @@
p-2 m-2"
hx-get="/api/temes/busca"
hx-trigger="revealed, keyup delay:500ms changed"
hx-target="#search-results">
hx-target="#search-results"
hx-swap="outerHTML">
{% if logged_in %}
<button title="Afegeix un tema"
class="text-beige m-2"

View File

@@ -4,19 +4,9 @@
<li class="px-2 text-beige">
<a href="{{ link.url }}" target="_blank">
{% if link.content_type == ContentType.AUDIO %}
{% if link.link_type == LinkType.SPOTIFY %}
<i class="fa fa-music" aria-hidden="true"></i>
{% elif link.link_type == LinkType.YOUTUBE %}
<i class="fa fa-play" aria-hidden="true"></i>
{% else %}
<i class="fa fa-music" aria-hidden="true"></i>
{% endif %}
<i class="fa fa-volume-up" aria-hidden="true"></i>
{% elif link.content_type == ContentType.PARTITURA %}
{% if link.link_type == LinkType.PDF %}
<i class="fa fa-file" aria-hidden="true"></i>
{% else %}
<i class="fa fa-link" aria-hidden="true"></i>
{% endif %}
<i class="fa fa-music" aria-hidden="true"></i>
{% else %}
<i class="fa fa-link" aria-hidden="true"></i>
{% endif %}

View File

@@ -1,19 +1,41 @@
<table id="search-results"
class="text-left min-w-full w-full">
<tr class="border-b border-beige">
<td class="font-bold py-2 px-4">Nom</td>
<td class="font-bold py-2 px-4">Enllaços</td>
</tr>
{% for tema in temes %}
<tr class="border-b border-beige">
<td class="py-2 px-4">
<a href="/tema/{{ tema.id }}">
{{ tema.title }}
</a>
</td>
<td class="py-2 px-4">
{% include "fragments/temes/result_links.html" %}
</td>
</tr>
{% endfor %}
</table>
<div id="search-results"
class="min-w-full w-full">
<table class="text-left min-w-full w-full">
<tr class="border-b border-beige">
<td class="font-bold py-2 px-4">Nom</td>
<td class="font-bold py-2 px-4">Enllaços</td>
</tr>
{% for tema in temes %}
<tr class="border-b border-beige">
<td class="py-2 px-4">
<a href="/tema/{{ tema.id }}">
{{ tema.title }}
</a>
</td>
<td class="py-2 px-4">
{% include "fragments/temes/result_links.html" %}
</td>
</tr>
{% endfor %}
</table>
{% if prev_offset is not none or next_offset is not none %}
<div class="py-2">
{% if prev_offset is not none %}
<button class="text-beige mx-2"
hx-get="/api/temes/busca?query={{ query }}&offset={{ prev_offset }}"
hx-target="#search-results"
hx-swap="outerHTML">
<i class="fa fa-chevron-left" aria-hidden="true"></i>
</button>
{% endif %}
{% if next_offset is not none %}
<button class="text-beige mx-2"
hx-get="/api/temes/busca?query={{ query }}&offset={{ next_offset }}"
hx-target="#search-results"
hx-swap="outerHTML">
<i class="fa fa-chevron-right" aria-hidden="true"></i>
</button>
{% endif %}
</div>
{% endif %}
</div>