This repository was archived by the owner on Jul 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
131 lines (114 loc) · 2.94 KB
/
Copy pathindex.html
File metadata and controls
131 lines (114 loc) · 2.94 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@100;500&display=swap');
* {
margin: 0;
padding: 0;
background: #282c34;
}
main {
font-size: 2vmin;
font-family: JetBrains Mono, monospace;
height: 100vh;
width: 100vw;
display: flex;
justify-content: center;
align-items: center;
color: #e4bb68;
}
.string {
display: flex;
flex-direction: column;
text-align: center;
animation: move 4s infinite;
}
.greeting {
position: relative;
top: 8.6vmin;
animation: white-out 5s infinite;
}
.closure::after {
content: '';
position: absolute;
height: 25vmin;
width: 40vmin;
background: #282c34;
transform: translate(-45vmin, -24.5vmin);
}
.closure::before {
content: '';
position: absolute;
height: 25vmin;
width: 40vmin;
background: #282c34;
transform: translate(-40vmin, 5vmin);
}
.en {
color: #fa8231;
}
.es {
color: white;
}
.de {
color: #c678dd;
}
.it {
color: #a9b0bd;
}
@keyframes move {
25% {
transform: translatey(-5.8vmin);
opacity: 1;
}
50% {
transform: translatey(-11vmin);
}
75% {
transform: translatey(-16.5vmin);
}
}
</style>
</head>
<body>
<main>
<h1>System<span style="color:white;">.<span style="color:#e06c75;">out</span>.</span><span style="color:#61afef;">println</span>("</h1>
<div class="string">
<h1 class="greeting en">Hello there!</h1>
<h1 class="greeting es">The time is</h1>
<h1 class="greeting de" id="clock"></h1>
<h1 class="greeting it">& I'm coding!</h1>
</div>
<h1 class="closure">");</h1>
</main>
</body>
<script>
function updateTime() {
const now = new Date();
let hours = now.getHours();
let minutes = now.getMinutes();
let seconds = now.getSeconds();
let milliseconds = now.getMilliseconds();
let amPm = hours >= 12 ? 'PM' : 'AM';
hours = hours % 12 || 12;
minutes = minutes < 10 ? '0' + minutes : minutes;
seconds = seconds < 10 ? '0' + seconds : seconds;
milliseconds = milliseconds.toString().padStart(3, '0').slice(0, 2);
document.getElementById('clock').textContent = `${hours}:${minutes}:${seconds}:${milliseconds} ${amPm}`;
}
function updateDayCount() {
const now = new Date();
const startDate = new Date("2024-03-18"); // Set your start date here
const daysDifference = Math.floor((now - startDate) / (1000 * 60 * 60 * 24));
document.getElementById('dayCount').textContent = `Day ${daysDifference + 1}`;
}
updateTime();
setInterval(updateTime, 1);
updateDayCount();
setInterval(updateDayCount, 1000 * 60 * 60 * 24); // Update every 24 hours
</script>
</html>