-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
37 lines (32 loc) · 1.11 KB
/
index.js
File metadata and controls
37 lines (32 loc) · 1.11 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
// <!--W_---------------{ Create Date : 28/02/2026 }---------------_-->
// <!--W_---------------{ Last Update : 28/02/2026 }---------------_-->
const container = document.getElementById("days");
const currentDay = 2;
for (let i = 1; i <= 28; i++) {
const isDisabled = i > currentDay;
const day = String(i).padStart(2, "0");
const div = document.createElement("div");
div.innerHTML = `
<a href="${isDisabled ? "#" : `./src/day${day}/index.html`}"
class="
flex items-center justify-center gap-2
p-4 rounded-xl border
font-semibold text-sm
transition-all duration-300
${
isDisabled
? "opacity-40 cursor-not-allowed pointer-events-none text-gray-400 bg-gray-100"
: "hover:text-sky-600 hover:bg-sky-50 hover:shadow-md"
}
">
<i class="fa-solid fa-folder"></i>
Day ${day}
</a>
`;
container.appendChild(div);
}
function copyCode() {
const code = document.getElementById("solutionCode").innerText;
navigator.clipboard.writeText(code);
alert("Code Copied ✅");
}