forked from mxx1111/mdlook
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppSplash.vue
More file actions
114 lines (100 loc) · 1.97 KB
/
Copy pathAppSplash.vue
File metadata and controls
114 lines (100 loc) · 1.97 KB
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
<script setup lang="ts">
import logo from '@/assets/images/favicon.png'
const loading = ref(true)
onMounted(() => {
setTimeout(() => {
loading.value = false
}, 100)
})
</script>
<template>
<transition name="fade">
<div
v-if="loading"
class="loading"
>
<img
class="loading__icon"
:src="logo"
alt="mdlook"
>
<strong class="loading__brand">mdlook</strong>
<span class="loading__desc">看 Markdown,发公众号</span>
<span class="loading__bar" />
</div>
</transition>
</template>
<style lang="less" scoped>
.loading {
position: fixed;
top: 0;
left: 0;
z-index: 99999;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 10px;
width: 100vw;
height: 100vh;
color: hsl(var(--foreground));
background: radial-gradient(circle at 50% 42%, rgb(221 116 82 / 10%), transparent 30%), hsl(var(--background));
&__icon {
width: 84px;
height: 84px;
border-radius: 20px;
box-shadow: 0 18px 40px rgb(60 40 30 / 12%);
}
&__brand {
margin-top: 8px;
font-size: 20px;
line-height: 1.2;
font-weight: 700;
}
&__desc {
color: hsl(var(--muted-foreground));
font-size: 13px;
line-height: 1.4;
}
&__bar {
position: relative;
width: 96px;
height: 3px;
margin-top: 10px;
overflow: hidden;
border-radius: 999px;
background: rgb(221 116 82 / 16%);
&::after {
content: '';
position: absolute;
top: 0;
left: -40%;
width: 40%;
height: 100%;
border-radius: inherit;
background: #dd7452;
animation: loading-bar 1.2s ease-in-out infinite;
}
}
}
.fade-enter,
.fade-leave-to {
opacity: 0;
}
.fade-enter-to,
.fade-leave {
opacity: 1;
}
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.35s ease;
}
@keyframes loading-bar {
0% {
transform: translateX(0);
}
100% {
transform: translateX(350%);
}
}
</style>