-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathindex.html
97 lines (82 loc) · 2.46 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Loading...</title>
<link rel="stylesheet" href="style.css">
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f0f0f0;
font-family: Arial, sans-serif;
color: #333;
flex-direction: column;
gap: 10;
}
.loader-container {
text-align: center;
}
.loader {
border: 10px solid #e0e0e0;
border-top: 10px solid #3498db;
border-radius: 50%;
width: 80px;
height: 80px;
animation: spin 1s linear infinite;
margin: 10px auto;
}
#percentage {
font-size: 24px;
margin-top: 10px;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.logo-container {
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
}
</style>
</head>
<body>
<div class="loader-container">
<div class="loader"></div>
<p id="percentage">0%</p>
</div>
<div class="logo-container">
<div class="flex-item-left"><img src="./assets/logo.png" width="50px" height="50px"></div>
<div class="flex-item-right logo">
<h3>Dev-Mint</h3>
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", () => {
let percentage = 0;
let percentageDisplay = document.getElementById("percentage");
// Update percentage every 30ms until it reaches 100%
let interval = setInterval(() => {
if (percentage < 100) {
percentage += 1;
percentageDisplay.textContent = percentage + "%";
} else {
clearInterval(interval); // Stop when 100% is reached
sessionStorage.setItem("pageLoaded", "true"); // Set loading flag
window.location.href = "main.html"; // Redirect to main page
}
}, 30);
});
</script>
</body>
</html>