-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
76 lines (76 loc) · 3.49 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
<!DOCTYPE html>
<html>
<head>
<title>Rainbows</title>
<link rel="icon" type="image/ico" href="favicon.ico"/>
<link rel="stylesheet" type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/jquery-ui.min.css"/>
<link rel="stylesheet" type="text/css" href="lib/codemirror/lib/codemirror.css"/>
<link rel="stylesheet" type="text/css" href="lib/hint.min.css"/>
<link rel="stylesheet" type="text/css" href="src/rainbows-types.css"/>
<link rel="stylesheet" type="text/css" href="src/style.css"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="lib/codemirror/lib/codemirror.js"></script>
<script type="text/javascript" src="lib/codemirror/mode/rainbows/rainbows.js"></script>
<script type="text/javascript" src="lib/codemirror/mode/javascript/javascript.js"></script>
<script type="text/javascript" src="lib/tinycolor.js"></script>
<script type="text/javascript" src="src/types.js"></script>
<script type="text/javascript" src="src/builtins.js"></script>
<script type="text/javascript" src="src/main.js"></script>
<script type="text/javascript" src="src/rb-examples.js"></script>
<script type="text/javascript" src="lib/ohm/dist/ohm.min.js"></script>
<script type="text/javascript" src="src/inference.js"></script>
<script type="text/javascript" src="src/interp.js"></script>
<script type="text/javascript" src="lib/jscolor/jscolor.js"></script>
<script type="text/ohm-js" src="src/rainbows.ohm"></script>
</head>
<body>
<!-- This is to make sure we have at least one instance of each rb-type class -->
<div class="rb-type-bool"></div>
<div class="rb-type-string"></div>
<div class="rb-type-int"></div>
<div class="rb-type-float"></div>
<div class="rb-type-dict"></div>
<div class="rb-type-list"></div>
<h1>
<span class="rb-type-string">R</span><span class="rb-type-dict">a</span><span class="rb-type-int">i</span><span class="rb-type-list">N</span><span class="rb-type-string">B</span><span class="rb-type-dict">o</span><span class="rb-type-int">W</span><span class="rb-type-list">s</span>
</h1>
<p>Like it? Check out the project <a href="https://github.com/nfischer/rainbows-lang">on Github</a></p>
<div class="code-box">
<table id="main-table">
<tr>
<td>
<h2>Rainbows code</h2>
<textarea id="rainbows-text" class="codemirror-textarea">
</textarea>
<div>
<button id="save-file" class="hint--bounce hint--rounded hint--top" aria-label="Please allow this to download multiple files" onclick="saveFile()">Download this file!</button>
</div>
</td>
<td>
<div class="color-changer">
<p id="msg"></p>
<div id="slider-1" myval="40"></div>
<button onclick="var s = $('#slider-1'); s.slider('value', 0); updateSlider(null, {value: 0}); main()" id="button1">Reset</button>
<br>
<div class="dropdown">
<button id="color-btn" class="dropbtn jscolor {valueElement:null,onFineChange:'changeTypeColor(this)'}">Click to change the color of <span id="mytype">int</span></button>
<div id="typeList" class="dropdown-content">
</div>
</div>
<input type="checkbox" class="hint--bottom hint--medium" aria-label="Keep this checked to avoid color-spectrum collisions between types, keeping everything distinct" id="even-spread-box" checked="checked">Auto-adjust other colors?</input>
</div>
</td>
</tr>
<tr>
<td>
<div class="code-box">
<h2>Interpreted result</h2>
<textarea id="jscode" class="codemirror-textarea">
</textarea>
</div>
</td>
</tr>
</table>
</body>
</html>