-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.vue
53 lines (44 loc) · 932 Bytes
/
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
<script setup lang="ts">
import { siteMetaData } from '~/data/meta'
const route = useRoute()
const initializing = ref(route.meta.name !== 'article-detail')
onMounted(() => initializing.value = false)
useHead({
htmlAttrs: {
lang: 'zh-Hans',
},
})
useSeoMeta(siteMetaData)
</script>
<template>
<transition name="page">
<HanaLoading v-if="initializing" />
</transition>
<div v-show="!initializing" class="bg-hana-blue-200/10 background-grid dark:bg-hana-black-900 dark:background-grid-dark">
<NuxtLoadingIndicator color="#6CB9D8" />
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</div>
</template>
<style>
.page-enter-active,
.page-leave-active {
transition: all 0.2s;
}
.page-enter-from,
.page-leave-to {
opacity: 0;
}
.layout-enter-active,
.layout-leave-active {
transition: all 0.2s;
}
.layout-enter-from,
.layout-leave-to {
opacity: 0;
}
html.dark{
color-scheme: dark;
}
</style>