-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
42 lines (39 loc) · 1.16 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>1Min Counter | katzEco</title>
<link rel="stylesheet" href="./src/style/main.css" />
</head>
<body>
<div class="container">
<div class="hover">
<div id="time"></div>
<div class="controller">
<button id="reset" onclick="reset()">Reset</button>
<button id="start" onclick="start()">Start</button>
<button id="pause" onclick="pause()" class="hidden">Pause</button>
</div>
</div>
</div>
<div id="navbar"></div>
<div id="footer"></div>
<script src="./src/js/counter.js"></script>
<script src="./src/js/components/navbar.js"></script>
<script src="./src/js/components/footer.js"></script>
<script>
window.addEventListener("keydown", (event) => {
if (event.code === "Space") {
if (sessionStorage.getItem('start')) {
pause()
} else {
start()
}
} else if (event.code === "KeyR") {
reset();
}
});
</script>
</body>
</html>