-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
90 lines (84 loc) · 2.79 KB
/
index.html
File metadata and controls
90 lines (84 loc) · 2.79 KB
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
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>GoNet</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
html {
overflow-y:scroll;
}
.navbar {
margin-bottom: 0;
}
#splashtext {
margin-top: 20px;
}
</style>
<link href="css/prism.css" rel="stylesheet" />
</head>
<body>
<nav class="navbar navbar-default">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" id="brand" href="javascript:void(0)">GoNet</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul id="dropdown" class="nav navbar-nav">
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class="container">
<div id="splashtext" class="jumbotron">
<h1>
GoNet Code Browser
</h1>
<p>
Welcome to the GoNet code browser! This website is served with GoNet. To see GoNet in action, check out the console on the other computer.
</p>
</div>
<h3><code id="filename" style="display: none;"></code></h3>
<pre id="codearea" style="display: none;"><code class="language-go" id="code"></code></pre>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript">
var code = $("#code");
var filename = $('#filename');
var splashtext = $('#splashtext');
var codearea = $('#codearea');
$("#dropdown").load("nav.html", function() {
var file = $(".file");
file.click(function () {
filename.hide();
splashtext.hide();
codearea.hide();
code.load(this.id, function(name) {
filename.text(name);
filename.show();
codearea.show(function() {
Prism.highlightElement(code[0]);
});
}(this.id.split('.html')[0]));
});
});
$('#brand').click(splash);
function splash() {
filename.hide();
codearea.hide();
splashtext.show();
}
splash();
</script>
<script src="js/prism.js"></script>
</body>
</html>