From 63e59bffb9ce200c98acffe6383748b26075b2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Lohrer?= Date: Tue, 28 Apr 2026 08:41:11 +0200 Subject: [PATCH] feat(spa): post-detail rendert prerendered aus snapshot Snapshot-pfad: page+head komplett aus json, mit og/twitter/jsonld/hreflang. Runtime-fallback: falls data.snapshot null, loadPost+PostView wie bisher. Reactions/replies kommen im naechsten task. svelte:head auf top-level verschoben (svelte-constraint: keine meta-tags innerhalb von {#if}-bloecken erlaubt). Co-Authored-By: Claude Opus 4.7 (1M context) --- app/src/routes/[...slug]/+page.svelte | 253 ++++++++++++++++++++------ 1 file changed, 196 insertions(+), 57 deletions(-) diff --git a/app/src/routes/[...slug]/+page.svelte b/app/src/routes/[...slug]/+page.svelte index 13afecf..d38b296 100644 --- a/app/src/routes/[...slug]/+page.svelte +++ b/app/src/routes/[...slug]/+page.svelte @@ -1,70 +1,209 @@ + + {#if snapshot} + {snapshot.title} – Jörg Lohrer + + + + + + + + + + {#if snapshot.cover_image?.width} + + {/if} + {#if snapshot.cover_image?.height} + + {/if} + + + + + + {#each snapshot.translations as alt} + + {/each} + + + {/if} + + - - -{#if post} - +{#if snapshot} +
+

{snapshot.title}

+ {#if snapshot.cover_image} +

+ {snapshot.cover_image.alt +

+ {/if} + {#if snapshot.summary} +

{snapshot.summary}

+ {/if} +
{@html bodyHtmlPrerendered}
+
+{:else} + + {#if post} + + {/if} {/if}