-
Notifications
You must be signed in to change notification settings - Fork 0
/
flatdoc.html
147 lines (123 loc) · 4.96 KB
/
flatdoc.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!doctype html>
<!--
Instructions:
- Save this file.
- Replace "oraopensource" with your GitHub username.
- Replace "logger" with your GitHub repo name.
- Replace "Logger" with your project name.
- Upload this file (or commit to GitHub Pages).
Customize as you see fit!
-->
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title></title>
<!-- Flatdoc -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src='https://cdn.rawgit.com/rstacruz/flatdoc/v0.9.0/legacy.js'></script>
<script src='https://cdn.rawgit.com/rstacruz/flatdoc/v0.9.0/flatdoc.js'></script>
<!-- Flatdoc theme -->
<link href='https://cdn.rawgit.com/rstacruz/flatdoc/v0.9.0/theme-white/style.css' rel='stylesheet'>
<script src='https://cdn.rawgit.com/rstacruz/flatdoc/v0.9.0/theme-white/script.js'></script>
<!-- Meta -->
<meta content="" property="og:title">
<meta content="" name="description">
<!-- Initializer -->
<script>
var
//http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript
getParameterByName = function(name) {
name = name.toLowerCase().replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
},
repo = getParameterByName('repo'),
path = getParameterByName('path');
Flatdoc.run({
fetcher: Flatdoc.github('oraopensource/' + repo, path)
});
$(document).on('flatdoc:ready', function() {
var projectUrl;
var repoPropertyMap = {
"logger" : {
"path" : "logger",
"title" : "Logger",
"description" : "A PL/SQL logging and debugging framework"
},
"oraclexe-apex" : {
"path" : "oracle-xe-apex-vm",
"title" : "Oracle XE APEX VM"
},
"node4ords" : {
"path" : "node4ords",
"title" : "node4ords"}
};
var projectUrl = "http://oraopensource.com/";
var projectProperties = repoPropertyMap[repo.toLowerCase()];
if (projectProperties){
if (projectProperties.path){
projectUrl += projectProperties.path;
}
if (projectProperties.title){
$(document).prop('title', projectProperties.title);
$('meta[property="og:title"]').attr('content', projectProperties.title);
} else {
$(document).prop('title', repo);
$(document).prop('title', projectProperties.title);
}
if (projectProperties.description){
$('meta[name="description"]').attr('content', projectProperties.description);
} else {
$('meta[name="description"]').remove();
}
}
//Hide the "best viewed" since already in flatdoc
$('p:contains(flatdoc)').remove();
//Get relative urls to pass the path as a query string parameter
$('a:not([href^=http],[href^=#],[href=""])').each(function(){
var queryString = 'repo='+repo + '&path=' + $(this).attr('href');
$(this).attr('href', window.location.pathname + '?' + queryString);
});
$('#github-repo').text(repo).attr('href', projectUrl);
$('#github-view').attr('href','https://github.com/oraopensource/' + repo);
$('#github-issues').attr('href','https://github.com/oraopensource/' + repo + '/issues');
$('#github-stars').attr('src','http://ghbtns.com/github-btn.html?user=oraopensource&repo=' + repo + '&type=watch&count=true');
});
</script>
<!-- Google Analytics -->
<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','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-59573016-3', 'auto');
ga('require', 'linkid', 'linkid.js');
ga('send', 'pageview');
</script>
</head>
<body role='flatdoc' class='no-literate'>
<div class='header'>
<div class='left'>
<h1><a href="http://oraopensource.com">OraOpenSource</a>: </h1>
<h1><a id="github-repo" href=""></a></h1>
<ul>
<li><a id="github-view" href=''>View on GitHub</a></li>
<li><a id="github-issues" href=''>Issues</a></li>
</ul>
</div>
<div class='right'>
<!-- GitHub buttons: see http://ghbtns.com -->
<iframe id="github-stars" src="" allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe>
</div>
</div>
<div class='content-root'>
<div class='menubar'>
<div class='menu section' role='flatdoc-menu'></div>
</div>
<div role='flatdoc-content' class='content'></div>
</div>
</body>
</html>