This repository has been archived by the owner on Jan 3, 2018. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
_base.html
313 lines (289 loc) · 13.5 KB
/
_base.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
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
<!DOCTYPE html>
<html>
<!-- pageclass: GenericPage -->
{% macro youtube(title, stem, time) -%}
<div class="youtube">
<iframe title="{{title}}"
src="http://www.youtube.com/embed/{{stem}}"
time="{{time}}"
width="640" height="506"
frameborder="0"
allowfullscreen="allowfullscreen"></iframe>
</div>
{%- endmacro %}
{% macro nav_left() -%}
{% if page.prev %}
<li class="previous"><a id="id_prev_link" href="{{page.prev}}">← Previous</a></li>
{% else %}
<li class="previous"><a id="id_up_link" href="{{page.uplink}}">↑ Up</a></li>
{% endif %}
{%- endmacro %}
{% macro nav_right() -%}
{% if page.next %}
<li class="next"><a id="id_next_link" href="{{page.next}}">Next →</a></li>
{% else %}
<li class="next"><a id="id_up_link" href="{{page.uplink}}">↑ Up</a></li>
{% endif %}
{%- endmacro %}
{% macro disqus(title, ident) -%}
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = 'software-carpentry';
var disqus_developer = 1;
var disqus_identifier = '{{ident}}';
var disqus_title = '{{title}}';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
{%- endmacro %}
{% macro navhighlight(section) -%}
<script type="text/javascript">
var nav = document.getElementById('nav-{{section}}');
if (nav.className) {
nav.className = nav.className + ' active';
} else {
nav.className = 'active';
}
</script>
{%- endmacro %}
{% macro list_badges(badge_kind, people) -%}
<div style="clear:both; bottom-margin:30px;">
<ul>
{% for name, user, site in people %}
<div class="pull-left" style="width:175px;">
<li><a badge-kind="{{badge_kind}}"
badge-user="{{user}}"
{% if site %}
href="{{site}}">
{% else %}
href="{{root_path}}/about/team.html#{{user}}">
{% endif %}
{{name}}</a></li>
</div>
{% endfor %}
</ul>
</div>
<div style="clear:both;"></div>
{%- endmacro %}
{% macro badge_issuing() -%}
<!-- attach actions -->
<script src="http://beta.openbadges.org/issuer.js"></script>
<script type="text/javascript">
window.onload = function () {
$('a[badge-kind]').click(function (e) {
e.preventDefault();
var kind = $(this).attr('badge-kind');
var user = $(this).attr('badge-user');
var link = $(this).attr('href');
// configure dialog
var assertionURL = "{{site}}/badges/"+kind+"/"+user+".json";
$('#assertion-modal iframe').attr('src', assertionURL);
$('#assertion-modal button[name=add]').click(function(e) {
OpenBadges.issue([assertionURL]);});
$('#modal-badge-img').attr("src", "{{site}}/img/badges/"+kind+".png");
$('#assertion-modal div.modal-footer a').attr("href", link);
$('#assertion-modal').modal('show');
return false;
});
};
</script>
<!-- Model dialog for the assertion -->
<div id="assertion-modal" class="modal hide fade" role="dialog">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3>Badge Details</h3>
</div>
<div class="modal-body">
The following blob (known as an <a
href="https://github.com/mozilla/openbadges/wiki/Assertions">assertion</a>)
certifies the work done for this badge. If this is your badge, you may add
it to your Mozilla Backpack.
<iframe src=""></iframe>
<img id="modal-badge-img" src=""/>
</div>
<div class="modal-footer">
<a class="pull-left" href="{{site}}/about/team.html">More about this person</a>
<button class="btn" name="add">Add badge to my Backpack</button>
<button class="btn" data-dismiss="modal">Close</button>
</div>
</div>
{%- endmacro %}
<head>
<link rel="shortcut icon" type="image/x-icon" href="{{root_path}}/img/favicon.ico" />
<link rel="stylesheet" id="twentytwelve-fonts-css"
href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700&subset=latin,latin-ext"
type="text/css" media="all">
{% block css %}
<link href="{{root_path}}/css/bootstrap/bootstrap.css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="{{root_path}}/css/bootstrap/bootstrap-responsive.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="{{root_path}}/css/swc.css" />
<link rel="stylesheet" type="text/css" href="{{root_path}}/css/swc-bootstrap.css" />
<link rel="alternate" type="application/rss+xml" title="The Software Carpentry Blog RSS Feed" href="{{site}}/feed.xml"/>
<meta http-equiv="last-modified" content="{{timestamp}}" />
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
{% endblock css %}
{% block metadata %}{% endblock metadata %}
{% block file_metadata %}{% endblock file_metadata %}
{% block pagetitle %}<title>Software Carpentry: {{page.title}}</title>{% endblock pagetitle %}
{% block javascript %}{% endblock javascript %}
</head>
<body {%- block onload %}{% endblock onload -%} >
<div class="container shadow">
<div class="banner">
<a href="{{root_path}}/index.html" title="Software Carpentry Home">
<img src="{{root_path}}/img/software-carpentry-banner.png" alt="Software Carpentry banner" />
</a>
</div>
<div class="navbar navbar-inverse">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li id="nav-home"><a href="{{root_path}}/index.html">Home</a></li>
<li id="nav-about" class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
About
<b class="caret"></b>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href="{{root_path}}/about/90seconds.html">What We Do</a></li>
<li><a href="{{root_path}}/about/faq.html">FAQ</a></li>
<li><a href="{{root_path}}/license.html">License</a></li>
<li><a href="{{root_path}}/about/credits.html">Sponsors</a></li>
<li><a href="{{root_path}}/about/team.html">Team</a></li>
<li><a href="{{root_path}}/about/contributing.html">Contributing</a></li>
<li><a href="{{root_path}}/about/collaborating.html">Collaborating</a></li>
<li><a href="{{root_path}}/about/testimonials.html">Testimonials</a></li>
<li><a href="{{root_path}}/about/audience.html">Our Audience</a></li>
<li><a href="{{root_path}}/about/biblio.html">Readings</a></li>
</ul>
</li>
<li id="nav-lessons" class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
Lessons
<b class="caret"></b>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href="{{root_path}}/4_0/index.html">Index</a></li>
<li><a href="{{root_path}}/4_0/vc/index.html">Version Control</a></li>
<li><a href="{{root_path}}/4_0/shell/index.html">The Shell</a></li>
<li><a href="{{root_path}}/4_0/python/index.html">Python</a></li>
<li><a href="{{root_path}}/4_0/test/index.html">Testing</a></li>
<li><a href="{{root_path}}/4_0/setdict/index.html">Sets and Dictionaries</a></li>
<li><a href="{{root_path}}/4_0/regexp/index.html">Regular Expressions</a></li>
<li><a href="{{root_path}}/4_0/databases/index.html">Databases</a></li>
<li><a href="{{root_path}}/4_0/access/index.html">Using Access</a></li>
<li><a href="{{root_path}}/4_0/data/index.html">Data</a></li>
<li><a href="{{root_path}}/4_0/oop/index.html">Object-Oriented Programming</a></li>
<li><a href="{{root_path}}/4_0/invperc/index.html">Program Design</a></li>
<li><a href="{{root_path}}/4_0/make/index.html">Make</a></li>
<li><a href="{{root_path}}/4_0/sysprog/index.html">Systems Programming</a></li>
<li><a href="{{root_path}}/4_0/spreadsheets/index.html">Spreadsheets</a></li>
<li><a href="{{root_path}}/4_0/matrix/index.html">Matrix Programming</a></li>
<li><a href="{{root_path}}/4_0/matlab/index.html">MATLAB</a></li>
<li><a href="{{root_path}}/4_0/media/index.html">Multimedia Programming</a></li>
<li><a href="{{root_path}}/4_0/softeng/index.html">Software Engineering</a></li>
<li><a href="{{root_path}}/4_0/essays/index.html">Essays</a></li>
</ul>
</li>
<li id="nav-bootcamps" class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
Boot Camps
<b class="caret"></b>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href="{{root_path}}/bootcamps/index.html#about">About</a></li>
<li><a href="{{root_path}}/bootcamps/conduct.html">Code of Conduct</a></li>
<li><a href="{{root_path}}/bootcamps/index.html#future">Upcoming Boot Camps</a></li>
<li><a href="{{root_path}}/bootcamps/index.html#map_canvas">Map</a></li>
<li><a href="{{root_path}}/bootcamps/index.html#calendar">Calendar</a></li>
<li><a href="{{root_path}}/bootcamps/index.html#past">Past Boot Camps</a></li>
<li><a href="{{root_path}}/bootcamps/how-to.html">How To Run a Boot Camp</a></li>
<li><a href="{{root_path}}/bootcamps/setup.html">Software Installation</a></li>
<li><a href="{{root_path}}/bootcamps/staffing.html">Staffing</a></li>
</ul>
</li>
<li id="nav-blog" class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
Blog
<b class="caret"></b>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href="{{root_path}}/blog/index.html#recent-posts">Recent Posts</a></li>
<li><a href="{{root_path}}/blog/index.html#all-posts">All Posts</a></li>
</ul>
</li>
<li id="nav-badges"><a href="{{root_path}}/badges/index.html">Badges</a></li>
</ul>
<form class="navbar-search pull-right" method="get" action="http://www.google.com/search">
<input type="hidden" name="sitesearch" value="{{site}}" />
<input name="q" type="text" class="search-query" placeholder="Search" />
</form>
</div>
</div>
</div>
</div>
{% block navhighlight %}{% endblock navhighlight %}
{% block files %}{% endblock files %}
<div class="row-fluid">
<div class="span10 offset1">
{% block title %}
<h1 class="title">{{page.title}}</h1>
{% endblock title %}
{% block details %}{% endblock details %}
{% block content %}{% endblock content %}
{% block comments %}{{disqus(page.title, page.filename)}}{% endblock comments %}
</div>
</div>
<div class="footer">
<a class="label swc-blue-bg"
href="{{facebook_url}}">Facebook</a>
<a class="label swc-blue-bg"
href="{{google_plus_url}}">Google+</a>
<a class="label swc-blue-bg"
href="https://twitter.com/swcarpentry">Twitter</a>
<a class="label swc-blue-bg"
href="https://github.com/swcarpentry">GitHub</a>
<a class="label swc-blue-bg"
href="http://software-carpentry.org/feed.xml">RSS</a>
<a class="label swc-blue-bg"
href="{{root_path}}/license.html">License</a>
<a class="bugreport label swc-blue-bg"
href="mailto:{{contact_email}}?subject=bug%20in%20{{filename}}">
Bug Report
</a>
</div>
</div>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="{{root_path}}/js/bootstrap/bootstrap.min.js"></script>
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-37305346-1']);
_gaq.push(['_setDomainName', 'software-carpentry.org']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>