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
+10
View File
@@ -173,6 +173,16 @@ export const spaLink = (node: HTMLAnchorElement, options: SpaNavigateOptions = {
return
}
// Handle anchor links: scroll to element instead of SPA navigation
if (href.startsWith("#")) {
event.preventDefault()
const target = document.getElementById(href.slice(1))
if (target) {
target.scrollIntoView({ behavior: "smooth" })
}
return
}
// Skip if target is set (e.g., _blank)
if (node.target && node.target !== "_self") {
return