Afegir cartells a les jams (i esquelet per a slow jams i notes)
This commit is contained in:
36
folkugat_web/assets/templates/fragments/sessio/cartell.html
Normal file
36
folkugat_web/assets/templates/fragments/sessio/cartell.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<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>
|
||||
@@ -0,0 +1,23 @@
|
||||
<form id="cartell-editor"
|
||||
class="flex flex-row gap-2"
|
||||
hx-encoding="multipart/form-data">
|
||||
<input type='file'
|
||||
class="border border-beige focus:outline-none
|
||||
rounded grow
|
||||
bg-brown p-1 my-1"
|
||||
name='upload_file'/>
|
||||
<button title="Desa els canvis"
|
||||
class="mx-1 text-beige"
|
||||
hx-put="/api/sessio/{{ session_id }}/cartell"
|
||||
hx-target="#cartell-editor"
|
||||
hx-swap="outerHTML">
|
||||
<i class="fa fa-check" aria-hidden="true"></i>
|
||||
</button>
|
||||
<button title="Descarta els canvis"
|
||||
class="mx-1 text-beige"
|
||||
hx-get="/api/sessio/{{ session_id }}/cartell"
|
||||
hx-target="#cartell-editor"
|
||||
hx-swap="outerHTML">
|
||||
<i class="fa fa-times" aria-hidden="true"></i>
|
||||
</button>
|
||||
</form>
|
||||
@@ -12,6 +12,7 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</h3>
|
||||
{% include "fragments/sessio/cartell.html" %}
|
||||
<div class="text-left">
|
||||
<h4 class="pt-4 text-xl text-beige">Horari i lloc</h4>
|
||||
De {{ session.start_time.strftime("%H:%M") }}
|
||||
@@ -29,6 +30,17 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if logged_in or session.notes %}
|
||||
<div class="text-left">
|
||||
<h4 class="py-4 text-xl text-beige">Notes</h4>
|
||||
{% if session.notes %}{{ session.notes }}{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if logged_in or False %}
|
||||
<div class="text-left">
|
||||
<h4 class="py-4 text-xl text-beige">Slow Jam</h4>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if logged_in or playlist.sets %}
|
||||
<div class="text-left">
|
||||
<h4 class="py-4 text-xl text-beige mt-2">Temes tocats</h4>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{% if logged_in %}
|
||||
<div class="flex flex-col items-center">
|
||||
<button class="text-beige mt-2"
|
||||
hx-post="/api/sessio/{{ session.id }}/set"
|
||||
hx-post="/api/sessio/{{ session.id }}/playlist/set"
|
||||
hx-target="#playlist-{{ session.id }}"
|
||||
hx-swap="beforeend transition:true">
|
||||
<i class="fa fa-plus" aria-hidden="true"></i>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
m-4 rounded-lg bg-white
|
||||
px-2 py-1 my-1"
|
||||
id="set-entry-{{ set_id }}"
|
||||
hx-get="/api/sessio/{{ session_id }}/set/{{ set_id }}"
|
||||
hx-get="/api/sessio/{{ session_id }}/playlist/set/{{ set_id }}"
|
||||
hx-target="#set-entry-{{ set_id }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-trigger="reload-set-{{ set_id }}">
|
||||
@@ -25,7 +25,7 @@
|
||||
w-full max-w-[655px]">
|
||||
{% if logged_in %}
|
||||
<button class="text-beige w-full"
|
||||
hx-delete="/api/sessio/{{ session_id }}/set/{{ set_id }}"
|
||||
hx-delete="/api/sessio/{{ session_id }}/playlist/set/{{ set_id }}"
|
||||
hx-target="#set-entry-{{ set_id }}"
|
||||
hx-swap="outerHTML">
|
||||
<i class="fa fa-times" aria-hidden="true"></i>
|
||||
@@ -44,7 +44,7 @@
|
||||
</ol>
|
||||
{% if logged_in %}
|
||||
<button class="text-beige mt-2 w-full"
|
||||
hx-post="/api/sessio/{{ session_id }}/set/{{ set_id }}"
|
||||
hx-post="/api/sessio/{{ session_id }}/playlist/set/{{ set_id }}"
|
||||
hx-target="#set-entry-{{ set_id }}-list"
|
||||
hx-swap="beforeend transition:true">
|
||||
<i class="fa fa-plus" aria-hidden="true"></i>
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
class="border border-beige focus:outline-none
|
||||
rounded text-center text-black
|
||||
p-1 m-1"
|
||||
hx-get="/api/sessio/{{ session_id }}/set/{{ set_id }}/tema/{{ tema_entry.id }}/busca"
|
||||
hx-get="/api/sessio/{{ session_id }}/playlist/set/{{ set_id }}/tema/{{ tema_entry.id }}/busca"
|
||||
hx-trigger="revealed, keyup delay:500ms changed"
|
||||
hx-target="#tune-entry-{{ tema_entry.id }}-search-results"
|
||||
hx-swap="outerHTML"/>
|
||||
<button title="Descarta els canvis"
|
||||
class="text-beige mx-1"
|
||||
hx-get="/api/sessio/{{ session_id }}/set/{{ set_id }}/tema/{{ tema_entry.id }}"
|
||||
hx-get="/api/sessio/{{ session_id }}/playlist/set/{{ set_id }}/tema/{{ tema_entry.id }}"
|
||||
hx-target="#tune-entry-{{ tema_entry.id }}"
|
||||
hx-swap="outerHTML">
|
||||
<i class="fa fa-times" aria-hidden="true"></i>
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
<div class="flex-none flex flex-row shrink-0">
|
||||
<button title="Edita el tema"
|
||||
class="text-beige mx-1"
|
||||
hx-get="/api/sessio/{{ session_id }}/set/{{ set_id }}/tema/{{ tema_entry.id }}/editor"
|
||||
hx-get="/api/sessio/{{ session_id }}/playlist/set/{{ set_id }}/tema/{{ tema_entry.id }}/editor"
|
||||
hx-target="#tune-entry-{{ tema_entry.id }}"
|
||||
hx-swap="outerHTML">
|
||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
||||
</button>
|
||||
<button title="Esborra el tema"
|
||||
class="text-beige mx-1"
|
||||
hx-delete="/api/sessio/{{ session_id }}/set/{{ set_id }}/tema/{{ tema_entry.id }}"
|
||||
hx-delete="/api/sessio/{{ session_id }}/playlist/set/{{ set_id }}/tema/{{ tema_entry.id }}"
|
||||
hx-target="#tune-entry-{{ tema_entry.id }}"
|
||||
hx-swap="outerHTML">
|
||||
<i class="fa fa-times" aria-hidden="true"></i>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<li>
|
||||
<button class="bg-beige text-brown rounded
|
||||
m-1 px-2"
|
||||
hx-put="/api/sessio/{{ session_id }}/set/{{ set_id }}/tema/{{ entry_id }}"
|
||||
hx-put="/api/sessio/{{ session_id }}/playlist/set/{{ set_id }}/tema/{{ entry_id }}"
|
||||
hx-vals='{"tema_id": "{{ tema.id }}"}'
|
||||
hx-target="#tune-entry-{{ entry_id }}"
|
||||
hx-swap="outerHTML">
|
||||
@@ -15,7 +15,7 @@
|
||||
<li>
|
||||
<button class="border border-beige text-beige rounded
|
||||
m-1 px-2"
|
||||
hx-put="/api/sessio/{{ session_id }}/set/{{ set_id }}/tema/{{ entry_id }}/unknown"
|
||||
hx-put="/api/sessio/{{ session_id }}/playlist/set/{{ set_id }}/tema/{{ entry_id }}/unknown"
|
||||
hx-target="#tune-entry-{{ entry_id }}"
|
||||
hx-swap="outerHTML">
|
||||
<i class="fa fa-question" aria-hidden="true"></i>
|
||||
@@ -25,7 +25,7 @@
|
||||
<li>
|
||||
<button class="border border-beige text-beige rounded
|
||||
m-1 px-2"
|
||||
hx-post="/api/sessio/{{ session_id }}/set/{{ set_id }}/tema/{{ entry_id }}"
|
||||
hx-post="/api/sessio/{{ session_id }}/playlist/set/{{ set_id }}/tema/{{ entry_id }}"
|
||||
hx-vals='{"title": "{{ query }}"}'
|
||||
hx-target="#tune-entry-{{ entry_id }}"
|
||||
hx-swap="outerHTML">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
class="border border-beige focus:outline-none
|
||||
rounded grow
|
||||
bg-brown p-1 my-1"
|
||||
name='upload_file'>
|
||||
name='upload_file'/>
|
||||
<button title="Afegeix un enllaç"
|
||||
class="border border-beige rounded px-2 py-1 my-1"
|
||||
hx-get="/api/tema/{{ link.tema_id }}/editor/link/{{ link.id }}/url"
|
||||
|
||||
Reference in New Issue
Block a user