diff --git a/app/layouts/default.vue b/app/layouts/default.vue index 58584b1..ca62dad 100644 --- a/app/layouts/default.vue +++ b/app/layouts/default.vue @@ -4,9 +4,9 @@ class="navbar bg-transparent shadow-lg fixed top-0 left-0 right-0 backdrop-blur-2xl z-1000 h-[64px]" >
- + - + {{ t("layout.default.footer.solarNetwork") }} - {{ + {{ t("layout.default.footer.catalog") - }} + }}
@@ -124,7 +124,7 @@ const localeDropdownOptions = computed(() => { }); const handleLocaleSelect = (key: string) => { - router.push(switchLocalePath(key)); + router.push(switchLocalePath(key as any)); }; const route = useRoute(); @@ -146,7 +146,9 @@ function renderIcon(icon: any) { } function renderLabel(label: string, route: string) { - return () => h(RouterLink, { to: route }, { default: () => label }); + const localePrefix = locale.value == "en" ? "" : `/${locale.value}`; + return () => + h(RouterLink, { to: localePrefix + route }, { default: () => label }); } function renderExternalLabel(label: string, url: string) { @@ -159,7 +161,8 @@ const menuOptions = computed(() => { recentProducts.value?.map((product: any) => { const id = product.stem.split("/").pop(); const hasPage = product.hasPage; - const url = hasPage ? `/products/${id}` : product.url; + const localePrefix = locale.value == "en" ? "" : `/${locale.value}`; + const url = hasPage ? `${localePrefix}/products/${id}` : product.url; return { label: hasPage diff --git a/app/pages/index.vue b/app/pages/index.vue index 85e3b3b..adf0d11 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -11,10 +11,11 @@

- {{ t('page.index.hero.we') }} + {{ t("page.index.hero.we") }} +

- {{ t('page.index.hero.subtitle') }} + {{ t("page.index.hero.subtitle") }}

- {{ t('page.index.hero.explore') }} + {{ t("page.index.hero.explore") }} - {{ t('page.index.hero.about') }} + {{ t("page.index.hero.about") }} @@ -44,9 +45,11 @@
-

{{ t('page.index.creations.title') }}

+

+ {{ t("page.index.creations.title") }} +

- {{ t('page.index.creations.subtitle') }} + {{ t("page.index.creations.subtitle") }}

@@ -91,14 +94,14 @@ > - - +
@@ -132,12 +135,14 @@ class="flex flex-col md:flex-row items-center gap-12 relative z-10 p-8" >
-

{{ t('page.index.about.title') }}

+

+ {{ t("page.index.about.title") }} +

- {{ t('page.index.about.subtitle') }} + {{ t("page.index.about.subtitle") }}

- {{ t('page.index.about.readStory') }} + {{ t("page.index.about.readStory") }} @@ -185,7 +190,7 @@ const typedElement = ref(null); const typed = shallowRef(null); useHead({ - title: t('page.index.title'), + title: t("page.index.title"), titleTemplate: "%s", }); diff --git a/app/pages/products/index.vue b/app/pages/products/index.vue index 6350c51..0706e75 100644 --- a/app/pages/products/index.vue +++ b/app/pages/products/index.vue @@ -2,7 +2,7 @@

Our Products

- - queryCollection("products").all() + queryCollection("products").all(), ); useHead({