diff --git a/__tests__/e2e/.vitepress/config.ts b/__tests__/e2e/.vitepress/config.ts index 65f845ab364d..3989835956db 100644 --- a/__tests__/e2e/.vitepress/config.ts +++ b/__tests__/e2e/.vitepress/config.ts @@ -159,6 +159,36 @@ export default defineConfig({ lazyLoading: true } }, + locales: { + root: { + label: 'English', + link: 'https://vitepress.dev', + repository: { + link: 'https://github.com/vuejs/vitepress', + title: 'English Repository' + } + }, + es: { + label: 'Español', + link: 'https://vitepress.dev/es/', + repository: { + // for testing purposes + link: 'https://github.com/vuejs/core', + icon: 'gitlab', + title: 'Repositorio en Español' + } + }, + zh: { + label: '简体中文', + link: 'https://vitepress.dev/zh/', + repository: { + // for testing purposes + link: 'https://github.com/vitejs/vite', + icon: 'bitbucket', + title: '中文存储库' + } + } + }, themeConfig: { nav, sidebar, diff --git a/src/client/theme-default/components/VPNavBarTranslations.vue b/src/client/theme-default/components/VPNavBarTranslations.vue index a92aad8c9a46..4d997ee15b2a 100644 --- a/src/client/theme-default/components/VPNavBarTranslations.vue +++ b/src/client/theme-default/components/VPNavBarTranslations.vue @@ -3,6 +3,7 @@ import VPFlyout from './VPFlyout.vue' import VPMenuLink from './VPMenuLink.vue' import { useData } from '../composables/data' import { useLangs } from '../composables/langs' +import VPSocialLink from "./VPSocialLink.vue"; const { theme } = useData() const { localeLinks, currentLang } = useLangs({ correspondingLink: true }) @@ -16,10 +17,28 @@ const { localeLinks, currentLang } = useLangs({ correspondingLink: true }) :label="theme.langMenuLabel || 'Change language'" >
-

{{ currentLang.label }}

+
+ +
+

{{ currentLang.label }}

@@ -30,6 +49,12 @@ const { localeLinks, currentLang } = useLangs({ correspondingLink: true }) display: none; } +.menu-item { + display: flex; + align-items: center; + justify-content: space-between; +} + @media (min-width: 1280px) { .VPNavBarTranslations { display: flex; diff --git a/src/client/theme-default/components/VPNavScreenTranslations.vue b/src/client/theme-default/components/VPNavScreenTranslations.vue index a67ffa96f68e..79dedc01095a 100644 --- a/src/client/theme-default/components/VPNavScreenTranslations.vue +++ b/src/client/theme-default/components/VPNavScreenTranslations.vue @@ -1,10 +1,12 @@