htmx liveswap for increase/decrease
This commit is contained in:
parent
4aa1fa5731
commit
d1585409a2
5 changed files with 7 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
<div class="card">
|
||||
<div class="card" id="card-{{ food.id }}">
|
||||
<p class="food-name">
|
||||
{{ food.name }}
|
||||
</p>
|
||||
|
|
@ -12,8 +12,8 @@
|
|||
</p>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button class="increase">+</button>
|
||||
<button class="decrease">-</button>
|
||||
<button class="increase" hx-post="/increase/{{ food.id }}" hx-target="#card-{{ food.id }}">+</button>
|
||||
<button class="decrease" hx-post="/decrease/{{ food.id }}" hx-target="#card-{{ food.id }}">-</button>
|
||||
</div>
|
||||
<div class="checkboxes">
|
||||
{% for counter in self::range(10) %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue