Something went wrong. Try again.
my website https://bigspeed.me
Something went wrong. Try again.
370 B · 18 lines
Astro
at master
12345678910111213141516171819---const { href, text } = Astro.props;const currentPath = Astro.url.pathname;
const isExternal = href.startsWith("https://");---
<a href={href} target={isExternal ? "_blank" : "_self"}> <div class={ "inline-block relative" + (currentPath === href ? " underline decoration-2 underline-offset-8" : "" )}> {text} </div></a>