Squashed commit of the following:

commit 9b8fcecae7a2cb28a6e3061369c1a39e8e74791e
Author: TheThomaas <thethomaas@protonmail.ch>
Date:   Mon Apr 21 14:28:24 2025 +0200

    Add checkboxes to the ingredients list
This commit is contained in:
TheThomaas 2025-04-21 14:29:18 +02:00
parent 20dac4790c
commit 00b49aa15b
2 changed files with 6 additions and 6 deletions

View file

@ -40,7 +40,7 @@
<template x-if="currentServings"> <template x-if="currentServings">
<ul class="c-recipe__ingredients-list"> <ul class="c-recipe__ingredients-list">
<template x-for="(ingredient, index) in ingredients" :key="index"> <template x-for="(ingredient, index) in ingredients" :key="index">
<li x-text="adaptQuantity(ingredient, {{servings}}, currentServings)"></li> <li><label><input type="checkbox"><span x-text="adaptQuantity(ingredient, {{servings}}, currentServings)"></span></label></li>
</template> </template>
</ul> </ul>
</template> </template>
@ -48,7 +48,7 @@
<template x-if="!currentServings"> <template x-if="!currentServings">
<ul class="c-recipe__ingredients-list"> <ul class="c-recipe__ingredients-list">
{% for ingredient in ingredients %} {% for ingredient in ingredients %}
<li>{{ ingredient }}</li> <li><label><input type="checkbox"><span>{{ ingredient }}</span></label></li>
{% endfor %} {% endfor %}
</ul> </ul>
</template> </template>

View file

@ -14,11 +14,11 @@
.c-recipe__ingredients-list { .c-recipe__ingredients-list {
li { li {
margin-bottom: 12px; margin-bottom: 12px;
}
&::before { input[type="checkbox"] {
content: "-"; margin: 0;
margin-right: 6px; margin-inline-end: 6px;
}
} }
} }