-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
61 lines (47 loc) · 1.97 KB
/
index.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Crossknowledge</title>
<link rel="stylesheet" href="public/css/reveal.css">
<link rel="stylesheet" href="public/css/theme/white.css">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="public/lib/css/zenburn.css">
</head>
<body>
<div class="reveal">
<div id="subject" class="slides">
<section>[404] Subject not found =(</section>
</div>
</div>
<script src="public/lib/js/head.min.js"></script>
<script src="public/js/reveal.js"></script>
<script>
function getQueryStringValue (key) {
return unescape(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + escape(key).replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1"));
}
function doesFileExist(urlToFile) {
var xhr = new XMLHttpRequest();
xhr.open('HEAD', urlToFile, false);
xhr.send();
return xhr.status !== 404;
}
var subject = getQueryStringValue('subject');
var subjectUrl = 'subjects/' + subject + '/' + 'index.md';
if (doesFileExist(subjectUrl)) {
document.getElementById('subject').innerHTML = '<section data-markdown="' + subjectUrl + '" data-separator="^\n\n\n" data-separator-vertical="^\n\n" data-separator-notes="^Note:" data-charset="iso-8859-15"></section>';
document.title = document.title + ' - ' + subject;
}
Reveal.initialize({
history: true,
dependencies: [
{ src: 'public/plugin/markdown/marked.js' },
{ src: 'public/plugin/markdown/markdown.js' },
{ src: 'public/plugin/notes/notes.js', async: true },
{ src: 'public/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }
]
});
</script>
</body>
</html>