Add ability to add/delete exercises from dropdown

This commit is contained in:
Peter Stockings
2024-11-04 16:46:22 +11:00
parent 7d43965289
commit 7d65f9b8e8
4 changed files with 42 additions and 3 deletions

View File

@@ -5,5 +5,13 @@
{% endfor %}
</ul>
{% else %}
<div class="py-2 px-4 text-gray-500">No results found</div>
<div class="py-2 px-4 text-gray-500 flex items-center justify-between">
<span>No results found</span>
<!-- Add Exercise Button -->
<button hx-post="{{ url_for('add_exercise') }}" hx-target="closest div" hx-swap="outerHTML"
hx-include="[name='query']" class="text-blue-500 hover:text-blue-700 font-semibold"
_="on click from me call event.stopPropagation()">
Add Exercise
</button>
</div>
{% endif %}