misc: fix link

This commit is contained in:
Xyphyn committed 2023-08-18 08:04:52 -07:00
1 parent 0322188724
commit dcf1fba1df
1 file changed
+1 -10
+1 -10
View File
@@ -3,7 +3,6 @@
export let highlight: boolean = false
export let nowrap: boolean = false
$: url = new URL(href)
</script>
<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'
: ''} {$$props.class}"
>
<span class="opacity-90">
{url.protocol}//
</span>
<span class="font-bold">
{url.hostname}
</span>
<span class="opacity-90">
{url.pathname}
</span>
{href}
</span>
</slot>
</a>