Link
3 variants. Open one in isolation: use the link on each card.
---/** * Text link with site-consistent variants. Base `a` rules in `global.css` still apply * (ink color, underline on hover) unless a variant overrides tone. * Set `isMeta` for Source Code Pro (adds `font-mono font-normal`). */interface Props { href: string variant?: 'default' | 'muted' | 'faint' isMeta?: boolean class?: string label?: string external?: boolean rel?: string target?: string title?: string id?: string 'aria-label'?: string}
const { href, variant = 'default', isMeta = false, class: className, label, external, rel, target, title, id, 'aria-label': ariaLabel,} = Astro.props
const variantClass: Record<NonNullable<Props['variant']>, string> = { default: 'text-ink transition-colors', muted: 'text-ink-muted transition-colors', faint: 'text-ink-faint transition-colors',}
const resolvedTarget = target ?? (external ? '_blank' : undefined)const resolvedRel = rel ?? (external ? 'noopener noreferrer' : undefined)---
<a href={href} id={id} title={title} class:list={[isMeta && 'font-mono font-normal', variantClass[variant], className]} aria-label={ariaLabel} target={resolvedTarget} rel={resolvedRel}> <slot>{label}</slot></a>