-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtoc.html
45 lines (42 loc) · 1.49 KB
/
toc.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
<html>
<head>
<title>Table of Contents</title>
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap-1.2.0.min.css">
<style type="text/css">
html,body {
height: 100%;
}
p {
font-size: 15px;
}
</style>
<script src="/static/{{ project }}.js" type="text/javascript"></script>
<script type="text/javascript">
function main() {
var base_url = "/{{ project }}#";
for (var i = 0; i < toc.length; ++i) {
var title = toc[i].replace(/_/g, ' ');
document.getElementById("list").innerHTML += '<a href="' + base_url + i + '">' +
title[0].toUpperCase() + title.substr(1, title.length) + '</a><br>';
}
}
</script>
</head>
<body onload="main()" style="background: url('/static/check.png')">
<!-- All the single topbars -->
<div class="topbar">
<div class="topbar-inner" style="text-align: center;">
<div class="container" style="text-align: center;">
<h3><a href="#">Code Tutor</a></h3>
<ul class="nav">
<li><a href="/{{ project }}">Home</a></li>
<li class="active"><a href="/toc/{{ project }}/toc">Table of Contents</a></li>
</ul>
</div>
</div>
</div>
<div class="container" style="margin-top: 40px; background: white; height: 100%; border-left: solid 2px #808080; border-right: solid 2px #808080; padding: 20px;">
<h1>Table of Contents</h1>
<div id="list"></div>
</div>
</html>