mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-10-04 18:43:39 -04:00
26 lines
607 B
Vue
26 lines
607 B
Vue
<template>
|
|
<nuxt-link v-if="locale === $config.locale" :to="link">
|
|
<slot></slot>
|
|
</nuxt-link>
|
|
<a v-else-if="locale === 'external'" :href="link" target="_blank" rel="noopener">
|
|
<slot></slot>
|
|
</a>
|
|
<a v-else :href="(locale === '_' || $locales[locale] === undefined ? homeLink : $locales[locale].url) + link">
|
|
<slot></slot>
|
|
</a>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
link: { required: true },
|
|
locale: { required: true },
|
|
},
|
|
data() {
|
|
return {
|
|
homeLink: process.env.HOME_URL,
|
|
};
|
|
},
|
|
};
|
|
</script>
|