Skip to content

Commit e014455

Browse files
Added Days 71 and 72
1 parent 7da55da commit e014455

File tree

5 files changed

+3444
-0
lines changed

5 files changed

+3444
-0
lines changed

public/71/index.html

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
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+
<script src="/lib/figlet.js"></script>
8+
<title>Day 71/100</title>
9+
</head>
10+
<body>
11+
<main>
12+
<div id="ascii-art">
13+
<div class="ascii-line" id="ascii-line-1"></div>
14+
<div class="ascii-line" id="ascii-line-2"></div>
15+
<div class="ascii-line" id="ascii-line-3"></div>
16+
<div class="ascii-line" id="ascii-line-4"></div>
17+
<div class="ascii-line" id="ascii-line-5"></div>
18+
<div class="ascii-line" id="ascii-line-6"></div>
19+
<div class="ascii-line" id="ascii-line-7"></div>
20+
</div>
21+
</main>
22+
23+
<style>
24+
@font-face {
25+
font-family: "SFMono";
26+
src: url("/assets/SFMono-Bold.woff2") format("woff2");
27+
font-weight: 700;
28+
}
29+
30+
@font-face {
31+
font-family: "SFMono";
32+
src: url("/assets/SFMono-Medium.woff2") format("woff2");
33+
font-weight: 500;
34+
}
35+
36+
@font-face {
37+
font-family: "SFMono";
38+
src: url("/assets/SFMono-Regular.woff2") format("woff2");
39+
font-weight: 400;
40+
}
41+
42+
body {
43+
background-color: #000;
44+
overflow: hidden;
45+
display: flex;
46+
justify-content: center;
47+
align-items: center;
48+
min-height: 100vh;
49+
margin: 0;
50+
}
51+
52+
#ascii-art {
53+
text-align: center;
54+
}
55+
56+
.ascii-line {
57+
font-size: min(1.2vw, 16px);
58+
line-height: 1.2;
59+
font-family: "SFMono", monospace;
60+
font-weight: 700;
61+
white-space: pre;
62+
margin: 0;
63+
padding: 0;
64+
color: #fff;
65+
}
66+
</style>
67+
68+
<script>
69+
figlet.defaults({ fontPath: "/assets/" });
70+
71+
function updateASCIITime(time) {
72+
figlet.text(
73+
time,
74+
{
75+
font: "marquee",
76+
},
77+
function (err, data) {
78+
if (err) {
79+
console.error(err);
80+
} else {
81+
const lines = data.split("\n");
82+
document.getElementById("ascii-line-1").textContent = lines[0];
83+
document.getElementById("ascii-line-2").textContent = lines[1];
84+
document.getElementById("ascii-line-3").textContent = lines[2];
85+
document.getElementById("ascii-line-4").textContent = lines[3];
86+
document.getElementById("ascii-line-5").textContent = lines[4];
87+
document.getElementById("ascii-line-6").textContent = lines[5];
88+
document.getElementById("ascii-line-7").textContent = lines[6];
89+
}
90+
}
91+
);
92+
}
93+
94+
function updateClock() {
95+
const now = new Date();
96+
let milliseconds = now.getMilliseconds();
97+
let seconds = now.getSeconds();
98+
let minutes = now.getMinutes();
99+
let hours = now.getHours();
100+
101+
if (hours > 12) {
102+
hours -= 12;
103+
}
104+
105+
const time = `${hours.toString().padStart(2, "0")}:${minutes
106+
.toString()
107+
.padStart(2, "0")}:${seconds.toString().padStart(2, "0")}`;
108+
updateASCIITime(time);
109+
110+
const millisecondsToNextSecond = 1000 - now.getMilliseconds();
111+
setTimeout(updateClock, millisecondsToNextSecond);
112+
}
113+
114+
updateClock();
115+
</script>
116+
</body>
117+
</html>

