Ссылки по самому сайту теперь не открывают новую вкладку
This commit is contained in:
parent
e6cc0ef138
commit
778219127c
3 changed files with 30 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts">
|
||||
import { tryGetIcon } from '$lib/util/IconResolver';
|
||||
import { isLinkLocal, tryGetIcon } from '$lib/util/LinkResolver';
|
||||
import HoverIcon from './HoverIcon.svelte';
|
||||
|
||||
export let href: string;
|
||||
|
@ -10,8 +10,8 @@
|
|||
|
||||
<a
|
||||
{href}
|
||||
class="{className} drop-shadow-2xl flex flex-row transition-all hover:scale-110"
|
||||
target="_blank"
|
||||
class="{className} flex flex-row drop-shadow-2xl transition-all hover:scale-110"
|
||||
target={isLinkLocal(href) ? '_self' : '_blank'}
|
||||
>
|
||||
<div class="shrink-0 rounded-l-xl bg-slate-800 p-2">
|
||||
<HoverIcon src={customIcon ?? tryGetIcon(href)} class="text-sm uppercase" text={href} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue