-
Notifications
You must be signed in to change notification settings - Fork 19
/
index.html
70 lines (69 loc) · 2.64 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
<!DOCTYPE html>
<html>
<head>
<title>Language Graph</title>
<meta name="viewport" content="initial-scale=1, user-scalable=no">
<link rel="stylesheet" href="css/awesomplete.css">
<style>
html, body, #graph { margin: 0; padding: 0; height: 100%; }
body { font-family: sans-serif; }
header { position: fixed; top: 5px; right: 5px; z-index: 1; }
#controls { position: fixed; top: 5px; left: 5px; z-index: 1; }
</style>
<script src="js/cytoscape.min.js"></script>
<script src="js/layout-base.js"></script>
<script src="js/cose-base.js"></script>
<script src="js/cytoscape-cose-bilkent.js"></script>
<script src="js/compilers.js"></script>
<script src="js/colors.js"></script>
<script src="js/main.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-40999116-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<header>
<a href="https://github.com/mohd-akram/languages">GitHub</a>
</header>
<div id="controls">
<form autocomplete="off" onsubmit="filter(event)" onreset="show()">
Compile
<br>
<input name="source" size="15" placeholder="source" list="langs"
class="awesomplete" data-minchars="1" data-autofirst="true">
to
<input name="target" size="15" placeholder="target" list="langs"
class="awesomplete" data-minchars="1" data-autofirst="true">
<br>
<input name="direct" type="checkbox"> directly
<input name="cycles" type="checkbox"> with cycles
<br>
<button type="submit">Go</button>
<button type="reset">Reset</button>
<datalist id="langs"></datalist>
</form>
<div id="info">Try setting the target to JavaScript</div>
</div>
<div id="graph"></div>
<script>
var languages = [];
LANGUAGES.forEach(function(lang) { languages.push(lang) });
languages.sort().forEach(function(language) {
option = document.createElement('option');
option.text = language;
langs.appendChild(option);
});
// Old browsers don't support datalist
if (!('options' in langs)) {
var script = document.createElement('script');
script.src = 'js/awesomplete.min.js';
document.body.appendChild(script);
}
</script>
</body>
</html>