-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
44 lines (38 loc) · 1.19 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
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./skeleton.css" />
<link rel="stylesheet" href="./styles.css" />
<script src="wasm_exec.js"></script>
<script src="./script.js" defer></script>
<script>
const go = new Go();
WebAssembly.instantiateStreaming(fetch("main.wasm"), go.importObject).then((result) => {
go.run(result.instance);
});
</script>
</head>
<body>
<form id="form">
<div class="row">
<label for="barSelect">Bar weight</label>
<select name="barSelect" id="barSelect" required>
<option value="20">20</option>
<option value="15">15</option>
<option value="10">10</option>
</select>
</div>
<div class="row">
<label for="weightInput">Total weight</label>
<input id='weightInput' type="number" step="1" required/>
</div>
<div class="row">
<input type="submit" class='button-primary' />
</div>
</form>
<div>
<p id="output"></p>
</div>
</body>
</html>