From 504fbb6cc6409ae774b7a55322d36eb9ee5d896e Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Sun, 19 Apr 2026 13:50:46 +0200 Subject: [PATCH] refactor(view): TimeDisplay als eigenstaendige Component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit timeSummary-Formatierung in eine wiederverwendbare Component gezogen. RecipeView liefert nur noch die drei Werte — zukuenftige Call-Sites (Preview, Hover-Cards) koennen dieselbe Logik reusen. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/lib/components/RecipeView.svelte | 23 ++++++-------------- src/lib/components/TimeDisplay.svelte | 30 +++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 17 deletions(-) create mode 100644 src/lib/components/TimeDisplay.svelte diff --git a/src/lib/components/RecipeView.svelte b/src/lib/components/RecipeView.svelte index e9ef736..ffedd54 100644 --- a/src/lib/components/RecipeView.svelte +++ b/src/lib/components/RecipeView.svelte @@ -1,6 +1,7 @@ {#if banner} @@ -79,9 +71,11 @@ {/each} {/if} - {#if timeSummary()} -

{timeSummary()}

- {/if} + {#if recipe.source_url}

Quelle: {recipe.source_domain} @@ -212,11 +206,6 @@ font-size: 0.8rem; color: #888; } - .times { - margin: 0 0 0.25rem; - color: #666; - font-size: 0.9rem; - } .src { margin: 0; font-size: 0.85rem; diff --git a/src/lib/components/TimeDisplay.svelte b/src/lib/components/TimeDisplay.svelte new file mode 100644 index 0000000..6b3dd1c --- /dev/null +++ b/src/lib/components/TimeDisplay.svelte @@ -0,0 +1,30 @@ + + +{#if summary} +

{summary}

+{/if} + +