refactor: split up navigation components for easier i18n
This commit is contained in:
parent
9536a6fa77
commit
7fe9cdeef3
3 changed files with 97 additions and 78 deletions
11
src/App.vue
11
src/App.vue
|
@ -3,10 +3,19 @@ import { RouterView } from "vue-router";
|
|||
import SiteNavigation from "@/components/SiteNavigation.vue";
|
||||
import SiteFooter from "@/components/SiteFooter.vue";
|
||||
import { version } from "../package.json";
|
||||
import NavigationItem from "@/components/NavigationItem.vue";
|
||||
import router from "@/router";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<SiteNavigation />
|
||||
<SiteNavigation>
|
||||
<NavigationItem
|
||||
v-for="(route, idx) in router.options.routes"
|
||||
:key="idx"
|
||||
:icon="route.meta?.icon"
|
||||
:href="route.path"
|
||||
>{{ $t(`${route.meta?.title}`) }}</NavigationItem>
|
||||
</SiteNavigation>
|
||||
|
||||
<main>
|
||||
<RouterView />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue