-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
97 lines (78 loc) · 3.22 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
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="mc2/styles/index.css" id="theme">
<link rel="stylesheet" href="mc2/font/roboto/font-roboto.css">
<link rel="icon" type="image/x-icon" href="mc2/images/favicon.ico">
<!--[if lt IE 9]>
<script src="bower_components/reveal.js/lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="detailedoverview"><div><h4><span>1.</span> P.I.A.B.</h4><ol><li>Getting started</li><li>Solve</li><li>Logic</li><li>Feedback</li><li>Build</li><li>Context</li><li>Location</li><li>Time</li><li>Games</li><li>Hive mind</li><li>Level</li><li>Tools</li><li>Layers</li><li>Ecosystem</li></ol></div></div><div></div>
<div class="firstpage">
<div class="splash">
<h1></h1>
<p></p>
</div>
<div class="slideindex">
<div>
<div>
<a class="chapterlink" href="chapter1.html">
<span>1. </span>P.I.A.B.
</a>
</div>
</div>
</div>
</div>
<img class="logo" src="mc2/images/edument_logo_white_trq.svg">
<script type="text/javascript">
var activeLink;
current = 0;
function markLink(to){
if (activeLink){
activeLink.classList.remove("active");
}
current = parseInt(to);
activeLink = document.querySelectorAll(".chapterlink")[current];
activeLink.classList.add("active");
}
var nbrOfColumns = Math.ceil(1/5);
window.addEventListener("keydown",function(e){
var code = e.which || e.keyCode;
if (code === 13 || code === 32){ // enter key, go to selected chapter
window.location = activeLink.href;
} else if (code === 40){ // arrow down
markLink(current === 1-1 ? 0 : current + 1);
} else if (code === 38){ // arrow up
markLink(current === 0 ? 1-1 : current - 1);
} else if (code === 39 && 1 > 7) { // arrow right
var trgt = current + 5;
if ((trgt+1)/5 > nbrOfColumns){
trgt = trgt % (nbrOfColumns*5); // wrap to first column
}
else if (trgt >= 1) {
trgt = 1-1; // cap to last item in last column
}
markLink(trgt);
} else if (code === 37 && 1 > 7) { // arrow left
var trgt = (current + (nbrOfColumns*5) - 5) % (nbrOfColumns*5);
if (trgt >= 1) {
trgt = 1-1; // cap to last item in last column
}
markLink(trgt);
} else if (code >= 49 && code <= 1+48){ // digit 1-9, go to that chapter
window.location = document.querySelectorAll(".chapterlink")[code-49].href;
} else if (code === 73) { // Letter I
document.body.classList.toggle("showoverview");
}
});
markLink( (window.location.href.match(/\?from=(.)*$/)||[0,0])[1] );
</script>
</body>
</html>