feat(localelinks): path the optional localelinks

Signed-off-by: Sepush <sepush@outlook.com>
pull/957/head
Sepush 3 years ago
parent dea70e1d5f
commit 3bf6e88202

@ -11,7 +11,7 @@ const { site, theme } = useData()
<template> <template>
<VPFlyout class="VPNavBarExtra" label="extra navigation"> <VPFlyout class="VPNavBarExtra" label="extra navigation">
<div v-if="theme.localeLinks" class="group"> <div v-if="theme.localeLinks" class="group">
<p class="trans-title">{{ theme.localeLinks.text }}</p> <p v-if="theme.localeLinks.text" class="trans-title">{{ theme.localeLinks.text }}</p>
<template v-for="locale in theme.localeLinks.items" :key="locale.link"> <template v-for="locale in theme.localeLinks.items" :key="locale.link">
<VPMenuLink :item="locale" /> <VPMenuLink :item="locale" />

@ -14,7 +14,7 @@ const { theme } = useData()
:icon="VPIconLanguages" :icon="VPIconLanguages"
> >
<div class="items"> <div class="items">
<p class="title">{{ theme.localeLinks.text }}</p> <p v-if="theme.localeLinks.text" class="title">{{ theme.localeLinks.text }}</p>
<template v-for="locale in theme.localeLinks.items" :key="locale.link"> <template v-for="locale in theme.localeLinks.items" :key="locale.link">
<VPMenuLink :item="locale" /> <VPMenuLink :item="locale" />

@ -17,7 +17,7 @@ function toggle() {
<div v-if="theme.localeLinks" class="VPNavScreenTranslations" :class="{ open: isOpen }"> <div v-if="theme.localeLinks" class="VPNavScreenTranslations" :class="{ open: isOpen }">
<button class="title" @click="toggle"> <button class="title" @click="toggle">
<VPIconLanguages class="icon lang" /> <VPIconLanguages class="icon lang" />
{{ theme.localeLinks.text }} {{ theme.localeLinks?.text }}
<VPIconChevronDown class="icon chevron" /> <VPIconChevronDown class="icon chevron" />
</button> </button>

Loading…
Cancel
Save