{#if data.ingredients}
{#if data.portions}
Portionen:
{@html convertFloatsToFractions(multiplyFirstAndSecondNumbers(data.portions, multiplier))} {/if}
Menge anpassen:
multiplier=0.5}>
1
⁄
2
x
{multiplier=1; custom_mul="…"}}>1x
{multiplier=1.5; custom_mul="…"}}>
3
⁄
2
x
2x
3x
{ const el = e.composedPath()[0].children[0]; if(el){ el.focus()}}}>
{ custom_mul="" } } on:blur="{() => { apply_if_not_NaN(custom_mul); if(custom_mul == "") {custom_mul = "…"} }}" bind:innerHTML={custom_mul} contenteditable >
x
Zutaten
{#each data.ingredients as list} {#if list.name}
{list.name}
{/if}
{#each list.list as item}
{@html adjust_amount(item.amount, multiplier)} {item.unit}
{@html item.name.replace("{{multiplier}}", multiplier * item.amount)}
{/each}
{/each}
{/if}