-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.vue
127 lines (115 loc) · 2.9 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 lang="ts" setup>
import anime from "animejs";
import { useGlobalStore } from "~/stores/global";
const globalStore = useGlobalStore();
Promise.all([
globalStore.fetchEvents(),
globalStore.fetchCounts(),
globalStore.fetchUserEvents()
]);
const config = useAppConfig();
const themeColor = "#0F172A";
useHead({
title: config.TITLE,
meta: [
{
name: "description",
content: config.DESCRIPTION
},
{
name: "darkreader-lock"
},
{
name: "google-site-verification",
content: "Noj9u0V2hrMOox_Ft5pMKfOK51vlpCab714vr_xic-Q"
},
{
name: "theme-color",
content: themeColor
},
{
name: "msapplication-navbutton-color",
content: themeColor
},
{
name: "apple-mobile-web-app-status-bar-style",
content: themeColor
},
{
name: "darkreader-lock",
content: themeColor
}
],
link: [
{
rel: "icon",
type: "image/svg+xml",
href: "/favicon.svg"
}
],
htmlAttrs: {
lang: config.LANG
}
});
const animationFinished = ref(false);
onMounted(() => {
anime({
targets: "#title",
top: 10,
translateY: ["-50%", 0],
easing: "cubicBezier(0.3, 0.001, 0.2, 1)",
duration: 2000,
loop: false,
autoplay: true,
delay: 500,
complete() {
animationFinished.value = true;
}
});
});
</script>
<template>
<div>
<div id="background">
<div class="w-[108rem] flex-none flex justify-end">
<nuxt-img
alt="bg-effect"
format="webp"
class="w-[90rem] flex-none max-w-none"
decoding="async"
src="/bgdecdark.png"
/>
</div>
</div>
<div id="pageContent">
<h1
id="title"
class="glow-strong text-transparent top-[50%] mx-auto text-[10vmin] md:text-8xl relative top-50 translate-y-[-50%] mb-6"
>
{{ config.TITLE }}
</h1>
<TransitionScale easing="cubicBezier(0.3, 0.001, 0.2, 1)">
<div v-show="animationFinished">
<NuxtPage />
</div>
</TransitionScale>
</div>
</div>
</template>
<style lang="scss">
#background {
@apply fixed -z-50 top-0 flex justify-center overflow-hidden pointer-events-none w-screen h-screen bg-slate-900;
}
#pageContent {
@apply absolute w-screen h-screen text-slate-400 antialiased text-center overflow-x-hidden;
}
.page-enter-active,
.page-leave-active {
transition: all 0.4s;
}
.page-enter-from,
.page-leave-to {
opacity: 0;
filter: blur(1rem);
}
</style>