-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.vue
60 lines (55 loc) · 1.25 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
<template>
<div id="app" lang="en" class="bg-mono-950 text-mono-50">
<DynamicHeading />
<NuxtPage
:transition="{
onAfterEnter: () => {
store.setTransitioning(false)
},
}"
/>
<TouchActions />
</div>
<Loading v-if="loaderMounted" :class="{ 'opacity-0': !isLoading }" />
<div
data-info="transition-background"
class="absolute bottom-0 -z-[990] h-full w-full bg-mono-950"
/>
<div
data-info="static-background"
class="background-gradient-split fixed bottom-0 left-0 right-0 z-bottom h-full w-full"
/>
<CSSImplementationCheck />
</template>
<script lang="ts" setup>
const store = useGlobalStore()
const loaderMounted = ref(true)
const isLoading = ref(true)
const content = await queryContent(useRoute().fullPath).findOne()
onMounted(() => {
store.setTransitioning(false)
store.updateActiveSegment({
buttons: content.segments[0].buttons ?? [],
})
setTimeout(() => {
isLoading.value = false
}, 300)
setTimeout(() => {
loaderMounted.value = false
}, 1000)
})
</script>
<style lang="css">
.background-gradient-split {
background: linear-gradient(rgb(13 13 13) 50%, rgb(26 26 26) 50%);
}
.fade-enter-active,
.fade-leave-active {
opacity: 1;
transition: all 0.3s;
}
.fade-enter-from,
.fade-leave-to {
opacity: 0;
}
</style>