forked from jsinside/docco.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathorig.html
More file actions
41 lines (34 loc) · 1.39 KB
/
orig.html
File metadata and controls
41 lines (34 loc) · 1.39 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
<!DOCTYPE html><title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/js/google-code-prettify/prettify.css">
<script src="http://twitter.github.com/bootstrap/assets/js/google-code-prettify/prettify.js"></script>
<script src="https://raw.github.com/github/github-flavored-markdown/gh-pages/scripts/showdown.js"></script>
<script src="parseDocco.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.3.3/underscore-min.js"></script>
<script type="text/mytempl" id="mytempl">
<% console.log(sections); %>
<% sections.forEach(function(section){ %>
<% console.log(section); %>
<% if( section.type === "comment" ){ %>
<%= "<div>"+section.html+"</div>" %>
<% }else if( section.type === "comment" ){ %>
<%= "<div>"+section.html+"</div>" %>
<% } %>
<% }); %>
</script>
<script>
var text = null;
jQuery(function(){
var url = "examples/index.js";
jQuery.get(url, function(text){
var sections = parseDocco(text);
console.log("sections", sections);
var textTmpl = document.getElementById('mytempl').innerText;
console.log("tmpl", textTmpl);
var html = _.template(textTmpl, {sections: sections});
var container = document.getElementById('container');
container.innerHTML = html;
}, 'text');
})
</script>
<div id="container"></div>