first commit
This commit is contained in:
commit
ff7c974867
227 changed files with 12908 additions and 0 deletions
20
src/components/Link.astro
Normal file
20
src/components/Link.astro
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
import type { HTMLAttributes } from "astro/types";
|
||||
|
||||
interface Props extends HTMLAttributes<"a"> {
|
||||
href: string;
|
||||
external?: boolean;
|
||||
class?: string;
|
||||
}
|
||||
|
||||
const { href, external = true, ...rest } = Astro.props;
|
||||
---
|
||||
|
||||
<a
|
||||
href={href}
|
||||
rel={external ? "noopener nofollow noreferrer" : ""}
|
||||
target={external ? "_blank" : "_self"}
|
||||
{...rest}
|
||||
>
|
||||
<slot />
|
||||
</a>
|
Loading…
Add table
Add a link
Reference in a new issue