-
Notifications
You must be signed in to change notification settings - Fork 214
/
index.html
658 lines (598 loc) · 28.4 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
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Digital Twins go open source: Eclipse Ditto introduction</title>
<meta name="description" content="Virtual IoT Meetup - Digital Twins go open source: Eclipse Ditto introduction">
<meta name="author" content="Thomas Jäckle">
<meta name="date" content="2018-02-07">
<meta http-equiv="content-language" content="en">
<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">
<link rel="icon" type="image/png" href="../../images/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="../../images/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="../../images/favicon-96x96.png" sizes="96x96">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=News+Cycle">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0/css/reveal.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0/css/theme/simple.min.css" id="theme">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0/lib/css/zenburn.min.css">
<style>
@font-face {
font-family:"News Cycle";
}
#header-left {
position: absolute;
top: 0%;
left: 0%;
}
#header-right {
position: absolute;
top: 0%;
right: 0%;
}
.reveal section img {
background: none;
border: none;
box-shadow: none;
}
.dim-background .slide-background {
opacity: 0.3 !important;
/*background: none !important;*/ /* for printing ! */
/* print with: file:///C:/...../index.html?print-pdf */
}
.chapter-background .slide-background {
opacity: 0.7 !important;
/*background: none !important;*/ /* for printing ! */
}
.print-pdf .reveal .slide-background {
opacity: 0.7 !important;
}
.dim-background .slide-background.past {
display: none !important;
}
.dim-background .slide-background.future {
display: none !important;
}
.chapter-background .slide-background.past {
display: none !important;
}
.chapter-background .slide-background.future {
display: none !important;
}
/*.new-chapter h3 { color: #586e75; }*/
.introlink a:link {
font-weight: bold;
color: #000000
}
/* unvisited links */
.introlink a:visited {
font-weight: bold;
color: #000000
}
/* visited links */
.introlink a:hover {
font-weight: bold;
color: #000000
}
/* user hovers */
.introlink a:active {
font-weight: bold;
color: #000000
}
ul {
list-style: none !important;
}
ul li {
padding-left: 1.3em;
}
ul li:before {
list-style: none;
content: "→";
display: inline-block;
margin-left: -1.3em; /* same as padding-left set on li */
width: 1.3em; /* same as padding-left set on li */
}
.footer {
font-size: 12px !Important;
font-family: "News Cycle", Impact, sans-serif;
color: #687175;
position: absolute;
bottom: 15px;
left: 15px;
margin-bottom: 10px
}
.footer a {
color: #003b6a;
text-decoration: none;
}
/* active links */
</style>
<!-- Printing and PDF exports -->
<script>
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match(/print-pdf/gi) ? 'https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0/css/print/pdf.min.css' : 'https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0/css/print/paper.min.css';
document.getElementsByTagName('head')[0].appendChild(link);
</script>
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0/lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- 2. Create hidden header/footer <div> -->
<div id="hidden" style="display:none;">
<div id="header">
<div id="header-left"><img src="../../images/ditto.svg" style="width: 80px; padding-top: 10px; padding-left: 10px" alt="Ditto logo"></div>
<div id="header-right"><img src="../images/eclipse_iot_logo.png" style="width: 150px; padding-top: 10px; padding-right: 10px" alt="Eclipse IoT logo"></div>
</div>
</div>
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<!-- Section: Intro -->
<section>
<section id="title" class="new-chapter" data-background="../bg-images/background-twin-small.jpg" data-state="chapter-background">
<!-- background source: https://unsplash.com/collections/425779/iot -->
<br />
<h1 style="font-size: 3em;">Digital Twins go open source</h1>
<br/>
<h2>Eclipse Ditto introduction</h2>
<!--<h3>-</h3>-->
<!--<h2>new project introduction</h2>-->
<br style="clear: both"/>
<hr />
<small class="introlink">by <a
href="mailto:thomas.jaeckle@bosch-si.com">Thomas Jäckle</a> (<a
href="https://twitter.com/thjaeckle">@thjaeckle</a>)
</small>
</section>
<section id="agenda" class="new-chapter">
<h2>agenda</h2>
<br/>
<ol>
<li><a href="#motivation">Motivation</a></li>
<li><a href="#twin">Digital Twins</a></li>
<li><a href="#ditto">Ditto model + features</a></li>
<li><a href="#framework">A framework for Digital Twins</a></li>
<li><a href="#demo">Demo</a></li>
<li><a href="#wrap-up">Wrap up + Roadmap</a></li>
</ol>
</section>
</section>
<!-- Section: Motivation -->
<section style="clear: both;">
<section id="motivation" class="new-chapter" data-background="../bg-images/background-cloud-small.jpg"
data-state="chapter-background">
<!-- background source: http://wallpapercave.com/wp/WkziiJQ.jpg -->
<h1>Motivation</h1>
<br/>
<h2>turn physical devices into services</h2>
</section>
<section id="motivation-1" style="clear: both;">
<h2>IoT development needs in the back-end</h2>
<br/>
<!--<h3 style="text-align: left;">for IoT devices we need</h3>-->
<ul style="font-size: 0.9em;">
<li class="fragment"><b>APIs</b> optimized for the web</li>
<li class="fragment" style="margin-top: 0.5em;"><b>control</b> who has <b>access</b> to which aspects</li>
<li class="fragment" style="margin-top: 0.5em;"><b>directly</b> communicate to devices <b>and</b> access <b>last known</b> state</li>
<li class="fragment" style="margin-top: 0.5em;">get <b>notified</b> about changes/events</li>
<li class="fragment" style="margin-top: 0.5em;"><b>enhance</b> APIs with further functionality</li>
</ul>
</section>
<section id="motivation-2" style="clear: both;">
<h2>sounds complicated?</h2>
<br/>
<h3>let's find out if the Digital Twin pattern can help</h3>
<img src="../../images/ditto.svg" alt="Ditto logo" style="width: 200px">
</section>
</section>
<!-- Section: Digital Twins -->
<section style="clear: both;">
<section id="twin" class="new-chapter" data-background="../bg-images/background-twin-small.jpg"
data-state="chapter-background">
<!-- background source: https://unsplash.com/search/twin?photo=SmAiLn-nnJg -->
<h1>Digital Twins</h1>
<br/>
<h2>a mechanism for simplifying IoT solution development</h2>
</section>
<section id="twin-1" style="clear: both;">
<!-- background source: https://unsplash.com/search/cloud?photo=FIKD9t5_5zQ -->
<h2>Digital Twin metaphor</h2>
<br/>
<ul>
<li class="fragment" style="margin-top: 1em;">mirrors physical devices</li>
<li class="fragment" style="margin-top: 1em;">provider of aspects+services around devices</li>
<li class="fragment" style="margin-top: 1em;">keep real and digital worlds in sync</li>
<li class="fragment" style="margin-top: 1em;">applicable for both industrial and consumer-centric IoT scenarios</li>
</ul>
</section>
<section id="twin-2" style="clear: both;">
<!-- background source: https://unsplash.com/search/cloud?photo=FIKD9t5_5zQ -->
<h2>in IIoT / Industry 4.0</h2>
<br/>
<ul style="float:left; width: 52%;">
<li style="margin-top: 1em;">asset administration shell ("Verwaltungsschale")</li>
<li style="margin-top: 2em;">holistic view of all capabilities (services) and aspects of an asset</li>
</ul>
<div style="float:right; width: 40%;">
<img src="../images/asset-admin-shell.png" style="width: 80%" alt="Asset admin shell" />
<div style="font-size: 0.4em;"><a href="https://acplt.github.io/openAAS/AssetAdministrationShell.html">Source</a></div>
</div>
<!-- img source: https://acplt.github.io/openAAS/AssetAdministrationShell.html -->
</section>
</section>
<!-- Section: Ditto -->
<section style="clear: both;">
<section id="ditto" class="new-chapter" data-background="../bg-images/background-cloud-small.jpg"
data-state="chapter-background">
<!-- background source: http://wallpapercave.com/wp/WkziiJQ.jpg -->
<h1>Eclipse Ditto</h1>
<br/>
<h2>… where IoT devices and their digital twins get together</h2>
</section>
<section id="ditto-1" style="clear: both;">
<h2>in context</h2>
<img src="../images/ditto-in-action.png" style="width: 75%" alt="Ditto in action"/>
</section>
<section id="ditto-2" style="clear: both;">
<h2>domain model</h2>
<ul style="font-size: 0.8em;">
<li>how does the model of Eclipse Ditto look like?</li>
<li>KISS</li>
</ul>
<br />
<br />
<img src="../../images/pages/basic/ditto-class-diagram-v2.png" alt="Ditto class diagram v2" class="fragment"/>
<a href="https://www.eclipse.org/ditto/basic-overview.html#domain-model">→ docs</a>
</section>
<section id="ditto-3" style="clear: both;">
<h2>turn device data into API</h2>
<div style="text-align: left; float: left; width: 38%">
<pre style="width: 100%; font-size: 0.48em;"><code class="hljs json">{
"thingId": "namespace:car-1",
"acl": { ... },
"attributes": {
"manufacturer": "ACME corp",
"productionData": {
"serialNo": 4711
}
},
"features": {
"headlights": {
"properties": {
"on": false
}
}
}
}</code></pre>
</div>
<div style="text-align: left; float: right; width: 60%" class="fragment">
<pre style="width: 105%; font-size: 0.48em;"><code class="hljs">GET/PUT/DELETE /api/1/things/namespace:car-1
/api/1/things/namespace:car-1/thingId
/api/1/things/namespace:car-1/acl
/api/1/things/namespace:car-1/attributes
/api/1/things/namespace:car-1/attributes/manufacturer
/api/1/things/namespace:car-1/attributes/productionData
/api/1/things/namespace:car-1/attributes/productionData/serialNo
/api/1/things/namespace:car-1/features
/api/1/things/namespace:car-1/features/headlights
/api/1/things/namespace:car-1/features/headlights/properties
/api/1/things/namespace:car-1/features/headlights/properties/on
</code></pre>
<a href="https://www.eclipse.org/ditto/httpapi-concepts.html#endpoints" style="float: right;">→ docs</a>
</div>
</section>
<section id="ditto-4" style="clear: both">
<h2>Ditto Protocol API</h2>
<ul>
<li>JSON based text protocol for communicating with Digital Twins bidirectionally (commands/events)</li>
<li>via: WebSocket, AMQP 1.0 (e.g. Hono), AMQP 0.9.1</li>
</ul>
<pre style="width: 100%; font-size: 0.5em;"><code class="hljs json">{
"topic": "namespace/car-1/things/twin/events/modified",
"headers": { ... },
"path": "/features/headlights/properties",
"value": {
"on": true
},
"revision": 42
}</code></pre>
<a href="https://www.eclipse.org/ditto/protocol-overview.html" style="float: right;">→ docs</a>
</section>
<section id="ditto-5" style="clear: both">
<h2>access control</h2>
<div style="text-align: left; float: left; width: 48%">
<h3>API v1: ACL</h3>
<pre style="width: 100%; font-size: 0.5em;"><code class="hljs json">"acl": {
"ditto": {
"READ": true,
"WRITE": false,
"ADMINISTRATE": false
},
"adam": {
"READ": true,
"WRITE": true,
"ADMINISTRATE": true
}
}</code></pre>
<ul>
<li>inlined in Thing</li>
</ul>
</div>
<div style="text-align: left; float: right; width: 48%" class="fragment">
<h3>API v2: Policy</h3>
<pre style="width: 110%; font-size: 0.3em;"><code class="hljs">{
"policyId": "namespace:car-1-policy",
"entries": {
"owner": {
"subjects": {
"nginx:admin": {
"type": "nginx basic auth user"
}
},
"resources": {
"thing:/": {
"grant": ["READ","WRITE"],
"revoke": []
},
"thing:/features/firmware": {
"grant": [],
"revoke": ["WRITE"]
},
"policy:/": {
"grant": ["READ","WRITE"],
"revoke": []
}
}
}
}
}</code></pre>
<a href="https://www.eclipse.org/ditto/basic-auth.html#authorization" style="float: right;">→ docs</a>
</div>
</section>
<section id="ditto-6" style="clear: both;">
<h2>twin vs. live</h2>
<br/>
<div style="text-align: left; float: left; width: 48%">
<img src="../../images/pages/protocol/ditto-twin-channel.png" alt="Ditto twin channel" />
<ul style="font-size: 0.7em">
<li>uses Ditto as persistence</li>
<li>Ditto enforces access control</li>
<li>Ditto processes commands, emits events</li>
</ul>
</div>
<div style="text-align: left; float: right; width: 48%" class="fragment">
<ul style="font-size: 0.7em">
<li>uses Ditto as router</li>
<li>Ditto enforces access control</li>
<li>endpoints process commands, emit events</li>
</ul>
<img src="../../images/pages/protocol/ditto-live-channel.png" alt="Ditto live channel" />
<a href="https://www.eclipse.org/ditto/protocol-twinlive.html" style="float: right;">→ docs</a>
</div>
</section>
<section id="ditto-7" style="clear: both;">
<h2>get notified about changes</h2>
<br/>
<div style="text-align: left; float: left; width: 48%">
<h3>via WebSocket</h3>
<pre style="width: 100%; font-size: 0.5em;"><code class="hljs javascript">var ws = new WebSocket(
"ws://u:p@ditto.eclipseprojects.io/ws/1");
ws.onopen = function(w) {
w.send('START-SEND-EVENTS');
};
ws.onmessage = function(msg) {
console.log('received: ' + msg.data);
};</code></pre>
<ul style="font-size: 0.7em">
<li>bidirectionally send/receive Ditto Protocol messages</li>
</ul>
<a href="https://www.eclipse.org/ditto/httpapi-protocol-bindings-websocket.html" style="float: right;">→ docs</a>
</div>
<div style="text-align: left; float: right; width: 48%" class="fragment">
<h3>via SSEs</h3>
<pre style="width: 100%; font-size: 0.5em;"><code class="hljs">var source = new EventSource(
"/api/1/things?ids=namespace:car-1");
source.onmessage = function(msg) {
console.log('received: ' + msg.data);
};</code></pre>
<ul style="font-size: 0.7em">
<li>unidirectionally receive changes in Thing JSON form</li>
</ul>
<a href="https://www.eclipse.org/ditto/httpapi-sse.html" style="float: right;">→ docs</a>
</div>
</section>
<section id="ditto-8" style="clear: both;">
<h2>search</h2>
<br/>
<div style="text-align: left; float: left; width: 40%">
<img src="../images/meme-dino.jpg" style="width: 80%;" alt="Meme Dino" />
<ul style="font-size: 0.7em">
<li>you must not</li>
<li>Ditto has you covered</li>
</ul>
</div>
<div style="text-align: left; float: right; width: 60%" class="fragment">
<pre style="width: 100%; font-size: 0.5em;"><code class="hljs javascript">GET /api/1/search/things
?filter=like(attributes/manufacturer,"ACME*")</code></pre>
<pre style="width: 100%; font-size: 0.5em;" class="fragment"><code class="hljs javascript">GET /api/1/search/things
?filter=and(
exists(attributes/manufacturer),
eq(features/headlights/properties/on,true)
)
&namespaces=org.eclipse.ditto
&option=sort(-attributes/manufacturer)
&fields=thingId,attributes/manufacturer,_modified</code></pre>
</div>
<div class="fragment">
<ul style="font-size: 0.7em">
<li>search for arbitrary data with RQL query</li>
<li>Ditto enforces access control</li>
<li>apply field projection over the results</li>
<li>don't worry about indexing</li>
</ul>
<a href="https://www.eclipse.org/ditto/basic-search.html" style="float: right;">→ docs</a>
</div>
</section>
<section id="ditto-9" style="clear: both;">
<h2>nonfunctional</h2>
<br/>
<div style="text-align: left; float: left; width: 48%">
<img src="../../images/pages/architecture/context-overview.png" alt="Ditto context overview" />
</div>
<div style="text-align: left; float: right; width: 52%">
<ul style="font-size: 0.8em">
<li >modular architecture of Ditto services</li>
<li style="margin-top: 0.5em;">horizontal scalability of each Ditto service</li>
<li style="margin-top: 0.5em;">runtime dependency to only MongoDB</li>
<li style="margin-top: 0.5em;">included monitoring (JVM metrics, roundtrips, MongoDB)</li>
<li style="margin-top: 0.5em;">prepared for operations (e.g. via devops commands)</li>
</ul>
</div>
</section>
</section>
<!-- Section: A framework for Digital Twins -->
<section style="clear: both;">
<section id="framework" class="new-chapter" data-background="../bg-images/background-framework-small.jpg"
data-state="chapter-background">
<!-- img background: https://unsplash.com/photos/FO7bKvgETgQ -->
<h1>A framework for Digital Twins</h1>
<br/>
<h2>acting as a Twin orchestrator</h2>
</section>
<section id="framework-1" style="clear: both;">
<h2>orchestration via messages</h2>
<br/>
<div style="text-align: left; float: left; width: 38%">
<ul style="font-size: 0.7em">
<li>Ditto as router of messages (via "live" channel)</li>
<li>enforcement of access control</li>
<li>correlation of command/response (e.g. for HTTP)</li>
<!--<li>device-to-cloud,cloud-to-device,device-to-device,cloud-to-cloud</li>-->
</ul>
</div>
<div style="text-align: left; float: right; width: 58%">
<img src="../../images/pages/basic/ditto-messages.png" alt="Ditto messages" />
</div>
<ul>
<li>enhance the API of a Digital Twin by a custom WebSocket consumer</li>
</ul>
</section>
<section id="framework-2" style="clear: both;">
<h2>examples for orchestrations</h2>
<br/>
<ul style="font-size: 0.9em;">
<li>enhance a location-aware Twin with the current weather</li>
<li>enhance a Twin with an API for its known spare parts</li>
</ul>
<br/>
<br/>
<img src="../images/ditto-orchestration-examples.png" style="width: 60%" alt="Ditto orchestration example" />
</section>
</section>
<!-- Section: Demo -->
<section style="clear: both;">
<section id="demo" class="new-chapter" data-background="../bg-images/background-demo-small.jpg" data-state="chapter-background">
<h1>Demo time!</h1>
</section>
</section>
<!-- Section: Wrap up + Roadmap -->
<section style="clear: both;">
<section id="wrap-up">
<h1>Wrap up</h1>
<br/>
<ul>
<li class="fragment">Digital Twins as pattern for simplifying IoT back-end development</li>
<li class="fragment" style="margin-top: 1em;">Mission: provide Device-as-a-Service</li>
<li class="fragment" style="margin-top: 1em;">Eclipse Ditto as framework for Digital Twins</li>
</ul>
</section>
<section id="wrap-up-1" style="clear: both;">
<h2>Roadmap 2018</h2>
<br/>
<ul>
<li>release (non-milestone)</li>
<li style="margin-top: 1em;">using <b>Eclipse Vorto</b> generator for validation</li>
<li style="margin-top: 1em;">mapping raw payloads to/from Ditto Protocol</li>
<li style="margin-top: 1em;">attracting IoT developers in using Ditto</li>
<li style="margin-top: 1em;">integration with other OSS projects</li>
</ul>
</section>
</section>
<!-- Section: Questions and Answers -->
<section style="clear: both;">
<section id="q-a" class="new-chapter" data-background="../bg-images/background-conclusion-small.jpg"
data-state="chapter-background">
<h1>Q & A</h1>
<br/>
<h3>thanks for attending</h3>
<br/>
<br/>
<a href="https://www.eclipse.org/ditto/feedback.html">reach out to the Ditto team</a>
</section>
</section>
</div>
</div>
<div class="footer">
Copyright ©2018
<a href="https://www.bosch-si.com" target="_blank">Bosch Software Innovations GmbH</a> All rights reserved. |
<a href="https://www.bosch.com/terms-of-use/terms-of-use/provider/" target="_blank">Imprint</a> |
<a href="https://www.eclipse.org/ditto/intro-overview.html" target="_blank">Documentation</a> |
<a href="https://github.com/eclipse-ditto/ditto" target="_blank">GitHub</a> |
<a href="https://ditto.eclipseprojects.io" target="_blank">Sandbox</a>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0/lib/js/head.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0/js/reveal.min.js"></script>
<script>
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
// More info https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
fragments: getParameterByName('fragments') === '', // only use "fragments" feature if queryParam 'fragments' is present
slideNumber: 'h.v',
transition: 'convex', // none/fade/cube/slide/convex/concave/zoom
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
{ src: 'https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0/plugin/markdown/markdown.min.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0/plugin/highlight/highlight.min.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0/plugin/zoom-js/zoom.min.js', async: true },
{ src: 'https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0/plugin/notes/notes.min.js', async: true }
]
// keyboard: { // for hama remote presenter:
// 38: 'next',
// 40: 'prev'
// }
});
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script type="text/javascript">
// 3. On Reveal.js ready event, copy header/footer <div> into each `.slide-background` <div>
var header = $('#header').html();
if ( window.location.search.match( /print-pdf/gi ) ) {
Reveal.addEventListener( 'ready', function( event ) {
$('.slide-background').append(header);
});
}
else {
$('div.reveal').append(header);
}
</script>
</body>
</html>