From 0816cbe9e5fea246b1b744b08788c45c2af66f5d Mon Sep 17 00:00:00 2001 From: AlexBocken Date: Mon, 17 Jul 2023 09:14:09 +0200 Subject: [PATCH] custom multiplier and cleaner fractions --- src/lib/components/IngredientsPage.svelte | 215 ++++++++++++++++------ 1 file changed, 156 insertions(+), 59 deletions(-) diff --git a/src/lib/components/IngredientsPage.svelte b/src/lib/components/IngredientsPage.svelte index 29c1f45..a5ba6ad 100644 --- a/src/lib/components/IngredientsPage.svelte +++ b/src/lib/components/IngredientsPage.svelte @@ -1,14 +1,97 @@ {#if data.ingredients}
{#if data.portions}

Portionen:

- {@html convertFloatingPointToFraction(multiplyFirstAndSecondNumbers(data.portions, multiplier))} + {@html convertFloatsToFractions(multiplyFirstAndSecondNumbers(data.portions, multiplier))} {/if}

Menge anpassen:

- - - - + + + + +

Zutaten