This repository has been archived by the owner on Dec 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.vue
62 lines (51 loc) · 1.52 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
<template>
<Html :lang="head.htmlAttrs!.lang" :dir="head.htmlAttrs!.dir">
<Head>
<Title>{{ title }}</Title>
<Meta name="description" content="" />
<Meta name="theme-color" :content="themeColor" />
<Meta name="msapplication-TileColor" :content="themeColor" />
<Link rel="mask-icon" href="/safari-pinned-tab.svg" :content="themeColor" />
<template v-for="link in head.link" :key="link.id">
<Link :id="link.id" :rel="link.rel" :href="link.href" :hreflang="link.hreflang" />
</template>
<template v-for="meta in head.meta" :key="meta.id">
<Meta :id="meta.id" :property="meta.property" :content="meta.content" />
</template>
</Head>
<Body>
<AppHeader />
<main class="grow">
<NuxtPage />
</main>
<AppFooter />
</Body>
</Html>
</template>
<script setup lang="ts">
const appConfig = useAppConfig();
const colorMode = useColorMode();
const route = useRoute();
const { t } = useI18n();
const head = useLocaleHead({
addDirAttribute: true,
identifierAttribute: 'id',
addSeoAttributes: true,
});
const title = computed(() =>
route.meta.title ? `${t(route.meta.title as string)} | ${appConfig.name}` : appConfig.name
);
const themeColor = computed<string>(() => {
return colorMode.value === 'light' ? '#1d4ed8' : '#334155';
});
</script>
<style lang="postcss">
.page-enter-active,
.page-leave-active {
@apply transition-all ease-in-out duration-500;
}
.page-enter-from,
.page-leave-to {
@apply opacity-0 blur-lg;
}
</style>