-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
91 lines (84 loc) · 2.35 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="wasm_exec.js"></script>
<script>
const go = new Go();
let mod, inst;
WebAssembly.instantiateStreaming(fetch("main.wasm"), go.importObject).then((result) => {
mod = result.module
inst = result.instance
go.run(result.instance);
});
function disableButtons(disableStart) {
let startb = document.getElementById("startbutton")
let flipb = document.getElementById("flipbutton")
let stopb = document.getElementById("stopbutton")
if (disableStart) {
startb.disabled = true;
flipb.disabled = false;
stopb.disabled = false;
} else {
startb.disabled = false;
flipb.disabled = true;
stopb.disabled = true;
}
}
</script>
<style>
@font-face {
font-family: "Px437 IBM BIOS";
src: url("./Fonts/Px437_IBM_BIOS.ttf")
}
body {
background: #282828;
color: #33FF33;
font-family: "Px437 IBM BIOS";
font-size: 30px;
}
button {
background: #282828;
color: #33FF33;
border-color: #33FF33;
border-style: dashed;
font-family: "Px437 IBM BIOS";
font-size: 20px;
padding: 10px;
}
button:disabled {
color: #1B871B;
border-color: #1B871B;
}
</style>
</head>
<body>
<table>
<tr>
<td>
Working:
</td>
<td>
<span id="working">00:00:00</span>
</td>
</tr>
<tr>
<td>
Distracted:
</td>
<td>
<span id="distracted">00:00:00</span>
</td>
</tr>
<tr>
<td colspan="2">
<span class="mid">
<button id="startbutton" onclick="start()">Start</button>
<button id="flipbutton" onclick="flip()" disabled>Flip</button>
<button id="stopbutton" onclick="stop()" disabled>Stop</button>
</span>
</td>
</tr>
</table>
</body>
</html>