-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.vue
44 lines (40 loc) · 803 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
<template>
<NuxtLayout :class="theme">
<NuxtPage />
<Toaster />
</NuxtLayout>
</template>
<script setup lang="ts">
import { Toaster } from '@/components/ui/sonner'
import { useAppStateStore } from './stores/app-state'
const app = useAppStateStore()
const { updateActivePage } = app
const { theme } = storeToRefs(app)
const route = useRoute()
onMounted(() => {
updateActivePage(route.name)
})
watch(
() => route.name,
() => updateActivePage(route.name),
)
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500&display=swap');
body {
font-family: 'Ubuntu', sans-serif;
}
.page-enter-active,
.page-leave-active {
transition: all 0.4s;
}
.page-enter-from,
.page-leave-to {
opacity: 0;
}
*,
*::before,
*::after {
box-sizing: content-box;
}
</style>