fix(theme): don't add `rel=me` for team members

pull/4881/head
Divyansh Singh 2 months ago
parent 34886c667d
commit eb7658d406

@ -7,6 +7,7 @@ const props = defineProps<{
icon: DefaultTheme.SocialLinkIcon icon: DefaultTheme.SocialLinkIcon
link: string link: string
ariaLabel?: string ariaLabel?: string
me: boolean
}>() }>()
const el = ref<HTMLAnchorElement>() const el = ref<HTMLAnchorElement>()
@ -45,7 +46,7 @@ if (import.meta.env.SSR) {
:href="link" :href="link"
:aria-label="ariaLabel ?? (typeof icon === 'string' ? icon : '')" :aria-label="ariaLabel ?? (typeof icon === 'string' ? icon : '')"
target="_blank" target="_blank"
rel="me noopener" :rel="me ? 'me noopener' : 'noopener'"
v-html="svg" v-html="svg"
></a> ></a>
</template> </template>

@ -2,9 +2,12 @@
import type { DefaultTheme } from 'vitepress/theme' import type { DefaultTheme } from 'vitepress/theme'
import VPSocialLink from './VPSocialLink.vue' import VPSocialLink from './VPSocialLink.vue'
defineProps<{ withDefaults(defineProps<{
links: DefaultTheme.SocialLink[] links: DefaultTheme.SocialLink[]
}>() me?: boolean
}>(), {
me: true
})
</script> </script>
<template> <template>
@ -15,6 +18,7 @@ defineProps<{
:icon :icon
:link :link
:ariaLabel :ariaLabel
:me
/> />
</div> </div>
</template> </template>

@ -40,7 +40,7 @@ withDefaults(defineProps<Props>(), {
</p> </p>
<p v-if="member.desc" class="desc" v-html="member.desc" /> <p v-if="member.desc" class="desc" v-html="member.desc" />
<div v-if="member.links" class="links"> <div v-if="member.links" class="links">
<VPSocialLinks :links="member.links" /> <VPSocialLinks :links="member.links" :me="false" />
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save