-
Notifications
You must be signed in to change notification settings - Fork 0
/
web_interface.html
52 lines (48 loc) · 997 Bytes
/
web_interface.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
<!DOCTYPE html>
<html>
<head>
<title>decatholac MANGO web interface</title>
<style>
html,
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
#button-container {
width: 100%;
height: 100%;
min-height: 100%;
display: flex;
flex-direction: column;
}
#button-container div {
display: flex;
flex-direction: column;
justify-content: center;
flex: 1;
align-items: stretch;
}
#button-container button {
height: 100%;
}
</style>
</head>
<body>
<div id="button-container">
<div><button id="fetch">Fetch</button></div>
<div><button id="announce">Announce</button></div>
</div>
<script type="text/javascript">
document.getElementById('fetch').addEventListener('click', async () => {
let r = await fetch("/fetch");
alert(await r.text());
});
document.getElementById('announce').addEventListener('click', async () => {
let r = await fetch("/announce");
alert(await r.text());
});
</script>
</body>
</html>