From a22fb864799f23f775640f7d5e1ffcc1cac63a5d Mon Sep 17 00:00:00 2001 From: Hendrik Date: Fri, 17 Apr 2026 15:41:20 +0200 Subject: [PATCH] feat(print): add print-optimized route with server-side portion scaling Co-Authored-By: Claude Opus 4.7 (1M context) --- src/routes/recipes/[id]/print/+page.svelte | 140 +++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 src/routes/recipes/[id]/print/+page.svelte diff --git a/src/routes/recipes/[id]/print/+page.svelte b/src/routes/recipes/[id]/print/+page.svelte new file mode 100644 index 0000000..ef7f009 --- /dev/null +++ b/src/routes/recipes/[id]/print/+page.svelte @@ -0,0 +1,140 @@ + + +
+
+

{data.recipe.title}

+

+ {data.servings} {data.recipe.servings_unit ?? 'Portionen'} + {#if data.recipe.prep_time_min}· Vorb. {data.recipe.prep_time_min} min{/if} + {#if data.recipe.cook_time_min}· Kochen {data.recipe.cook_time_min} min{/if} + {#if data.recipe.source_url} + · Quelle: {data.recipe.source_domain} + {/if} +

+
+ + {#if data.recipe.image_path} + + {/if} + +
+

Zutaten

+
    + {#each data.ingredients as ing, i (i)} +
  • + + {formatQty(ing.quantity)}{#if ing.unit}{' '}{ing.unit}{/if} + + + {ing.name}{#if ing.note}{' '}({ing.note}){/if} + +
  • + {/each} +
+
+ +
+

Zubereitung

+
    + {#each data.recipe.steps as step (step.position)} +
  1. {step.text}
  2. + {/each} +
+
+ + {#if data.recipe.source_url} + + {/if} +
+ +