-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
71 lines (61 loc) · 2.2 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
<html>
<head>
<meta name="charset" content="utf-8">
<title>NovaLightshow</title>
<link rel="stylesheet" href="./index.css">
<link rel="stylesheet" href="https://esm.sh/@wooorm/starry-night@1/style/both.css">
<script type="module">
import * as _ from './index.mjs';
window._ = _;
_.initLoad();
</script>
</head>
<body>
<h1>NovaLightshow</h1>
<p>Preview TextMate syntax highlighting grammars for use on GitHub.</p>
<p><strong id="loading">Loading packages...</strong></p>
<form action="javascript:void(0)" onsubmit="_.run()">
<div class="flexed">
<div class="half">
<!-- Grammar -->
<h3>Grammar <small>(JSON/CSON/YAML/XML)</small></h3>
<select id="grammar-type" onchange="_.adjustTextareaSize();_.$('#autodetected').innerText='';">
<option value="url">From URL</option>
<option value="text">From text</option>
</select>
<small id="autodetected"></small>
<br>
<textarea id="grammar"></textarea>
</div>
<div class="half">
<!-- Sample -->
<h3>Sample content</h3>
<select id="sample-type" onchange="_.adjustTextareaSize()">
<option value="url">From URL</option>
<option value="text">From text</option>
</select>
<br>
<textarea id="sample"></textarea>
</div>
</div>
<br>
<div class="options">
<div>
<label for="include-common">Include common grammars?</label>
<input type="checkbox" id="include-common" checked />
</div>
</div>
<button type="submit">Run</button>
</form>
<h2>Highlighted output</h2>
<output>
</output>
<br>
<button onclick="_.saveToUrl()">Share</button>
<footer>
Created by <a href="https://nixinova.com" target="_blank">Nixinova</a>
<br>
Code available on <a href="https://github.com/Nixinova/NovaLightshow" target="_blank">GitHub</a>
</footer>
</body>
</html>