fix(theme): don't show external link icon on social links

pull/2663/head
Divyansh Singh 1 year ago
parent b199885b9b
commit f3a459708d

@ -19,7 +19,11 @@ const isExternal = computed(() => props.href && EXTERNAL_URL_RE.test(props.href)
<component
:is="tag"
class="VPLink"
:class="{ link: href, 'vp-external-link-icon': isExternal && !noIcon }"
:class="{
link: href,
'vp-external-link-icon': isExternal,
'no-icon': noIcon
}"
:href="href ? normalizeLink(href) : undefined"
:target="target || (isExternal ? '_blank' : undefined)"
:rel="rel || (isExternal ? 'noreferrer' : undefined)"

@ -17,7 +17,7 @@ const svg = computed(() => {
<template>
<a
class="VPSocialLink"
class="VPSocialLink no-icon"
:href="link"
:aria-label="ariaLabel ?? (typeof icon === 'string' ? icon : '')"
target="_blank"

@ -538,8 +538,8 @@
max-width: calc((100% - 24px) / 2) !important;
}
:is(.vp-external-link-icon, .vp-doc a[href*="://"], .vp-doc a[target="_blank"])::after
{
/* prettier-ignore */
:is(.vp-external-link-icon, .vp-doc a[href*='://'], .vp-doc a[target='_blank']):not(.no-icon)::after {
display: inline-block;
margin-top: -1px;
margin-left: 4px;

Loading…
Cancel
Save