-
Notifications
You must be signed in to change notification settings - Fork 11
/
index.html
386 lines (371 loc) · 11.9 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
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
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
<!DOCTYPE html>
<html>
<head>
<title>Ruban</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="components/normalize-css/normalize.css" />
<link rel="stylesheet" href="components/font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" href="components/highlightjs/styles/tomorrow.css" />
<link rel="stylesheet" href="css/ruban-dev.css" />
<link rel="stylesheet" href="css/ruban-print-dev.css" media="print" />
<style>
section {
border-left: 1em solid #434343;
border-right: 1em solid #434343;
}
.pagination {
right: 2.6em;
}
pre code {
background-color: inherit;
}
pre .xml .javascript {
opacity: 1;
}
#examples ul {
padding-left: 0;
}
#getting-started-unleash-your-power {
color: white;
background-color: #0071B5;
border-color: white;
}
#getting-started-unleash-your-power strong {
text-shadow: 0.06em 0.06em 0 #0071B5, 0.07em 0.07em 0 #fff;
}
</style>
</head>
<body>
<section id="ruban">
<pre style="text-align: center; font-family: 'Source Code Pro';">
| R |
| U |
| B |
| A |
| N |
</pre>
</section>
<section id="parading-on-a-ruban" class="no-toc">
<h1>Your slides parading on a <strong>ruban</strong>!</h1>
</section>
<section id="table-of-contents" class="toc">
<h1>Table of Contents</h1>
</section>
<section id="installation">
<h1><i class="fa fa-download"></i> Installation</h1>
</section>
<section id="installation-alternatives">
<h1>Alternatives</h1>
<ul>
<li><a href="#/installation-quickstart">Using a quickstart archive</a></li>
<li><a href="#/installation-bower">Using Bower</a></li>
</ul>
</section>
<section id="installation-quickstart">
<h1>Quickstart</h1>
<ol>
<li><a href="https://github.com/loicfrering/ruban/archive/v0.3.2-quickstart.zip" title="Ruban Quickstart">Download the quickstart distribution</a></li>
<li>Extract the archive</li>
<li>Start editing the index.html!</li>
</ol>
</section>
<section id="installation-bower">
<h1>Using Bower</h1>
<p><code>$ bower install ruban --save</code></p>
<p>Create an index.html file with the following content <a href="#/installation-bower-html" title="See HTML"><i class="fa fa-level-down"></i></a></p>
</section>
<section id="installation-bower-html">
<pre><code style="font-size: 30%;"><!DOCTYPE html>
<html>
<head>
<title>I &lt;3 Ruban</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="bower_components/normalize-css/normalize.css" />
<link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" href="bower_components/highlightjs/styles/tomorrow.css" />
<link rel="stylesheet" href="bower_components/ruban/css/ruban.min.css" />
<link rel="stylesheet" href="bower_components/ruban/css/ruban-print.min.css" media="print" />
</head>
<body>
<strong><section></strong>
<strong><h1>My Awesome Presentation</h1></strong>
<strong></section></strong>
<script src="bower_components/jquery/jquery.min.js"></script>
<script src="bower_components/keymaster/keymaster.js"></script>
<script src="bower_components/hammerjs/hammer.min.js"></script>
<script src="bower_components/highlightjs/highlight.pack.js"></script>
<script src="bower_components/ruban/js/ruban.min.js"></script>
<script>
<strong>new Ruban();</strong>
</script>
</body>
</html>
</code></pre>
</section>
<section id="getting-started">
<h1><i class="fa fa-rocket"></i> Getting started</h1>
</section>
<section id="getting-started-sections">
<h1>Getting started</h1>
<ul>
<li>Slides are just <strong><sections></strong></li>
<li>Fill these sections with HTML</li>
<li><i class="fa fa-globe"></i> Open your browser & enjoy!</li>
</ul>
<pre><code><section id="getting-started-sections">
<h1>Getting started</h1>
<ul>
<li>Slides are just &lt;sections&gt;</li>
<li>Fill these sections with HTML</li>
<li>Open your browser and enjoy!</li>
</ul>
</section>
</code></pre>
</section>
<section id="getting-started-unleash-your-power" class="no-toc">
<h1>Unleash your <strong>HTML</strong> and <strong>CSS</strong> power!</h1>
</section>
<section id="getting-started-font-awesome" class="no-toc">
<h1>
Enjoy<br />
<a href="http://fortawesome.github.io/Font-Awesome/" title="Font Awesome"><i class="fa fa-flag"></i> Font Awesome</a>
</h1>
</section>
<section id="getting-started-examples" class="no-toc">
<h1>Look at the <strong><a href="#/examples" title="Examples">examples</a></strong></h1>
</section>
<section id="features">
<h1><i class="fa fa-star-o"></i> Features</h1>
</section>
<section id="toc">
<h1>Table of Contents</h1>
<ul>
<li>Auto-generated Table of Contents</li>
<li>Selects sections with a h1 as unique child</li>
<li>Exclude sections with the no-toc class</li>
</ul>
<pre style="margin-bottom: 0;"><code class="xml"><section class="toc">
</section>
<section>
<h1>First title</h1>
</section>
<section>
<h1>Second title</h1>
</section>
</code></pre>
</section>
<section id="bookmarkable-urls">
<h1>Bookmarkable URLs</h1>
<ul>
<li>Just add an id to the section!</li>
</ul>
<pre><code><section id="about-dinosaurs">
<h1>About dinosaurs</h1>
</section>
</code></pre>
</section>
<section id="pagination">
<h1>Pagination</h1>
<ul>
<li>When will this boring presentation end?</li>
</ul>
<pre><code class="javascript">new Ruban({
pagination: true
});
</code></pre>
</section>
<section id="steps">
<h1>Steps</h1>
<ul class="steps">
<li>Make your point</li>
<li>Step by step</li>
<li>
<pre><code class="xml"><section>
<h1>Steps</h1>
<ul class="steps">
<li>Make your point</li>
<li>Step by step</li>
</ul>
</section>
</code></pre>
</li>
</ul>
</section>
<section id="fits-your-screen">
<h1>Fits your screen</h1>
<ul>
<li>Automatically adjust the size to your screen</li>
<li>Just use relative units in your CSS (em, %)</li>
<li>Choose your ratio: 4/3, 16/9, IMAX anyone?</li>
</ul>
<pre><code class="javascript">new Ruban({
ratio: 16/9
});
</code></pre>
</section>
<section id="events">
<h1>Events</h1>
<ul>
<li>Add some dynamic behavior to your slides!</li>
<li>Listen for active & inactive events</li>
</ul>
<pre><code class="javascript">$('#events').on({
active: function() {
$(this).find('h1').stop()
.animate({marginLeft: '2em'}, 2000);
},
inactive:function() {
$(this).find('h1').stop()
.animate({marginLeft: 0});
}
});
</code></pre>
</section>
<section id="details">
<h1>Details</h1>
<ul>
<li>
Add details & speaker notes to your slides
<ul>
<li>Hidden on the Ruban</li>
<li>Displayed in the printed version</li>
</ul>
</li>
</ul>
<pre><code><details open="open">
<summary>Notes</summary>
<p>
You can write down your comments here.
They will be available in the printed version.
</p>
</details>
</code></pre>
<details open="open">
<summary>Notes</summary>
<p>You can write down your comments here. They will be available in the printed version.</p>
</details>
</section>
<section id="options">
<h1><i class="fa fa-wrench"></i> Options</h1>
</section>
<section id="options-usage">
<h1>Options</h1>
<p>Pass options to the constructor</p>
<pre><code class="javascript">var ruban = new Ruban({
ratio: 16/9,
pagination: true
});
</code></pre>
</section>
<section id="options-list">
<h1>Options</h1>
<dl style="font-size: 50%;">
<dt><strong>ratio</strong> (default: 4/3)</dt>
<dd>The desired ratio for your slides</dd>
<dt><strong>minPadding</strong> (default: '0.4em')</dt>
<dd>The minimum padding around your slides</dd>
<dt><strong>transitionDuration</strong> (default: '1s')</dt>
<dd>The duration of the ruban's scrolling effect</dd>
<dt><strong>pagination</strong> (default: false)</dt>
<dd>If the pagination should be enabled or not</dd>
<dt><strong>stripHtmlInToc</strong> (default: false)</dt>
<dd>Should HTML tags be stripped when generating the TOC</dd>
<dt><strong>bindClicks</strong> (default: false)</dt>
<dd>
Use left and right clicks to navigate through the ruban.<br />
Be aware that it prevents selecting text and opening the contextual menu.
</dd>
<dt><strong>bindMouseWheel</strong> (default: false)</dt>
<dd>Use the mouse wheel to navigate through the ruban.</dd>
</dl>
</section>
<section id="examples">
<h1><i class="fa fa-tag"></i> Examples</h1>
</section>
<section id="examples-list">
<h1>Examples</h1>
<ul>
<li>
<i class="fa fa-asterisk"></i>
<a href="http://loicfrering.github.io/ruban/" title="This documentation">This documentation</a>
(<a href="https://github.com/loicfrering/ruban/blob/master/index.html" title="Source on GitHub">src</a>)
</li>
<li>
<i class="fa fa-asterisk"></i>
<a href="http://loicfrering.github.io/mixit13/" title="Backbone, Ember et Angular sont dans un bateau...">Backbone, Ember et Angular</a>
(<a href="https://github.com/loicfrering/mixit13" title="Source on GitHub">src</a>)
</li>
</ul>
</section>
<section id="fork-me">
<h1><i class="fa fa-github"></i> <a href="https://github.com/loicfrering/ruban" title="Fork me on GitHub">Fork me on GitHub!</a></h1>
</section>
<section id="contributing">
<h1>Contributing</h1>
<ol style="font-size: 70%;">
<li>Install <a href="http://nodejs.org/download/" title="Download Node.js">Node.js</a></li>
<li>
Clone the project and cd into it
<pre><code class="bash">$ git://github.com/loicfrering/ruban.git && cd ruban/
</code></pre>
</li>
<li>
Install dependencies:
<pre><code class="bash">$ npm install -g grunt-cli
$ npm install
$ bower install
</code></pre>
</li>
<li>
Compile and watch coffee and less sources:
<pre><code class="bash">$ grunt
</code></pre>
<li>Start implementing amazing features!</li>
<li>Open a Pull Request to share the <i class="fa fa-heart"></i></li>
</ol>
</section>
<script src="components/jquery/jquery.min.js"></script>
<script src="components/keymaster/keymaster.js"></script>
<script src="components/hammerjs/hammer.min.js"></script>
<script src="components/highlightjs/highlight.pack.js"></script>
<script src="js/ruban-dev.js"></script>
<script>
function asciiRuban(current) {
var ruban = '';
for (var i = 0; i < 5; i++) {
if (i === current) {
ruban += '[| ' + 'RUBAN'[i] + ' |]';
} else {
ruban += '| ' + 'RUBAN'[i] + ' |';
}
ruban += '\n';
}
return ruban;
}
var timeoutId, i = 0;
$('#ruban').on({
active: function() {
var $pre = $(this).find('pre');
timeoutId = setInterval(function() {
var ruban = asciiRuban(i++ % 6);
$pre.html(ruban);
}, 1000);
},
inactive: function() {
clearInterval(timeoutId);
}
});
$('#events').on({
active: function() {
$(this).find('h1').stop().animate({marginLeft: '2em'}, 2000);
},
inactive:function() {
$(this).find('h1').stop().animate({marginLeft: 0});
}
});
var ruban = new Ruban({
pagination: true
});
</script>
</body>
</html>