-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocs.ejs.html
More file actions
36 lines (36 loc) · 781 Bytes
/
docs.ejs.html
File metadata and controls
36 lines (36 loc) · 781 Bytes
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
<!doctype html>
<html>
<head>
<title><%-title %></title>
<meta charset="utf-8">
<link rel="stylesheet" href="main.css" TYPE="text/css" media="screen">
</head>
<body>
<ul class="toc">
<li class="title">Table of Contents</li>
<% renderToc = function(children) { %>
<% children.forEach(function(toc) { %>
<li>
<% if(!toc.id) { %>
(unnamed section)
<% } else { %>
<a href="#<%-toc.id %>"><%-toc.title %></a>
<% } %>
<% if(toc.children.length) { %>
<ul>
<%renderToc(toc.children); %>
</ul>
<% } %>
</li>
<% }); %>
<% } %>
<% renderToc(toc.children); %>
</ul>
<div class="content">
<%-content %>
</div>
<div class="footer">
Generated by <a href="http://rfw.github.com/owldoc">Owldoc</a> — a hooting good time!
</div>
</body>
</html>