-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
79 lines (75 loc) · 2.23 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>minirepl</title>
<link rel="stylesheet" href="style.css">
</head>
<body class="modalClosed">
<div id="toolbar">
<span class="tab selected" data-model="html">HTML</span>
<span class="tab" data-model="css">CSS</span>
<span class="tab" data-model="js">JS</span>
<button name="openModal">⛭</button>
<button name="load">Load</button>
<button name="save">Save</button>
</div>
<div id="editor"></div>
<iframe frameborder="0" srcdoc="<h1>Loading...</h1>" csp="default-src 'self' blob:"></iframe>
<div id="modalContainer">
<div id="modal">
<section>
<h3>Settings</h3>
<fieldset>
<legend>Auto-Refresh</legend>
<label>
<input type="checkbox" name="autoRefreshEnabled" checked>
Enabled
</label>
<label>
Delay, in milliseconds
<input type="number" name="autoRefreshDelay" value="500">
</label>
</fieldset>
<fieldset>
<legend>Miscellaneous</legend>
<label>
<input type="checkbox" name="clearConsoleEnabled">
Clear console on refresh
</label>
<label>
<input type="checkbox" name="embedJSAsModule" checked>
Embed JS as a module (allows using import statements)
</label>
</fieldset>
</section>
<section>
<h3>About</h3>
<h4>Keyboard Shortcuts</h4>
<dl>
<dt><kbd>Ctrl</kbd>+<kbd>Enter</kbd></dt>
<dd>Refresh output page (even when auto-refresh is enabled)</dd>
<dt><kbd>Ctrl</kbd>+<kbd>1</kbd>/<kbd>2</kbd>/<kbd>3</kbd></dt>
<dd>
Select the HTML, CSS, or JS tabs respectively.
Each also focuses the editor, if e.g. you were previously interacting with
elements in the output.
</dd>
<dt><kbd>Ctrl</kbd>+<kbd>S</kbd></dt>
<dd>Save document to URL</dd>
<dt><kbd>Ctrl</kbd>+<kbd>O</kbd></dt>
<dd>Load from URL (as an alternative to pasting into address bar)</dd>
</dl>
<h4>Source</h4>
<p>
You can find it on <a href="https://github.com/Yoplitein/minirepl">GitHub</a>.
</p>
</section>
<div id="dismissNote">
Click anywhere outside this window (or press <kbd>Escape</kbd>) to dismiss
</div>
</div>
</div>
<script type="module" src="main.js"></script>
</body>
</html>