-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
140 lines (129 loc) · 3.05 KB
/
index.html
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
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/src/favicon.png" sizes="16x16" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CRTOON</title>
<style>
#loader {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 2001;
}
#secondary-bg {
background-color: var(--color-primary);
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
}
#primary-bg {
background-color: #000;
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
}
#loader-content {
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
flex-direction: column;
}
#loader-content h1 {
display: inline-flex;
overflow: hidden;
font-size: 2.5rem;
}
#loader-content h1 .word {
margin: 0 0.5rem;
overflow: hidden;
display: inline-flex;
gap: 0.075em;
}
.letter {
opacity: 0;
}
.progress {
position: absolute;
top: 0;
left: 0;
right: 0;
background-color: var(--color-primary);
height: 0.2rem;
width: 0;
animation: progress ease-in-out 2s forwards;
}
@keyframes progress {
0% {
width: 0;
opacity: 0;
}
15% {
width: 15%;
opacity: 1;
}
100% {
width: 100%;
}
}
</style>
</head>
<body>
<div id="loader">
<div id="secondary-bg"></div>
<div id="primary-bg">
<div id="loader-content">
<div class="progress"></div>
<h1 class="loader-header">
<div class="word">
<span class="letter">T</span>
<span class="letter">H</span>
<span class="letter">E </span>
</div>
<div class="word">
<span class="letter">C</span>
<span class="letter">R</span>
<span class="letter">T</span>
<span class="letter">O</span>
<span class="letter">O</span>
<span class="letter">N</span>
</div>
</h1>
</div>
</div>
</div>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
<script type="module">
import gsap, { Power3 } from "gsap";
const tl = gsap.timeline();
gsap.to(".letter", {
opacity: 1,
duration: 0,
});
tl.from(".letter", {
y: "100%",
skewY: 20,
opacity: 0,
stagger: 0.025,
delay: 0.4,
duration: 0.75,
ease: Power3.easeInOut,
}).to("#loading-text", {
opacity: 1,
});
</script>
</body>
</html>