-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
98 lines (77 loc) · 2.82 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Clock - Lunasphere</title>
<link href="css/animations.css" rel="stylesheet"/>
<link href="css/colours.css" rel="stylesheet"/>
<!-- <link href="css/clock.css" rel="stylesheet"/>-->
<link href="css/clock2.css" rel="stylesheet"/>
<link href="css/layout.css" rel="stylesheet"/>
<link href="css/readout.css" rel="stylesheet"/>
</head>
<body>
<h1 class="app-title">Clock.exe</h1>
<div class="container" id="clock" onclick="toggleClass(event, 'expanded')" title="Click for Spinny Things">
<div class="clock">
<div class="clock face">
<h1 id="timeReadout">XX : XX : XX</h1>
<h3 id="dateReadout"></h3>
</div>
<div class="clock hand">
<img src="assets/ClockHand.png" id="hours" alt="Hours outer-circle indicator hand"/>
</div>
<div class="clock hand">
<img src="assets/ClockHand.png" id="minutes" alt="Minutes outer-circle indicator hand"/>
</div>
</div>
</div>
<div id="stopwatch"></div>
<div id="timer"></div>
<footer>
<div class="nav-menu">
<button>Current Time</button>
<button class="disabled">Stopwatch</button>
<button class="disabled">Timer</button>
</div>
</footer>
</body>
<script type="text/javascript">
const navs = {
clock: document.getElementById("clock"),
stopwatch: document.getElementById("stopwatch"),
timer: document.getElementById("timer")
};
function switchNav(panelName) {
if (navs[panelName]) {
for (let panel of Object.values(navs)) {
if (panel.id !== panelName)
panel.classList.add('nav-closing');
else
panel.classList.remove('nav-closing');
// panel.className += " nav-closing";
}
setTimeout(() => {
for (let panel of Object.values(navs)) {
panel.style.display = "none";
}
navs[panelName].style.display = "block";
navs[panelName].classList.add("nav-open");
}, 1000);
}
}
</script>
<!--<script type="text/javascript" src="assets/clock.old"></script>-->
<script type="text/javascript" src="assets/formatters.js"></script>
<script type="text/javascript" src="assets/clock.exe.js"></script>
<script type="text/javascript">
window.onload = function() {
const analog = new AnalogClockRenderer('#clock');
const digital = new DigitalClockRenderer('#clock');
const clock = new Clock();
clock.registerListener('analog', analog.update.bind(analog));
clock.registerListener('digital', digital.update.bind(digital));
}
</script>
<script type="text/javascript" src="assets/util.js"></script>
</html>