-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
93 lines (79 loc) · 1.97 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
<!DOCTYPE html>
<html>
<head>
<title>MahNES.js</title>
</head>
<style>
body
{
font-family: Verdana, sans-serif;
}
#divMainLayout
{
display: grid;
grid-template-columns: 1fr;
grid-template-rows: auto auto auto;
grid-align: center;
justify-items: center;
align-items: center;
text-align: center;
grid-row-gap: 2em;
}
#divInputLayout
{
display: grid;
grid-template-rows: auto auto;
grid-auto-flow: column;
grid-column-gap: 0.75em;
grid-row-gap: 0.4em;
justify-items: center;
align-items: end;
}
kbd
{
padding-top: 0.2em;
padding-bottom: 0.2em;
padding-left: 0.5em;
padding-right: 0.5em;
border: 1px solid black;
border-radius: 0.2em;
box-shadow: 0 0.05em black;
background-color: #eee;
}
</style>
<body>
<div id="divMainLayout">
<div style="grid-row:1; grid-column:1;">
<canvas id="canvasScreen" width="256" height="240"></canvas>
<br>
<br>
<input type="file" id="inputFile" accept=".nes"></input>
<br>
<br>
<div style="text-align:left;">
<input type="radio" id="radioRunJS" name="backend" checked>
<label for="radioRunJS">JavaScript</label>
<br>
<input type="radio" id="radioRunWasm" name="backend" disabled>
<label for="radioRunWasm" id="labelRadioRunWasm">(Loading WebAssembly...)</label>
</div>
</div>
<div style="grid-row:2; grid-column:1;">
<div id="divInputLayout">
<div><kbd>↑</kbd><br><kbd>←</kbd><kbd>↓</kbd><kbd>→</kbd></div> <div>D-Pad</div>
<div><kbd>Ctrl</kbd></div> <div>Select</div>
<div><kbd>Enter</kbd></div> <div>Start</div>
<div><kbd>X</kbd></div> <div>B</div>
<div><kbd>Space</kbd></div> <div>A</div>
</div>
</div>
<div style="grid-row:3; grid-column:1;">
<button id="buttonDebug">Debug (Check the Console)</button>
</div>
</div>
<script type="module">
import { main } from "./src/main.js"
main()
</script>
</body>
</html>