forked from Divij-Agarwal-42/duckmath.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloading.html
More file actions
229 lines (203 loc) · 5.83 KB
/
loading.html
File metadata and controls
229 lines (203 loc) · 5.83 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
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<!DOCTYPE html>
<html lang="en">
<head>
<!-- <link rel="dns-prefetch" href="https://universal.wgplayer.com" />
<script src="/assets/js/add.js"></script> -->
<meta charset="UTF-8" />
<meta
property="og:image"
content="https://duckmath.org/assets/img/duck.webp"
/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="title" content="DuckMath" />
<meta
name="description"
content="learn and have fun with this interactive experience"
/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="English" />
<title>Loading — DuckMath</title>
<link rel="icon" type="image/x-icon" href="../assets/img/duck.webp" />
<link rel="mask-icon" type="" href="../assets/img/duck.webp" color="#111" />
<noscript
>Your browser doesn't have JavaScript enabled. Please enable JavaScript or
switch to a browser that supports it.</noscript
>
<style>
/* Loading Page Styles */
.loading-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(135deg, #6e8efb, #a777e3);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 9999;
transition: opacity 0.5s ease-out;
}
.duck-loader {
width: 100px;
height: 100px;
position: relative;
margin-bottom: 30px;
}
.duck-body {
width: 80px;
height: 60px;
background-color: #ffd700;
border-radius: 50% 50% 40% 40%;
position: absolute;
top: 20px;
left: 10px;
}
.duck-head {
width: 50px;
height: 50px;
background-color: #ffd700;
border-radius: 50%;
position: absolute;
top: 0;
left: 40px;
}
.duck-beak {
width: 20px;
height: 10px;
background-color: #ffa500;
border-radius: 50%;
position: absolute;
top: 25px;
left: 80px;
transform: rotate(15deg);
}
.duck-eye {
width: 8px;
height: 8px;
background-color: #000;
border-radius: 50%;
position: absolute;
top: 15px;
left: 65px;
}
.loading-text {
color: white;
font-family: Arial, sans-serif;
font-size: 24px;
margin-top: 20px;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.progress-bar {
width: 200px;
height: 8px;
background-color: rgba(255, 255, 255, 0.3);
border-radius: 4px;
margin-top: 20px;
overflow: hidden;
}
.progress {
height: 100%;
width: 0%;
background-color: white;
border-radius: 4px;
animation: load 3s ease-in-out infinite;
}
@keyframes load {
0% {
width: 0%;
}
50% {
width: 100%;
}
100% {
width: 0%;
}
}
.bubbles {
position: absolute;
width: 100%;
height: 100%;
pointer-events: none;
}
.bubble {
position: absolute;
background-color: rgba(255, 255, 255, 0.2);
border-radius: 50%;
animation: float linear infinite;
}
@keyframes float {
to {
transform: translateY(-100vh);
opacity: 0;
}
}
.hidden {
opacity: 0;
pointer-events: none;
}
</style>
</head>
<body>
<!-- Loading Screen -->
<div class="loading-container" id="loadingScreen">
<div class="bubbles" id="bubbles"></div>
<div class="duck-loader">
<div class="duck-body"></div>
<div class="duck-head"></div>
<div class="duck-beak"></div>
<div class="duck-eye"></div>
</div>
<div class="loading-text">Quacking up the fun...</div>
<div class="progress-bar">
<div class="progress"></div>
</div>
</div>
<!-- Your main content would go here -->
<div id="mainContent" style="display: none">
<!-- where auto would go -->
</div>
<script>
// Create bubbles
function createBubbles() {
const bubblesContainer = document.getElementById("bubbles");
const bubbleCount = 20;
for (let i = 0; i < bubbleCount; i++) {
const bubble = document.createElement("div");
bubble.classList.add("bubble");
// Random size between 5 and 20px
const size = Math.random() * 15 + 5;
bubble.style.width = `${size}px`;
bubble.style.height = `${size}px`;
// Random position
bubble.style.left = `${Math.random() * 100}%`;
bubble.style.bottom = `-${size}px`;
// Random animation duration between 5 and 15s
const duration = Math.random() * 10 + 5;
bubble.style.animationDuration = `${duration}s`;
// Random delay
bubble.style.animationDelay = `${Math.random() * 5}s`;
bubblesContainer.appendChild(bubble);
}
}
// Simulate loading completion
function simulateLoad() {
setTimeout(() => {
document.getElementById("loadingScreen").classList.add("hidden");
document.getElementById("mainContent").style.display = "block";
// Remove loading screen after fade out
setTimeout(() => {
document.getElementById("loadingScreen").style.display = "none";
}, 500);
}, 6000); // 4 seconds loading time
}
// Initialize
window.addEventListener("DOMContentLoaded", () => {
createBubbles();
simulateLoad();
});
</script>
</body>
</html>