mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 14:20:42 +08:00
Provide a full window error if something goes wrong
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<script lang="ts">
|
||||
import type { Snippet } from "svelte";
|
||||
|
||||
import Icon from "./Icon.svelte";
|
||||
|
||||
const { href, children }: { href: string; children?: Snippet } = $props();
|
||||
</script>
|
||||
|
||||
<style>
|
||||
a {
|
||||
font-weight: var(--font-weight-semibold);
|
||||
color: inherit;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 2px;
|
||||
color: var(--color-fill-secondary);
|
||||
}
|
||||
|
||||
.icon {
|
||||
color: var(--color-foreground-dim);
|
||||
position: relative;
|
||||
bottom: 1px;
|
||||
}
|
||||
|
||||
a:hover .icon {
|
||||
color: var(--color-fill-secondary-hover);
|
||||
}
|
||||
</style>
|
||||
|
||||
<a {href} target="_blank" rel="noreferrer">
|
||||
{#if children}
|
||||
{@render children()}
|
||||
{:else}
|
||||
{href}
|
||||
{/if}
|
||||
<span class="icon"><Icon name="open-external" /></span>
|
||||
</a>
|
||||
Reference in New Issue
Block a user