-
Notifications
You must be signed in to change notification settings - Fork 2
/
app.vue
58 lines (52 loc) · 1.47 KB
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<template>
<div id="top" class="flex justify-center">
<div class="mx-2 md:w-4/5">
<ClientOnly>
<LanguageSelector />
<div class="text-center">
<header class="mt-1 mb-2">
<h1 class="cursor-pointer" @click="toIndex">
WBSC Scoring <span class="text-red-500">Creator</span>
</h1>
</header>
<div class="text-left sm:text-justify mb-16">
<NuxtPage />
</div>
<footer class="fixed bottom-0 left-0 w-full p-1 bg-wbsc-blue text-black text-xs">
{{ $t('footer.creator') }}
<NuxtLink to="http://alois-seckar.cz" class="text-white hover:text-yellow-300">
Alois Sečkár
</NuxtLink>
(2019-{{ new Date().getFullYear() }})
{{ $t('footer.version') }}
<strong>{{ useAppConfig().fullVersion }}</strong>
</footer>
</div>
</ClientOnly>
</div>
</div>
</template>
<script setup lang="ts">
initConsola()
const { locale } = useI18n()
const storedLocale = useLocalStorage('wbsc-lang', 'en')
if (storedLocale.value && typeof storedLocale.value === 'string') {
locale.value = storedLocale.value
}
useHead({
htmlAttrs: {
lang: locale.value,
},
})
const title = ref(getPageTitle(useRoute().path))
usePageMeta({
...WBSC_PAGE_META,
title,
})
useRouter().beforeEach((to) => {
title.value = getPageTitle(to.path)
})
function toIndex() {
return navigateTo('/')
}
</script>