-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
47 lines (43 loc) · 1.09 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="oncode.css">
<style>
body {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
font-family: monospace;
background: #222;
}
.editor {
height: 30vh;
width: 80%;
background: #111;
display: block;
position: relative;
padding: 25px;
font-size: 16px;
color: #fff;
}
</style>
</head>
<body>
<div class="editor" data-oncodejs>Ah, here belongs JavaScript? Is it like Java?</div>
<div class="editor" data-oncodehtml>Some HTML here, some HTML there..</div>
<script src="oncode.js"></script>
<script>
const jsEditor = new OnCode(document.querySelector("[data-oncodejs]"), "js");
const htmlEditor = new OnCode(document.querySelector("[data-oncodehtml]"), "html");
</script>
</body>
</html>