Skip to content

Commit 8c9c3f4

Browse files
Added Day 99
1 parent fb42613 commit 8c9c3f4

File tree

1 file changed

+99
-0
lines changed

1 file changed

+99
-0
lines changed

public/99/index.html

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<link rel="icon" href="/assets/icon.png" />
7+
<title>Day 99/100</title>
8+
</head>
9+
<body>
10+
<main>
11+
<div class="progressBar" id="progressBar"></div>
12+
<div class="progress-text" id="progress-text">0%</div>
13+
</main>
14+
15+
<style>
16+
@font-face {
17+
font-family: "SpaceMono";
18+
src: url("/assets/SpaceMono-Bold.woff2") format("woff2");
19+
font-weight: 700;
20+
}
21+
22+
body {
23+
margin: 0;
24+
overflow: hidden;
25+
display: flex;
26+
justify-content: center;
27+
align-items: center;
28+
width: 100vw;
29+
height: 100vh;
30+
background-color: #fff;
31+
}
32+
33+
main {
34+
width: 100vw;
35+
height: 100vh;
36+
display: flex;
37+
flex-direction: column;
38+
align-items: center;
39+
justify-content: center;
40+
}
41+
42+
.progressBar {
43+
width: calc(100% - 40px);
44+
height: 32px;
45+
padding: 20px;
46+
display: flex;
47+
justify-content: center;
48+
align-items: center;
49+
gap: 5px;
50+
}
51+
52+
.progressBarItem {
53+
width: 8px;
54+
height: 8px;
55+
border-radius: 8px;
56+
background-color: #000;
57+
opacity: 0.2;
58+
transition: height 0.5s ease-in-out, opacity 0.5s ease-in-out;
59+
}
60+
61+
.progressBarItem-active {
62+
height: 100%;
63+
opacity: 1;
64+
}
65+
66+
.progress-text {
67+
color: #000;
68+
font-size: 24px;
69+
font-family: "SpaceMono", monospace;
70+
font-weight: 700;
71+
}
72+
</style>
73+
74+
<script>
75+
const progressBar = document.getElementById("progressBar");
76+
for (let i = 0; i < 20; i++) {
77+
const progressBarItem = document.createElement("div");
78+
progressBarItem.classList.add("progressBarItem");
79+
progressBarItem.id = `progressBarItem-${i + 1}`;
80+
progressBar.appendChild(progressBarItem);
81+
}
82+
83+
var progress = 0;
84+
let interval = setInterval(() => {
85+
progress++;
86+
document
87+
.getElementById(`progressBarItem-${progress}`)
88+
.classList.add("progressBarItem-active");
89+
document.getElementById("progress-text").textContent = `${
90+
progress * 5
91+
}%`;
92+
if (progress >= 20) {
93+
progress = 0;
94+
clearInterval(interval);
95+
}
96+
}, 400);
97+
</script>
98+
</body>
99+
</html>

0 commit comments

Comments
 (0)