public/72/index.html

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
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+
<script src="/lib/figlet.js"></script>
8+
<title>Day 72/100</title>
9+
</head>
10+
<body>
11+
<main>
12+
<div id="ascii-art">
13+
<div class="ascii-line" id="ascii-line-1"></div>
14+
<div class="ascii-line" id="ascii-line-2"></div>
15+
<div class="ascii-line" id="ascii-line-3"></div>
16+
<div class="ascii-line" id="ascii-line-4"></div>
17+
<div class="ascii-line" id="ascii-line-5"></div>
18+
<div class="ascii-line" id="ascii-line-6"></div>
19+
<div class="ascii-line" id="ascii-line-7"></div>
20+
<div class="ascii-line" id="ascii-line-8"></div>
21+
<div class="ascii-line" id="ascii-line-9"></div>
22+
<div class="ascii-line" id="ascii-line-10"></div>
23+
</div>
24+
</main>
25+
26+
<style>
27+
@font-face {
28+
font-family: "SFMono";
29+
src: url("/assets/SFMono-Bold.woff2") format("woff2");
30+
font-weight: 700;
31+
}
32+
33+
@font-face {
34+
font-family: "SFMono";
35+
src: url("/assets/SFMono-Medium.woff2") format("woff2");
36+
font-weight: 500;
37+
}
38+
39+
@font-face {
40+
font-family: "SFMono";
41+
src: url("/assets/SFMono-Regular.woff2") format("woff2");
42+
font-weight: 400;
43+
}
44+
45+
body {
46+
background-color: #000;
47+
overflow: hidden;
48+
display: flex;
49+
justify-content: center;
50+
align-items: center;
51+
min-height: 100vh;
52+
margin: 0;
53+
}
54+
55+
#ascii-art {
56+
text-align: center;
57+
}
58+
59+
.ascii-line {
60+
font-size: min(1.2vw, 16px);
61+
line-height: 1.2;
62+
font-family: "SFMono", monospace;
63+
font-weight: 700;
64+
white-space: pre;
65+
margin: 0;
66+
padding: 0;
67+
color: #fff;
68+
}
69+
</style>
70+
71+
<script>
72+
figlet.defaults({ fontPath: "/assets/" });
73+
74+
function updateASCIITime(time) {
75+
figlet.text(
76+
time,
77+
{
78+
font: "poison",
79+
},
80+
function (err, data) {
81+
if (err) {
82+
console.error(err);
83+
} else {
84+
const lines = data.split("\n");
85+
document.getElementById("ascii-line-1").textContent = lines[0];
86+
document.getElementById("ascii-line-2").textContent = lines[1];
87+
document.getElementById("ascii-line-3").textContent = lines[2];
88+
document.getElementById("ascii-line-4").textContent = lines[3];
89+
document.getElementById("ascii-line-5").textContent = lines[4];
90+
document.getElementById("ascii-line-6").textContent = lines[5];
91+
document.getElementById("ascii-line-7").textContent = lines[6];
92+
document.getElementById("ascii-line-8").textContent = lines[7];
93+
document.getElementById("ascii-line-9").textContent = lines[8];
94+
document.getElementById("ascii-line-10").textContent = lines[9];
95+
}
96+
}
97+
);
98+
}
99+
100+
function updateClock() {
101+
const now = new Date();
102+
let milliseconds = now.getMilliseconds();
103+
let seconds = now.getSeconds();
104+
let minutes = now.getMinutes();
105+
let hours = now.getHours();
106+
107+
if (hours > 12) {
108+
hours -= 12;
109+
}
110+
111+
const time = `${hours.toString().padStart(2, "0")}:${minutes
112+
.toString()
113+
.padStart(2, "0")}:${seconds.toString().padStart(2, "0")}`;
114+
updateASCIITime(time);
115+
116+
const millisecondsToNextSecond = 1000 - now.getMilliseconds();
117+
setTimeout(updateClock, millisecondsToNextSecond);
118+
}
119+
120+
updateClock();
121+
</script>
122+
</body>
123+
</html>

0 commit comments

Comments
 (0)