-
Notifications
You must be signed in to change notification settings - Fork 3
/
inupiaq.html
67 lines (66 loc) · 3.14 KB
/
inupiaq.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
<html>
<head>
<title>Iñupiaq Clock</title>
<style>
*{
font-family: "InupiaqNumbers";
}
text{
font-size: 24px;
}
p{
font-size: 80px;
text-align: center;
direction: rtl;
}
</style>
<script>
function bruh(str){
numerals = ["𝋀", "𝋁", "𝋂", "𝋃", "𝋄", "𝋅", "𝋆", "𝋇", "𝋈", "𝋉", "𝋊", "𝋋", "𝋌", "𝋍", "𝋎", "𝋏", "𝋐", "𝋑", "𝋒", "𝋓"]
tens = Math.floor(str / 20)
ones = str % 20
return numerals[tens] + numerals[ones]
}
setInterval(function(){
center = 200
a = new Date();
second = a.getSeconds()
minute = a.getMinutes()
hour = a.getHours() + (a.getMinutes() / 60)
thehour = bruh(a.getHours())
theminute = bruh(a.getMinutes())
thesecond = bruh(a.getSeconds())
document.getElementById("thesecond").textContent = thesecond
document.getElementById("theminute").textContent = theminute
document.getElementById("thehour").textContent = thehour
document.getElementById("second").setAttribute("x2", center + (90 * Math.sin(second * Math.PI / 30)));
document.getElementById("second").setAttribute("y2", center - (90 * Math.cos(second * Math.PI / 30)));
document.getElementById("minute").setAttribute("x2", center + (80 * Math.sin(minute * Math.PI / 30)));
document.getElementById("minute").setAttribute("y2", center - (80 * Math.cos(minute * Math.PI / 30)));
document.getElementById("hour").setAttribute("x2", center + (70 * Math.sin((hour % 12) * Math.PI / 6)));
document.getElementById("hour").setAttribute("y2", center - (70 * Math.cos((hour % 12) * Math.PI / 6)));
}, 1000);
</script>
</head>
<body>
<svg width="400" height="400">
<circle cx="200" cy="200" r="100" fill="white" stroke="black"></circle>
<text x="192" y="92">𝋌</text>
<text x="251" y="111">𝋁</text>
<text x="290" y="150">𝋂</text>
<text x="308" y="208">𝋃</text>
<text x="290" y="266">𝋄</text>
<text x="251" y="305">𝋅</text>
<text x="192" y="328">𝋆</text>
<text x="133" y="305">𝋇</text>
<text x="84" y="266">𝋈</text>
<text x="78" y="208">𝋉</text>
<text x="84" y="150">𝋊</text>
<text x="133" y="111">𝋋</text>
<line id="second" x1="200" y1="200" x2="200" y2="110" stroke="red"></line>
<line id="minute" x1="200" y1="200" x2="200" y2="120" stroke="black"></line>
<line id="hour" x1="200" y1="200" x2="200" y2="130" stroke="black" stroke-width="5"></line>
</svg>
<p><span id="thehour"></span>:<span id="theminute"></span>:<span id="thesecond"></span></p>
</body>
</html>