-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault-template.html
More file actions
183 lines (155 loc) · 4.65 KB
/
default-template.html
File metadata and controls
183 lines (155 loc) · 4.65 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
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<!DOCTYPE html>
<html lang='en'>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8" />
<!-- BOOTSTRAP RESPONSIVE LAYOUT -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- BOOTSTRAP CSS -->
<link
href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"
rel="stylesheet" />
<!-- MD CSS -->
<link rel='stylesheet' href='{{ css_path }}md.css' />
<!-- JQUERY -->
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<!-- BOOTSTRAP JSCRIPT -->
<script
src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- POPOVER SCRIPT -->
<script>
function enablePopOvers() {
$('.reference_number').each( function(index, E) {
try {
var target = document.getElementById($(E).attr('href').slice(1));
jqT = $(target)
var target_type = jqT.attr('type');
var target_number = jqT.attr('id');
var target_content = ""
$(target.children).not('.block_heading').each(function() {
target_content += $(this).html();
});
var title = "<span class='block_heading' type='"+target_type+"'>"+
"<span class='block_number'>"+target_number+"</span>"+
"</span>";
jqE = $(E)
jqE.attr('data-content',target_content);
jqE.attr('data-html',true);
jqE.attr('data-trigger','hover');
jqE.attr('data-title',title)
} catch (err) {
return
}
});
$('.reference_number').popover();
}
function hideTOC() {$('#toc').removeClass('showtoc');$('#toc').addClass('hidetoc');}
function showTOC() {$('#toc').removeClass('hidetoc');$('#toc').addClass('showtoc');}
function toggleToc() {
var toc = this.document.getElementById('toc');
if (toc.classList.contains('showtoc')) hideTOC();
else showTOC();
}
$(window).scroll(function () {
if ($(window).scrollTop() > 200) {
$("nav").addClass('smallnav');
$("#toc").addClass('smallnav');
}
else {
$("nav").removeClass('smallnav');
$("#toc").removeClass('smallnav');
}
});
</script>
<!-- MATHJAX -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]},
"HTML-CSS": {
scale: 80,
linebreaks: {
automatic:true
}
}
});
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-
MML_HTMLorMML"></script>
<script>
MathJax.Hub.Queue(function() {
enablePopOvers();
});
</script>
<style>
{% autoescape off %}
{{ headings_css }}
{% endautoescape %}
</style>
{% if title %}
<title> {{ title }} </title>
{% endif %}{% if author %}
<meta name='Author' content='{{ author }}' />
{% endif %}{% if subject %}
<meta name='Subject' content='{{ subject }}' />
{% endif %}{% if keywords %}
<meta name='keywords' content='{{ keywords }}' />
{% endif %}
</head>
<body>
{% if title %}
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">
<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" href="#">
<span class='title'>{{ title }} </span>
{% if author %}
<h5 class='author'><i> {{ author }}</i></h5>
{% endif %}
</a>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
{% if pdf or bib %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Download<b class="caret"></b></a>
<ul class="dropdown-menu">
{% if pdf %}
<li><a style='font-size:9pt;' href='{{cdn}}{{pdf}}'>Version for print (PDF)</a></li>
{% endif %}
{% if bib %}
<li><a href='{{cdn}}{{bib}}'>Bibliography (BibTeX)</a></li>
{% endif %}
</ul>
</li>
{% endif %}
{% if toc %}
<li><a onclick='toggleToc();'>
<span class="glyphicon glyphicon-align-justify visible-md visible-sm visible-lg"></span>
<span class="visible-xs">Contents</span>
</a></li>
{% endif %}
</ul>
</div>
</nav>
{% endif %}
{% if toc %}
<div id='toc' class='hidetoc toc'>
<div style='padding-top:5em' class='visible-xs'> </div>
<h4> Table of Contents </h4>
{% autoescape off %}
{{ toc }}
{% endautoescape %}
</div> <!-- toc -->
{% endif %}
<div id='article'>
{% autoescape off %}
{{ content }}
{% endautoescape %}
</div> <!-- article -->
</body>
</html>