-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
73 lines (73 loc) · 1.55 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>UTK Level Editor</title>
<style>
body {
background-color: #000;
color: #fff;
font-family: sans-serif;
}
a {
color: #fff;
}
#outer {
display: flex;
justify-content: center;
}
#inner {
position: relative;
width: 100%;
max-width: 1200px;
}
#file-upload {
display: none; /* set to "block" to show */
position: absolute;
top: 0;
right: 0;
padding: 50px;
color: #f00;
background-color: transparent;
border: 1px solid #f00;
border-radius: 10px;
cursor: pointer;
}
#file-upload input {
display: none;
}
canvas {
image-rendering: pixelated;
width: 100%;
}
footer {
margin-top: 1em;
text-align: center;
}
</style>
</head>
<body>
<div id="outer">
<div id="inner">
<div id="file-upload">
<div>Drop files here, or click to select</div>
<input type="file" multiple>
</div>
<canvas id="screen"></canvas>
</div>
</div>
<footer>
<a href="https://suomipelit.github.io/" targe="_blank">Suomipelit community</a> //
<a href="https://github.com/suomipelit/utk-level-editor" target="_blank">GitHub</a>
</footer>
<script type="module">
import { run } from './index.js';
try {
await run()
} catch (err) {
console.error(err)
document.querySelector('.outer').innerHTML = `<pre>${err}</pre>`
}
</script>
</body>
</html>