-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathapp.vue
66 lines (58 loc) · 1.3 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
59
60
61
62
63
64
65
66
<template>
<div>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</div>
</template>
<script setup lang="ts">
import { storeToRefs } from "pinia";
import { useRuntimeConfig } from "#app";
import { useHead, useI18n, useLocaleHead, watch } from "#imports";
import { useShowDataStore } from "~~/store/showDataStore";
const showDataStore = useShowDataStore();
const { initShowData } = showDataStore;
const { showName } = storeToRefs(showDataStore);
await initShowData();
const { t } = useI18n();
const config = useRuntimeConfig();
const i18nHead = useLocaleHead({
addDirAttribute: true,
addSeoAttributes: true,
});
watch(
showName,
(show) => {
useHead({
htmlAttrs: {
lang: i18nHead.value.htmlAttrs!.lang,
},
link: [...(i18nHead.value.link || [])],
meta: [
{
name: "description",
content: t("head.description", { show }),
},
...(i18nHead.value.meta || []),
],
title: t("head.title", {
instance: config.public.instanceName,
show,
}),
});
},
{ immediate: true },
);
</script>
<style>
html,
body,
body > div,
#__nuxt > div {
height: 100%;
width: 100%;
margin: 0;
font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
background-color: black;
}
</style>