Skip to content

Commit f610fc2

Browse files
Added Day 52
1 parent 974778c commit f610fc2

1 file changed

Lines changed: 76 additions & 0 deletions

File tree

public/52/index.html

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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 52/100</title>
8+
</head>
9+
<body>
10+
<main>
11+
<div class="loading" id="loading"></div>
12+
</main>
13+
14+
<style>
15+
body {
16+
margin: 0;
17+
overflow: hidden;
18+
display: flex;
19+
justify-content: center;
20+
align-items: center;
21+
-webkit-tap-highlight-color: transparent;
22+
width: 100vw;
23+
height: 100vh;
24+
background-color: #000;
25+
}
26+
27+
.loading {
28+
position: relative;
29+
display: flex;
30+
align-items: flex-end;
31+
height: 10vh;
32+
gap: 20px;
33+
}
34+
35+
.dot {
36+
width: 10px;
37+
height: 10px;
38+
background-color: #fff;
39+
border-radius: 100%;
40+
41+
transition: all 0.5s ease-in-out;
42+
}
43+
44+
.dot-top {
45+
transform: translateY(calc(100% - 10vh));
46+
}
47+
</style>
48+
49+
<script>
50+
let loading = document.getElementById("loading");
51+
52+
for (let i = 0; i < 10; i++) {
53+
let dot = document.createElement("div");
54+
dot.classList.add("dot");
55+
dot.id = `dot-${i}`;
56+
loading.appendChild(dot);
57+
}
58+
59+
let i = 0;
60+
let adding = true;
61+
62+
setInterval(() => {
63+
if (adding) {
64+
document.getElementById(`dot-${i}`).classList.add("dot-top");
65+
} else {
66+
document.getElementById(`dot-${i}`).classList.remove("dot-top");
67+
}
68+
i++;
69+
if (i > 9) {
70+
i = 0;
71+
adding = !adding;
72+
}
73+
}, 250);
74+
</script>
75+
</body>
76+
</html>

0 commit comments

Comments
 (0)