Skip to content

Commit 46ab6ff

Browse files
Added Day 77-78
1 parent 6308476 commit 46ab6ff

File tree

11 files changed

+3186
-6
lines changed

11 files changed

+3186
-6
lines changed

public/71/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
}
5555

5656
.ascii-line {
57-
font-size: min(1.2vw, 16px);
57+
font-size: max(min(1.2vw, 16px), 6px);
5858
line-height: 1.2;
5959
font-family: "SFMono", monospace;
6060
font-weight: 700;

public/72/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
}
5858

5959
.ascii-line {
60-
font-size: min(1.2vw, 16px);
60+
font-size: max(min(1.2vw, 16px), 6px);
6161
line-height: 1.2;
6262
font-family: "SFMono", monospace;
6363
font-weight: 700;

public/73/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
}
5656

5757
.ascii-line {
58-
font-size: min(1.2vw, 16px);
58+
font-size: max(min(1.2vw, 16px), 6px);
5959
line-height: 1.2;
6060
font-family: "SFMono", monospace;
6161
font-weight: 700;

public/74/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
}
5454

5555
.ascii-line {
56-
font-size: min(1.2vw, 16px);
56+
font-size: max(min(1.2vw, 16px), 6px);
5757
line-height: 1.2;
5858
font-family: "SFMono", monospace;
5959
font-weight: 700;

public/75/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
}
5353

5454
.ascii-line {
55-
font-size: min(1.2vw, 16px);
55+
font-size: max(min(1.2vw, 16px), 6px);
5656
line-height: 1.2;
5757
font-family: "SFMono", monospace;
5858
font-weight: 700;

public/76/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
}
5454

5555
.ascii-line {
56-
font-size: min(1.2vw, 16px);
56+
font-size: max(min(1.2vw, 16px), 6px);
5757
line-height: 1.2;
5858
font-family: "SFMono", monospace;
5959
font-weight: 700;

public/77/index.html

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

public/78/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 78/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: #fff;
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: max(min(1.2vw, 16px), 6px);
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: #000;
65+
}
66+
</style>
67+
68+
<script>
69+
figlet.defaults({ fontPath: "/assets/" });
70+
71+
function updateASCIITime(time) {
72+
figlet.text(
73+
time,
74+
{
75+
font: "alligator2",
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>

0 commit comments

Comments
 (0)