recipes: view transitions for recipe detail navigation
All checks were successful
CI / update (push) Successful in 1m31s

Image morphs between CompactCard thumbnail and hero, title block
slides up from bottom, header persists across transitions. Only
activates for recipe detail navigations, not between list pages.
This commit is contained in:
2026-02-17 18:59:18 +01:00
parent f074c0af08
commit 207efcc38e
5 changed files with 59 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
<script>
import { onMount } from "svelte";
let { src, color = '', alt = "", children } = $props();
let { src, color = '', alt = "", transitionName = '', children } = $props();
let isredirected = $state(false);
@@ -145,7 +145,7 @@ dialog button{
<!-- svelte-ignore a11y_no_static_element_interactions -->
<div class:zoom-in={!isredirected} onclick={show_dialog_img}>
<div class="image-wrap" style:background-color={color}>
<img class="image" {src} {alt}/>
<img class="image" {src} {alt} style:view-transition-name={transitionName || null}/>
</div>
<noscript>
<div class="image-wrap" style:background-color={color}>