Skip to content

Commit 3a9e0b0

Browse files
committed
hero image test transition
1 parent 45cef37 commit 3a9e0b0

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/components/BaseHead.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,5 @@ const ogImageUrl = new URL(image, baseUrl);
106106
<script src="set-url-here" crossorigin="anonymous"></script>
107107
-->
108108

109-
<ViewTransitions fallback="none" />
109+
<ViewTransitions />
110110
</head>

src/components/PostCard.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const { lastAccessDate, isUpdatedDate } = getPublishedOrUpdatedDate({
5858
alt={heroAlt}
5959
itemprop="image"
6060
class="w-full h-[168px] xs:h-[250px] md:h-[168px] md:max-w-[298px] object-cover rounded-box"
61-
transition:name={`hero-${heroImage.src}`}
61+
transition:name={`hero-image-${slug}`}
6262
/>
6363
</div>
6464
)

src/pages/blog/[slug].astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ const metadata: Metadata = { title, description, image };
9191
loading="eager"
9292
itemprop="image"
9393
class="block max-w-full h-auto aspect-[16/8] object-cover"
94+
transition:name={`hero-image-${slug}`}
9495
/>
9596
)
9697
}

0 commit comments

Comments
 (0)