-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclock.html
More file actions
120 lines (106 loc) · 3.62 KB
/
Copy pathclock.html
File metadata and controls
120 lines (106 loc) · 3.62 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description" content="Clock | Tools and Utilities from REFLEX.TOOLS">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="color-scheme" content="dark light">
<meta name="author" content="qwk">
<meta property="og:title" content="reflex.tools">
<meta property="og:description" content="Clock | Tools and Utilities from REFLEX.TOOLS">
<meta property="og:type" content="website">
<meta property="og:site_name" content="reflex.tools">
<meta property="og:locale" content="en_GB">
<meta property="og:image" content="https://og.tailgraph.com/og?fontFamily=Montserrat&title=Clock&titleTailwind=font-bold%20text-6xl%20text-white&text=Tools and Utilities from REFLEX.TOOLS&textTailwind=text-2xl%20mt-4%20bg-blueGray-300%20text-gray-300&logoUrl=&logoTailwind=h-8&bgTailwind=bg-black&footer=reflex.tools&footerTailwind=text-blue-400%20text-3xl&t=1744575448853&refresh=1">
<meta property="og:image:alt" content="reflex.tools">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="reflex.tools">
<meta name="twitter:site" content="@qwkdev">
<meta name="twitter:description" content="Clock | Tools and Utilities from REFLEX.TOOLS">
<meta name="twitter:image" content="https://og.tailgraph.com/og?fontFamily=Montserrat&title=Clock&titleTailwind=font-bold%20text-6xl%20text-white&text=Tools and Utilities from REFLEX.TOOLS&textTailwind=text-2xl%20mt-4%20bg-blueGray-300%20text-gray-300&logoUrl=&logoTailwind=h-8&bgTailwind=bg-black&footer=reflex.tools&footerTailwind=text-blue-400%20text-3xl&t=1744575448853&refresh=1">
<meta name="twitter:image:alt" content="reflex.tools">
<title>Clock | reflex.tools</title>
<style>
.underlined {
color: var(--ucolor, #fff);
font-weight: 500;
position: relative;
transition: .2s;
z-index: 2;
text-decoration: none;
}
.underline {
--widen: 0%;
--fix: 0%;
width: calc(100% + var(--widen));
transform: translateX(calc(-100% + var(--fix)));
height: 1px;
background: var(--ucolor, #fff);
position: absolute;
bottom: 0;
transition: .2s;
z-index: -1;
}
.underlined:hover {
color: var(--ubg, #000);
}
.underlined:hover .underline {
height: 100%;
}
.underlined::selection {
background: var(--ucolor2, #ffffff55);
}
#banner {
position: fixed;
top: 1vh;
left: 2vh;
font-family: monospace;
font-size: 2vh;
--ucolor: #777;
--ucolor2: #77777755;
--ubg: #000;
}
body {
margin: 0;
background: #000;
}
#clock {
--size: 20vw;
margin: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: var(--size);
color: #fff;
font-family: Arial, monospace;
text-align: center;
}
#clock::selection {
background: #fafaff77;
}
</style>
</head>
<body>
<div id="banner"><span><a class="underlined" href="/" aria-label="Home Page">reflex.tools<span class="underline" style="--widen: 2%; --fix: 1%;"></span></a></span></div>
<p id="clock"></p>
<script>
const pad = (n) => String(n).padStart(2, '0');
function updateClock() {
const now = new Date();
document.getElementById('clock').textContent = `${pad(now.getHours())}:${pad(now.getMinutes())}:${pad(now.getSeconds())}`;
}
updateClock();
setInterval(updateClock, 1000);
document.addEventListener('dblclick', () => {
if (!document.fullscreenElement) {
document.documentElement.requestFullscreen();
} else {
document.exitFullscreen();
}
});
</script>
</body>
</html>