-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.vue
127 lines (117 loc) · 2.58 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<script setup lang="ts">
import { TransitionFade } from "@morev/vue-transitions";
const { setDefaultMode } = useMode();
const loading = ref<boolean>(true);
onMounted(() => {
loading.value = false;
});
const { t } = useI18n();
const title = computed<string>(
() => t("website.title") + " - " + t("website.subtitle")
);
const head = useLocaleHead({
addDirAttribute: true,
identifierAttribute: "id",
addSeoAttributes: true,
});
const runtimeConfig = useRuntimeConfig().public;
useHead({
meta: [
{
property: "og:title",
content: t("meta.title"),
},
{
property: "title",
content: t("meta.title"),
},
{
property: "twitter:title",
content: t("meta.title"),
},
{
property: "og:description",
content: t("meta.description"),
},
{
property: "description",
content: t("meta.description"),
},
{
property: "twitter:description",
content: t("meta.description"),
},
{
property: "keywords",
content: t("meta.keywords"),
},
{
property: "author",
content: t("meta.author"),
},
{
property: "distribution",
content: "global",
},
{
property: "robots",
content: "index,follow",
},
{
property: "revisit-after",
content: "7 days",
},
{
property: "og:image",
content: "/screenshot.png",
},
{
property: "twitter:image",
content: "/screenshot.png",
},
{
property: "og:image:url",
content: "/screenshot.png",
},
{
property: "og:image:alt",
content: "Website screenshot",
},
],
});
</script>
<template>
<Html :lang="head.htmlAttrs.lang" :dir="head.htmlAttrs.dir">
<SeoKit />
<Head>
<Title>{{ $t("website.title") }} - {{ $t("website.subtitle") }}</Title>
<template v-for="link in head.link" :key="link.id">
<Link
:id="link.id"
:rel="link.rel"
:href="link.href"
:hreflang="link.hreflang"
/>
<template v-for="meta in head.meta" :key="meta.id">
<Meta
:id="meta.id"
:property="meta.property"
:content="meta.content"
/>
</template>
</template>
</Head>
<Body>
<div class="min-h-screen dark:bg-slate-900 bg-sky-50">
<transition-fade>
<Loading v-if="loading" />
</transition-fade>
<client-only>
<NuxtLayout v-if="!loading">
<NuxtPage />
</NuxtLayout>
</client-only>
</div>
</Body>
</Html>
</template>