feat: enhance HeroBlock with SPA navigation for anchor links and update feature card styles

This commit is contained in:
2026-02-27 13:58:46 +00:00
parent d1ef9800f1
commit 18b5af5617
4 changed files with 71 additions and 16 deletions
+3
View File
@@ -1,9 +1,11 @@
<script lang="ts">
import { reveal } from "../lib/actions/reveal"
import { spaLink } from "../lib/navigation"
let { block }: { block: ContentBlockEntry } = $props()
const hasImage = $derived(block.heroImage?.externalUrl || block.heroImage?.image)
const isAnchorLink = $derived(block.callToAction?.buttonLink?.startsWith("#"))
</script>
<section
@@ -53,6 +55,7 @@
<a
href={block.callToAction.buttonLink || "#"}
target={block.callToAction.buttonTarget || undefined}
use:spaLink={{ noScroll: isAnchorLink }}
class="inline-flex items-center gap-2 bg-brand-500 hover:bg-brand-400 text-white font-bold px-8 py-4 rounded-xl text-lg transition-all duration-300 hover:shadow-lg hover:shadow-brand-500/25 hover:-translate-y-0.5"
>
{block.callToAction.buttonText}