Tune editor
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
{% include "fragments/menu.html" %}
|
||||
<div class="p-12 text-center flex flex-col items-center justify-center">
|
||||
<h3 class="text-3xl text-beige p-4">Temes</h3>
|
||||
<button title="Afegeix un tema"
|
||||
class="text-beige m-2">
|
||||
<i class="fa fa-plus" aria-hidden="true"></i>
|
||||
Afegeix un tema
|
||||
</button>
|
||||
<input type="text" name="query" value=""
|
||||
<input id="query-input"
|
||||
type="text" name="query" value="{{ query }}"
|
||||
placeholder="Busca una tema..."
|
||||
class="rounded
|
||||
text-yellow-50 bg-brown
|
||||
@@ -15,10 +11,16 @@
|
||||
hx-get="/api/temes/busca"
|
||||
hx-trigger="revealed, keyup delay:500ms changed"
|
||||
hx-target="#search-results">
|
||||
<div class="flex justify-center">
|
||||
<div id="search-results"
|
||||
class="m-4 max-w-5xl
|
||||
flex flex-wrap items-center justify-center">
|
||||
</div>
|
||||
</div>
|
||||
{% if logged_in %}
|
||||
<button title="Afegeix un tema"
|
||||
class="text-beige m-2"
|
||||
hx-post="/api/tema"
|
||||
hx-include="[name=query]"
|
||||
hx-vals="js:{title: document.getElementById('query-input').value}"
|
||||
>
|
||||
<i class="fa fa-plus" aria-hidden="true"></i>
|
||||
Afegeix un tema
|
||||
</button>
|
||||
{% endif %}
|
||||
<div id="search-results" class="flex-col"></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user