-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
111 lines (85 loc) · 3.1 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Charset -->
<meta charset="utf-8">
<!-- Style Sheets -->
<link rel="stylesheet" type="text/css" href="style.css">
<!-- Viewport -->
<meta name="viewport" content="width=device-width">
<!-- Title -->
<title>Analog clock</title>
<!-- coded by U7P4L 1N -->
<!-- Description -->
<meta name="description" content="Website with an analog clock.">
<!-- Author -->
<meta name="author" content="U7P4L 1N">
<!-- Icon -->
<link rel="icon" type="image/png" href="logo.ico">
<!-- Apple touch icon -->
<link rel="apple-touch-icon" href="icon.png">
<!-- Theme color -->
<meta name="theme-color" content="#63d7a5">
<meta name="msapplication-TileColor" content="#63d7a5">
<meta name="msapplication-navbutton-color" content="#63d7a5">
<meta name="apple-mobile-web-app-status-bar-style" content="#63d7a5">
<!-- ===================== -->
<!-- ===== OpenGraph ===== -->
<!-- ===================== -->
<!-- Url -->
<meta property="og:url" content="https://u7p4l-in.github.io/">
<!-- coded by U7P4L 1N -->
<!-- Title -->
<meta property="og:title" content="Nice analog clock">
<!-- Description -->
<meta property="og:description" content="Website with nice analog clock.">
<!-- Icon -->
<meta property="og:image" content="">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:type" content="page">
<!-- ===================== -->
<!-- ====== Twitter ====== -->
<!-- ===================== -->
<!-- Twitter type of showed banner -->
<meta property="twitter:card" content="summary_large_image">
<!-- Title -->
<meta property="twitter:title" content="Nice analog clock">
<!-- Description -->
<meta property="twitter:description" content="Website with nice analog clock.">
<!-- Icon -->
<meta property="twitter:image:src" content="">
<meta property="twitter:image:width" content="1200">
<meta property="twitter:image:height" content="630">
</head>
<body>
<div class="clock">
<div class="hour">
<div class="hr" id="hr"></div>
</div>
<div class="min">
<div class="mn" id="mn"></div>
</div>
<div class="sec">
<div class="sc" id="sc"></div>
</div>
</div>
<script type="text/javascript">
const deg = 6;
const hr = document.querySelector('#hr');
const mn = document.querySelector('#mn');
const sc = document.querySelector('#sc');
setInterval(() => {
let day = new Date();
let hh = day.getHours();
let mm = day.getMinutes();
let ss = day.getSeconds();
let ms = day.getMilliseconds();
hr.style.transform = `rotateZ(${(hh*30)+(mm/2)}deg`;
mn.style.transform = `rotateZ(${(mm*6)+(ss/10)}deg`;
sc.style.transform = `rotateZ(${(ss*6)+(ms/1000*6)}deg`;
})
</script>
</body>
</html>