Pàgines llista de reproducció
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<div class="flex flex-row flex-wrap justify-center"
|
||||
id="playlist-name">
|
||||
<form>
|
||||
<input name="name"
|
||||
placeholder="Nom de la playlist"
|
||||
value="{{ playlist.name if playlist.name else '' }}"
|
||||
class="border border-beige focus:outline-none
|
||||
rounded text-3xl
|
||||
bg-brown p-2 m-0"
|
||||
/>
|
||||
<button title="Desa"
|
||||
class="text-beige text-3xl mx-1"
|
||||
hx-put="/api/playlist/{{ playlist.id }}/name"
|
||||
hx-target="#playlist-name"
|
||||
hx-swap="outerHTML">
|
||||
<i class="fa fa-check" aria-hidden="true"></i>
|
||||
</button>
|
||||
<button title="Descarta"
|
||||
class="text-beige text-3xl mx-1"
|
||||
hx-get="/api/playlist/{{ playlist.id }}/name"
|
||||
hx-target="#playlist-name"
|
||||
hx-swap="outerHTML">
|
||||
<i class="fa fa-times" aria-hidden="true"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
19
folkugat_web/assets/templates/fragments/playlist/name.html
Normal file
19
folkugat_web/assets/templates/fragments/playlist/name.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="flex flex-row flex-wrap justify-center"
|
||||
id="playlist-name">
|
||||
<h3 class="text-3xl text-center p-4">
|
||||
{% if playlist.name %}
|
||||
{{ playlist.name }}
|
||||
{% else %}
|
||||
Llista de temes
|
||||
{% endif %}
|
||||
</h3>
|
||||
{% if logged_in %}
|
||||
<button title="Canvia el nom"
|
||||
class="text-beige text-2xl mx-2"
|
||||
hx-get="/api/playlist/{{ playlist.id }}/editor/name"
|
||||
hx-target="#playlist-name"
|
||||
hx-swap="outerHTML">
|
||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
13
folkugat_web/assets/templates/fragments/playlist/pagina.html
Normal file
13
folkugat_web/assets/templates/fragments/playlist/pagina.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{% include "fragments/menu.html" %}
|
||||
<div class="flex justify-center">
|
||||
<div class="m-12 grow max-w-4xl">
|
||||
<div id="playlist-name">
|
||||
{% include "fragments/playlist/name.html" %}
|
||||
</div>
|
||||
<div class="text-left">
|
||||
{% set playlist_id = playlist.id %}
|
||||
{% set playlist = playlist %}
|
||||
{% include "fragments/playlist/playlist.html" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user