Initial commit
This commit is contained in:
32
folkugat_web/assets/templates/fragments/nota/footer.html
Normal file
32
folkugat_web/assets/templates/fragments/nota/footer.html
Normal file
@@ -0,0 +1,32 @@
|
||||
{% if logged_in %}
|
||||
|
||||
<button class="p-12"
|
||||
hx-post="/api/logout"
|
||||
hx-target="#nota">
|
||||
😎
|
||||
</button>
|
||||
|
||||
{% else %}
|
||||
|
||||
<button class="p-12"
|
||||
hx-get="/api/nota?value={{value or ''}}"
|
||||
hx-target="#nota"
|
||||
hx-swap="innerHTML"
|
||||
hx-include="#nota-input">
|
||||
♫
|
||||
</button>
|
||||
|
||||
{% if value %}
|
||||
<div class="p-12">
|
||||
{{ value }}
|
||||
</div>
|
||||
<button class="p-12"
|
||||
hx-get="/api/nota?value={{value or ''}}"
|
||||
hx-target="#nota"
|
||||
hx-swap="innerHTML"
|
||||
hx-include="#nota-input">
|
||||
♫
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
20
folkugat_web/assets/templates/fragments/nota/input.html
Normal file
20
folkugat_web/assets/templates/fragments/nota/input.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<button class="p-12"
|
||||
hx-post="/api/nota"
|
||||
hx-target="#nota"
|
||||
hx-swap="innerHTML"
|
||||
hx-include="#nota-input"
|
||||
hx-trigger="clicked, keyup[keyCode==13] from:#nota-input">
|
||||
♫
|
||||
</button>
|
||||
<input id="nota-input" type="text" name="value" value="{{value or ''}}"
|
||||
class="rounded border border-yellow-50 focus:outline-none
|
||||
text-yellow-50 text-center
|
||||
animate-grow max-w-xs
|
||||
bg-brown p-1 m-1">
|
||||
<button class="p-12"
|
||||
hx-post="/api/nota"
|
||||
hx-target="#nota"
|
||||
hx-swap="innerHTML"
|
||||
hx-include="#nota-input">
|
||||
♫
|
||||
</button>
|
||||
5
folkugat_web/assets/templates/fragments/nota/nota.html
Normal file
5
folkugat_web/assets/templates/fragments/nota/nota.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<div hx-post="/api/nota"
|
||||
hx-trigger="load"
|
||||
hx-target="#nota"
|
||||
hx-swap="innerHTML">
|
||||
</div>
|
||||
Reference in New Issue
Block a user