misc: fix link
This commit is contained in:
1 parent
0322188724
commit
dcf1fba1df
1 file changed
+1
-10
@@ -3,7 +3,6 @@
|
|||||||
export let highlight: boolean = false
|
export let highlight: boolean = false
|
||||||
export let nowrap: boolean = false
|
export let nowrap: boolean = false
|
||||||
|
|
||||||
$: url = new URL(href)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<a {href} class="{highlight ? 'text-blue-500' : ''} hover:underline max-w-full">
|
<a {href} class="{highlight ? 'text-blue-500' : ''} hover:underline max-w-full">
|
||||||
@@ -14,15 +13,7 @@
|
|||||||
? 'w-full whitespace-nowrap overflow-hidden text-ellipsis text-xs'
|
? 'w-full whitespace-nowrap overflow-hidden text-ellipsis text-xs'
|
||||||
: ''} {$$props.class}"
|
: ''} {$$props.class}"
|
||||||
>
|
>
|
||||||
<span class="opacity-90">
|
{href}
|
||||||
{url.protocol}//
|
|
||||||
</span>
|
|
||||||
<span class="font-bold">
|
|
||||||
{url.hostname}
|
|
||||||
</span>
|
|
||||||
<span class="opacity-90">
|
|
||||||
{url.pathname}
|
|
||||||
</span>
|
|
||||||
</span>
|
</span>
|
||||||
</slot>
|
</slot>
|
||||||
</a>
|
</a>
|
||||||
Reference in new issue
Block a user