-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
177 lines (148 loc) · 5.83 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=1024, user-scalable=no">
<title>Your deck.js Presentation</title>
<!-- Required stylesheet -->
<link rel="stylesheet" href="deckjs/core/deck.core.css">
<!-- Extension CSS files go here. Remove or add as needed. -->
<link rel="stylesheet" href="deckjs/extensions/goto/deck.goto.css">
<link rel="stylesheet" href="deckjs/extensions/menu/deck.menu.css">
<link rel="stylesheet" href="deckjs/extensions/navigation/deck.navigation.css">
<link rel="stylesheet" href="deckjs/extensions/status/deck.status.css">
<link rel="stylesheet" href="deckjs/extensions/hash/deck.hash.css">
<link rel="stylesheet" href="deckjs/extensions/scale/deck.scale.css">
<!-- Style theme. More available in /themes/style/ or create your own. -->
<link rel="stylesheet" href="deckjs/themes/style/web-2.0.css">
<!-- Transition theme. More available in /themes/transition/ or create your own. -->
<!-- <link rel="stylesheet" href="deckjs/themes/transition/horizontal-slide.css"> -->
<!-- Required Modernizr file -->
<script src="deckjs/modernizr.custom.js"></script>
<!-- Syntax highlighting -->
<link type="text/css" rel="stylesheet" href="syntaxhighlighter_3.0.83/styles/shCoreDefault.css"/>
<script type="text/javascript" src="syntaxhighlighter_3.0.83/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter_3.0.83/scripts/shBrushCpp.js"></script>
<script type="text/javascript" >
/*
To include code snippet
Use an invisible pre tag put the code in it and give it an id.
Within the slide create an empty container element for the code and
give it a class name of 'cbox'. Append further arguments of syntax
highlighting to this class name itself.
http://alexgorbatchev.com/SyntaxHighlighter/manual/configuration/
*/
function highlightCode(sel) {
if (sel == undefined) return;
var className = new String($(sel).attr('class'));
if (className == 'undefined') return;
if (className.search(/.*cbox\s+\w+/) == -1) {
alert('Error in '+ className);
return;
}
var tmp = className.replace(/.*cbox\s+/,'');
var codeid = tmp.match(/^\w+/)[0];
var sh_params = tmp.replace(/^\w+\s*/,'');
var content = '<pre class="'+sh_params+'">'+$('#'+codeid).html()+'</pre>';
$(sel).html(content);
SyntaxHighlighter.highlight();
}
function cbox_init() {
SyntaxHighlighter.all();
$(document).bind('deck.change', function(event, from, to) {
if (from < to) {
highlightCode('.deck-next .cbox');
}
else {
highlightCode('.deck-previous .cbox');
}
});
$(document).bind('deck.beforeInit', function() {
highlightCode('.cbox:first');
});
}
document.addEventListener("DOMContentLoaded", cbox_init, false);
</script>
</head>
<body class="deck-container">
<!-- Put all the code snippets together -->
<pre id="code_main" style="display:none;">
int main()
{
int a;
printf("Hello world");
}
</pre>
<pre id="code_success" style="display:none;">
void success()
{
return NULL;
}
</pre>
<!-- Begin slides. Just make elements with a class of slide. -->
<section class="slide">
<h2>Oh, this code !</h2>
<div class="slide cbox code_main brush:c; highlight:[1,2];" style="width:50%; float: right;"></div>
<ul class="slide">
<li>Code is on the right</li>
<li>Line 2 is about ...</li>
</ul>
</section>
<section class="slide">
<h1>Content</h1>
</section>
<section class="slide">
<h2>Here, I explain each line ...</h2>
<div style="width:50%;">
This is a function as the header line shows.
</div>
<div class="cbox code_success brush:c; first-line: 19; highlight:[19]; " style="width:50%; float: right;"></div>
</section>
<section class="slide">
<h2>Here, I explain each line ...</h2>
<div style="width:50%;">
This line is different ..
</div>
<div class="cbox code_success brush:c; first-line: 19; highlight:[20]; " style="width:50%; float: right;"></div>
</section>
<!-- End slides. -->
<!-- Begin extension snippets. Add or remove as needed. -->
<!-- deck.navigation snippet -->
<a href="#" class="deck-prev-link" title="Previous">←</a>
<a href="#" class="deck-next-link" title="Next">→</a>
<!-- deck.status snippet -->
<p class="deck-status">
<span class="deck-status-current"></span>
/
<span class="deck-status-total"></span>
</p>
<!-- deck.goto snippet -->
<form action="." method="get" class="goto-form">
<label for="goto-slide">Go to slide:</label>
<input type="text" name="slidenum" id="goto-slide" list="goto-datalist">
<datalist id="goto-datalist"></datalist>
<input type="submit" value="Go">
</form>
<!-- deck.hash snippet -->
<a href="." title="Permalink to this slide" class="deck-permalink">#</a>
<!-- End extension snippets. -->
<!-- Required JS files. -->
<script src="deckjs/jquery-1.7.2.min.js"></script>
<script src="deckjs/core/deck.core.js"></script>
<!-- Extension JS files. Add or remove as needed. -->
<script src="deckjs/core/deck.core.js"></script>
<script src="deckjs/extensions/hash/deck.hash.js"></script>
<script src="deckjs/extensions/menu/deck.menu.js"></script>
<script src="deckjs/extensions/goto/deck.goto.js"></script>
<script src="deckjs/extensions/status/deck.status.js"></script>
<script src="deckjs/extensions/navigation/deck.navigation.js"></script>
<script src="deckjs/extensions/scale/deck.scale.js"></script>
<!-- Initialize the deck. You can put this in an external file if desired. -->
<script>
$(function() {
$.deck('.slide');
});
</script>
</body>
</html>