-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathPrimitives.html
More file actions
791 lines (613 loc) · 31.2 KB
/
Primitives.html
File metadata and controls
791 lines (613 loc) · 31.2 KB
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
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Primitive Datatypes</title>
<meta name="description" content="">
<meta name="author" content="">
<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">
<!-- REVEAL CSS-->
<link rel="stylesheet" href="libs/reveal.js/font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="libs/reveal.js/3.8.0/css/reveal.css">
<link rel="stylesheet" href="libs/reveal.js/3.8.0/css/theme/night.css" id="theme">
<link rel="stylesheet" href="libs/reveal.js/3.8.0/plugin/title-footer/title-footer-mod.css" />
<!-- MERMAID-->
<script src="libs/reveal.js/3.8.0/plugin/mermaid/mermaid.min.js"></script>
<style>
.mermaid {
font-size: 0.5em;
}
</style>
<style>
[class*=task-list-item] {
min-height: 22px;
margin-top: 6px!important;
margin-bottom: 6px!important;
padding-left: 0;
list-style: none;
}
[class*=task-list-item]>input:first-child {
position: absolute!important;
opacity: 0;
margin: 0;
}
[class*=task-list-item]>label {
padding-left: 29px!important;
min-height: 22px;
line-height: 22px;
display: inline-block;
position: relative;
vertical-align: top;
margin-bottom: 0;
font-weight: 400;
cursor: pointer;
}
.task-list-item>input:first-child:checked+input[type=hidden]+label::before, .task-list-item>input:first-child:checked+label::before {
background-color: #ecf0f1;
border-color: #ecf0f1;
}
[class*=task-list-item]>input:first-child+input[type=hidden]+label::before, [class*=task-list-item]>input:first-child+label::before {
content: "";
display: inline-block;
position: absolute;
width: 22px;
height: 22px;
border: 1px solid #D3CFC8;
border-radius: 0;
margin-left: -29px;
}
[class*=task-list-item]>input:first-child:checked+input[type=hidden]+label::after, [class*=task-list-item]>input:first-child:checked+label::after {
content: "";
display: inline-block;
position: absolute;
top: 0;
left: 0;
width: 7px;
height: 10px;
border: 2px solid #fff;
border-left: none;
border-top: none;
transform: translate(7.75px,4.5px) rotate(45deg);
-ms-transform: translate(7.75px,4.5px) rotate(45deg);
}
.task-list-item>input:first-child:checked+input[type=hidden]+label::after, .task-list-item>input:first-child:checked+label::after {
border-bottom-color: #95a5a6;
border-right-color: #95a5a6;
}
</style>
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="libs/highlight.js/9.12.0/Monokai.css">
<!-- 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) ? 'libs/reveal.js/3.8.0/css/print/pdf.css' : 'libs/reveal.js/3.8.0/css/print/paper.css';
document.getElementsByTagName('head')[0].appendChild(link);
</script>
<style>
/* Solarized Light theme */
.line {
display: block;
}
.line.focus {
background: #fdf6e3;
color: #657b83;
}
/*
.line.focus .hljs-comment,
.line.focus .hljs-quote {
color: #93a1a1;
}
.line.focus .hljs-keyword,
.line.focus .hljs-selector-tag,
.line.focus .hljs-addition {
color: #859900;
}
.line.focus .hljs-number,
.line.focus .hljs-string,
.line.focus .hljs-meta .hljs-meta-string,
.line.focus .hljs-literal,
.line.focus .hljs-doctag,
.line.focus .hljs-regexp {
color: #2aa198;
}
.line.focus .hljs-title,
.line.focus .hljs-section,
.line.focus .hljs-name,
.line.focus .hljs-selector-id,
.line.focus .hljs-selector-class {
color: #268bd2;
}
.line.focus .hljs-attribute,
.line.focus .hljs-attr,
.line.focus .hljs-variable,
.line.focus .hljs-template-variable,
.line.focus .hljs-class .hljs-title,
.line.focus .hljs-type {
color: #b58900;
}
.line.focus .hljs-symbol,
.line.focus .hljs-bullet,
.line.focus .hljs-subst,
.line.focus .hljs-meta,
.line.focus .hljs-meta .hljs-keyword,
.line.focus .hljs-selector-attr,
.line.focus .hljs-selector-pseudo,
.line.focus .hljs-link {
color: #cb4b16;
}
.line.focus .hljs-built_in,
.line.focus .hljs-deletion {
color: #dc322f;
}
.line.focus .hljs-formula {
background: #eee8d5;
}
.line.focus .hljs-emphasis {
font-style: italic;
}
.line.focus .hljs-strong {
font-weight: bold;
}
.yellow-slide .line.focus:nth-child(2) {
background: yellow;
}
.reveal .slides section .code-presenting-annotation {
font-size: 70%;
}
*/
.reveal .slides section .fragment.current-only {
visibility: visible;
display: none;
}
.reveal .slides section .fragment.current-only.current-fragment {
display: block;
}
/*
.line {
display: block;
}
*/
.line.focus {
opacity: 1.0;
}
/* .hljs {
background: none;
} */
/* .reveal pre {
width: 98%;
margin: 0px;
box-shadow: none;
}
.reveal pre code {
font-size: 1.2em;
line-height: 1.2;
border-radius: 10px;
max-height: 60vh !important;
overflow: hidden !important;
} */
@media (device-width: 100vw) and (device-height: 100vh) {
.reveal pre code {
max-height: 50vh !important;
}
}
#logo img {
max-height: 3.5em;
max-width: none;
min-width: 50px;
}
.reveal .slides section .code-presenting-annotation {
color: white;
background: black;
padding: 0px 15px;
border-radius: 15px;
opacity: 0.75 !important;
font-size: 50% !important;
}
</style>
<script>
if (window.location.search.match(/print-pdf-now/gi)) {
window.print();
}
</script>
</head>
<body>
<div id="logo" style="position: fixed; top: 20px; left: 20px; z-index: 1">
<img src="https://raw.githubusercontent.com/HansUXdev/JavaScript-First/2acf5840c15af96602aceb66303ea69c5b75e344/logo.svg" />
</div>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section >
<link rel='stylesheet' href='theme.css'>
<style>
</style>
<h4><a id="user-content-learning-objectives" class="anchor" href="#learning-objectives" aria-hidden="true"></a>Learning Objectives</h4>
<ol>
<li>Identify primitive types and non-primitive objects with console</li>
<li>Explain the null bug and how to check for it.</li>
<li>Demonstrate conditional logic by creating JS functions to check the datatype</li>
</ol>
</section>
<section >
<h3><a id="user-content-primitive-types" class="anchor" href="#primitive-types" aria-hidden="true"></a>Primitive Types</h3>
<!-- Short Lecture -->
<pre><code class="language-javascript">let vUndefined;
const vNull = null;
const vString = "some text";
const vNumber = 10;
const vBoolean = false;
const vSymbol = Symbol('foo');
const vBigInt = BigInt(9007199254740991);
</code></pre>
<p class="fragment current-only" data-code-focus="1-2">These are annyoying types, JK, but you’ll see why…</p>
<p class="fragment current-only" data-code-focus="1-1">This is undefined.</p>
<p class="fragment current-only" data-code-focus="2-2">This is a null.</p>
<p class="fragment current-only" data-code-focus="3-3">This is a String.</p>
<p class="fragment current-only" data-code-focus="3-3">Strings can be “some text”, ‘some text’.</p>
<p class="fragment current-only" data-code-focus="3-3">Strings can also be <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals">template Strings</a> ` some text`.</p>
<p class="fragment current-only" data-code-focus="4-4">This is a Number.</p>
<p class="fragment current-only" data-code-focus="5-5">This is a Boolean.</p>
<p class="fragment current-only" data-code-focus="6-6">This is a Symbol.</p>
<p class="fragment current-only" data-code-focus="7-7">This is a BitInt.</p>
</section>
<section >
<h3><a id="user-content-what-is-console" class="anchor" href="#what-is-console" aria-hidden="true"></a>What is Console?</h3>
<p>A built in JavaScript method that outputs a message to the web console ot terminal.</p>
<ul>
<li>Read about it on <a href="https://developer.mozilla.org/en-US/docs/Web/API/Console/log">MDN</a>.</li>
</ul>
</section>
<section >
<h4><a id="user-content-using-console--typeof-operator" class="anchor" href="#using-console--typeof-operator" aria-hidden="true"></a>Using Console & Typeof Operator</h4>
<pre><code class="language-javascript">const vString = "some text";
console.log("\n Should be string: \n", typeof vString);
</code></pre>
<p>Students should:</p>
<p class="fragment current-only">Step 1: Inside <code>0-student_files</code> create a new file called <code>primitives.js</code> and type the following code into it.</p>
<p class="fragment current-only">Step 2: In terminal, type, <code>node primitives.js</code> and display the output.</p>
<!-- TEACHER PROMPT: Pause and have them show you -->
<p class="fragment current-only">Step 3: Google, “MDN console” and “MDN typeof”.</p>
<p class="fragment current-only">Step 4: In your own words, explain the code above and the purpose of <code>console</code> and <code>typeof</code>.</p>
</section>
<section >
<h4><a id="user-content-non-primitive-object-vs-array-object" class="anchor" href="#non-primitive-object-vs-array-object" aria-hidden="true"></a>Non-Primitive: Object VS Array Object</h4>
<pre><code class="language-javascript">const vObjectObj = {
property: "Value"
}
const vArrayObject = [
1,
2.1,
"string"
]
const shoppingList = [
"pizza",
"soda"
]
</code></pre>
<!-- These are a few of the most common non-primitive types. -->
<p class="fragment current-only" data-code-focus="1-1">This is an [Object Object].</p>
<p class="fragment current-only" data-code-focus="2-2">The <strong>Name</strong> is “property” and <strong>Value</strong> is “Value” .</p>
<p class="fragment current-only" data-code-focus="4-8">This is an [Array Object].</p>
<p class="fragment current-only" data-code-focus="5-7">Think of this as a list, it has three value.</p>
<p class="fragment current-only" data-code-focus="5-5">A <strong>number</strong>.</p>
<p class="fragment current-only" data-code-focus="6-6">A <strong>decimal</strong>.</p>
<p class="fragment current-only" data-code-focus="7-7">A <strong>string</strong>.</p>
</section>
<section >
<h4><a id="user-content-non-primitive-types-of-functions" class="anchor" href="#non-primitive-types-of-functions" aria-hidden="true"></a>Non-Primitive: Types of Functions</h4>
<pre><code class="language-javascript">function functionObject(params) {}
function* functionGenerator(params) {yield i;}
async function funAsync(params) {}
async function* funAsyncGenerator(params) {}
class ClassObj {}
</code></pre>
<p class="fragment current-only" data-code-focus="1-1">This is an Function Object.</p>
<p class="fragment current-only" data-code-focus="2-2">This is an <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*">Generator function</a>, it can be paused and continued like a play button.</p>
<p class="fragment current-only" data-code-focus="3-3">This is an <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/async_function">Async Function</a>, which returns a <strong>promise</strong>.</p>
<p class="fragment current-only" data-code-focus="4-4">This is an Async Generator Function, which returns a <strong>promise</strong>.</p>
<p class="fragment current-only" data-code-focus="5-5">This is an “Class”, which is syntax “sugar” for a <strong>function</strong>.</p>
<p class="fragment current-only" data-code-focus="5-5">Ignore this and pretend like it never came into existence… JK</p>
<p class="fragment current-only" data-code-focus="1-5">There are more types of functions and we’ll go over them more later…</p>
</section>
<section >
<h3><a id="user-content-what-is-function" class="anchor" href="#what-is-function" aria-hidden="true"></a>What is Function?</h3>
<p class="fragment">A function is block of reusable code to preform a task.</p>
<p class="fragment">First you create a function, then the function must be called in order to execute.</p>
<!-- First-class object... {.fragment} -->
</section>
<section >
<h3><a id="user-content-anatomy-of-functions" class="anchor" href="#anatomy-of-functions" aria-hidden="true"></a>Anatomy of functions</h3>
<p>What a function declaration looks like:</p>
<pre><code class="language-JavaScript">function add(param1, param2){
return param1 + param2;
};
add(1, 2) //return a value of 3
</code></pre>
<p>Has the following Features:</p>
<p class="fragment current-only" data-code-focus="1-3"><strong>Block Syntax</strong>, with <code>{}</code> at the begining and the end of the function and usually followed by a <code>;</code></p>
<div class="block">
<ul class="fragment current-only" data-code-focus="1-1">
<li><strong>Function</strong> keyword</li>
<li>Name of function, <code>add</code></li>
<li><strong>Parameters</strong> <code>(param1, param2)</code>, which act as variables inside the functions definition.</li>
</ul>
</div>
<p class="fragment current-only" data-code-focus="2-2"><strong>Return</strong> keyword, ends the function
and the result is returned</p>
<div class="block">
<ul class="fragment current-only" data-code-focus="4-4">
<li>
<p>Calling the Function</p>
</li>
<li>
<p>When the function is called, we pass values into the <strong>arguements</strong> <code>(1,2)</code></p>
</li>
</ul>
</div>
</section>
<section >
<h4><a id="user-content-knowledge-check-1" class="anchor" href="#knowledge-check-1" aria-hidden="true"></a>Knowledge Check 1</h4>
<h4><a id="user-content-whats-the-difference-between-parameters-and-arguements-" class="anchor" href="#whats-the-difference-between-parameters-and-arguements-" aria-hidden="true"></a>What’s the difference between <strong>parameters</strong> and <strong>arguements</strong> ?</h4>
<pre><code class="language-JavaScript">function add(param1, param2){
return param1 + param2;
};
add(1, 2) //return a value of 3
</code></pre>
<p class="fragment current-only" data-code-focus="1-3">Arguments are when you <strong>DEFINE the function</strong></p>
<p class="fragment current-only" data-code-focus="4-4">Arguments are when you <strong>CALL the function</strong></p>
</section>
<section >
<h4><a id="user-content-checking-primitive-types-with-if-statements" class="anchor" href="#checking-primitive-types-with-if-statements" aria-hidden="true"></a>Checking Primitive Types with <code>if</code> Statements</h4>
<pre><code class="language-javascript">let vUndefined;
const vNull = null;
const vString = "some text";
const vNumber = 10;
const vBoolean = false;
const vSymbol = Symbol('foo');
const vBigInt = BigInt(9007199254740991);
function LOGprimitive(VAR){
if (typeof VAR !=="object" && VAR !=="function" && VAR !==null && VAR !==undefined)
{
return console.log("\n PRIMITIVE: ", typeof VAR, "\n Value: ",VAR);
}
return console.log("\n NOT PRIMITIVE..")
}
LOGprimitive(vUndefined)
LOGprimitive(vNull)
LOGprimitive(vString)
LOGprimitive(vNumber)
LOGprimitive(vBoolean)
LOGprimitive(vSymbol)
LOGprimitive(vBigInt)
</code></pre>
<p class="fragment current-only" data-code-focus="1-8">Step 5: Inside <code>primitives.js</code>, delete the previous code and create test variables for each primative type.</p>
<!-- Teacher Prompt: When you are done, raise your digital hand -->
<p class="fragment current-only" data-code-focus="9-16">Step 6: Inside <code>primitives.js</code>, after our test variables, create a function called <code>LOGprimitive</code>.</p>
<p class="fragment current-only" data-code-focus="11-11">Step 7: The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof">typeof</a> operator is used check if it is anything other than a primitive.</p>
<p class="fragment current-only" data-code-focus="13-13">Step 8: we then <strong>return</strong> a console log of the value passed through the arguements</p>
<p class="fragment current-only" data-code-focus="15-15">Step 9: If any of those conditions are true, we say it’s not a primitive</p>
<p class="fragment current-only" data-code-focus="18-26">Step 7: Inside <code>primitives.js</code>, after our function, <code>LOGprimitive</code>, use the function to test our data.</p>
<p class="fragment current-only" data-code-focus="18-20">Step 8: Explain the error…</p>
</section>
<section >
</section>
</div>
</div>
<script src="libs/reveal.js/3.8.0/lib/js/head.min.js"></script>
<script src="libs/reveal.js/3.8.0/js/reveal.js"></script>
<script>
// More info https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
controlsTutorial: true,
controlsLayout: 'bottom-right',
controlsBackArrows: 'faded',
progress: true,
slideNumber: true,
history: true,
keyboard: true,
overview: true,
center: true,
touch: true,
loop: true,
rtl: false,
shuffle: false,
fragments: true,
fragmentInURL: false,
embedded: false,
help: true,
showNotes: false,
autoPlayMedia: false,
autoSlide: 50000,
autoSlideStoppable: true,
autoSlideMethod: Reveal.navigateNext,
defaultTiming: 120,
mouseWheel: false,
hideAddressBar: true,
previewLinks: false,
transition: 'slide',
transitionSpeed: 'default',
backgroundTransition: 'default',
viewDistance: 3,
parallaxBackgroundImage: '',
parallaxBackgroundSize: '',
parallaxBackgroundHorizontal: 0,
parallaxBackgroundVertical: 0,
display: 'block',
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
// { src: 'libs/reveal.js/3.8.0/lib/js/classList.js', condition: function () { return !document.body.classList; } },
// { src: 'libs/reveal.js/3.8.0/plugin/markdown/marked.js', condition: function () { return !!document.querySelector('[data-markdown]'); } },
// { src: 'libs/reveal.js/3.8.0/plugin/markdown/markdown.js', condition: function () { return !!document.querySelector('[data-markdown]'); } },
// { src: 'libs/reveal.js/3.8.0/plugin/highlight/highlight.js', async: true, callback: function () { hljs.initHighlightingOnLoad(); } },
{ src: 'libs/reveal.js/3.8.0/plugin/notes/notes.js', async: true },
{ src: 'libs/reveal.js/3.8.0/plugin/chart/Chart.min.js' },
{ src: 'libs/reveal.js/3.8.0/plugin/chart/csv2chart.js' },
{ src: 'libs/reveal.js/3.8.0/plugin/embed-tweet/embed-tweet.js' },
{ src: 'libs/reveal.js/3.8.0/plugin/math/math.js', async: true },
{ src: 'libs/highlight.js/9.12.0/highlight.js', async: true },
{ src: 'libs/reveal.js/3.8.0/plugin/anything/anything.js' },
{ src: 'libs/reveal.js/3.8.0/plugin/mermaid/mermaid.min.js', async: true, callback: function() {mermaid.initialize({startOnLoad:false})} },
{ src: 'libs/reveal.js/3.8.0/plugin/search/search.js', async: true },
{ src: 'libs/reveal.js/3.8.0/plugin/zoom-js/zoom.js', async: true },
{ src: 'libs/reveal.js/3.8.0/plugin/title-footer/title-footer.js', async: true, callback: function () { title_footer.initialize(); } },
{
src: 'libs/highlight.js/9.12.0/reveal-code-focus-1.0.0-mod.js',
async: true,
callback: function () {
RevealCodeFocus();
}
},
// { src: 'libs/reveal.js/3.8.0/plugin/reveal-code-focus/highlight.pack.js' },
// { src: 'libs/reveal.js/3.8.0/plugin/reveal-code-focus/reveal-code-focus.js', async: true, callback: function() { RevealCodeFocus(); } },
// {src: 'libs/reveal.js/3.8.0/plugin/line-numbers/line-numbers.js'}
]
,
keyboard: {
67: function () { RevealChalkboard.toggleNotesCanvas() }, // toggle notes canvas when 'c' is pressed
66: function () { RevealChalkboard.toggleChalkboard() }, // toggle chalkboard when 'b' is pressed
46: function () { RevealChalkboard.clear() }, // clear chalkboard when 'DEL' is pressed
8: function () { RevealChalkboard.reset() }, // reset chalkboard data on current slide when 'BACKSPACE' is pressed
68: function () { RevealChalkboard.download() }, // downlad recorded chalkboard drawing when 'd' is pressed
},
math: {
// mathjax: 'libs/reveal.js/3.8.0/plugin/math/MathJax.js',
mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js',
config: 'TeX-AMS_HTML-full'
},
chart: {
defaults: {
global: {
title: { fontColor: "#FFF" },
legend: {
position: "bottom",
labels: { fontColor: "#FFF" },
},
tooltips: {
labels: { fontColor: "#FFF" },
},
},
scale: {
scaleLabel: { fontColor: "#FFF" },
gridLines: { color: "#FFF", zeroLineColor: "#FFF" },
ticks: { fontColor: "#FFF" },
}
},
line: { borderColor: ["rgba(20,220,220,.8)", "rgba(220,120,120,.8)", "rgba(20,120,220,.8)"], "borderDash": [[5, 10], [0, 0]] },
bar: { backgroundColor: ["rgba(20,220,220,.8)", "rgba(220,120,120,.8)", "rgba(20,120,220,.8)"] },
pie: { backgroundColor: [["rgba(0,0,0,.8)", "rgba(220,20,20,.8)", "rgba(20,220,20,.8)", "rgba(220,220,20,.8)", "rgba(20,20,220,.8)"]] },
radar: { borderColor: ["rgba(20,220,220,.8)", "rgba(220,120,120,.8)", "rgba(20,120,220,.8)"] },
},
anything: [
{
className: "mermaid"
},
// ...
],
menu: {
// Specifies which side of the presentation the menu will
// be shown. Use 'left' or 'right'.
side: 'left',
// Specifies the width of the menu.
// Can be one of the following:
// 'normal', 'wide', 'third', 'half', 'full', or
// any valid css length value
width: 'normal',
// Add slide numbers to the titles in the slide list.
// Use 'true' or format string (same as reveal.js slide numbers)
numbers: false,
// Specifies which slide elements will be used for generating
// the slide titles in the menu. The default selects the first
// heading element found in the slide, but you can specify any
// valid css selector and the text from the first matching
// element will be used.
// Note: that a section data-menu-title attribute or an element
// with a menu-title class will take precedence over this option
titleSelector: 'h1, h2, h3, h4, h5, h6',
// If slides do not have a matching title, attempt to use the
// start of the text content as the title instead
useTextContentForMissingTitles: false,
// Hide slides from the menu that do not have a title.
// Set to 'true' to only list slides with titles.
hideMissingTitles: false,
// Adds markers to the slide titles to indicate the
// progress through the presentation. Set to 'false'
// to hide the markers.
markers: true,
// Specify custom panels to be included in the menu, by
// providing an array of objects with 'title', 'icon'
// properties, and either a 'src' or 'content' property.
// custom: false,
custom: [],
// Specifies the themes that will be available in the themes
// menu panel. Set to 'true' to show the themes menu panel
// with the default themes list. Alternatively, provide an
// array to specify the themes to make available in the
// themes menu panel, for example...
// [
// { name: 'Black', theme: 'css/theme/black.css' },
// { name: 'White', theme: 'css/theme/white.css' },
// { name: 'League', theme: 'css/theme/league.css' }
// ]
themes: false,
// Specifies the path to the default theme files. If your
// presentation uses a different path to the standard reveal
// layout then you need to provide this option, but only
// when 'themes' is set to 'true'. If you provide your own
// list of themes or 'themes' is set to 'false' the
// 'themesPath' option is ignored.
themesPath: 'css/theme/',
// Specifies if the transitions menu panel will be shown.
// Set to 'true' to show the transitions menu panel with
// the default transitions list. Alternatively, provide an
// array to specify the transitions to make available in
// the transitions panel, for example...
// ['None', 'Fade', 'Slide']
transitions: false,
// Adds a menu button to the slides to open the menu panel.
// Set to 'false' to hide the button.
openButton: true,
// If 'true' allows the slide number in the presentation to
// open the menu panel. The reveal.js slideNumber option must
// be displayed for this to take effect
openSlideNumber: false,
// If true allows the user to open and navigate the menu using
// the keyboard. Standard keyboard interaction with reveal
// will be disabled while the menu is open.
keyboard: true,
// Normally the menu will close on user actions such as
// selecting a menu item, or clicking the presentation area.
// If 'true', the sticky option will leave the menu open
// until it is explicitly closed, that is, using the close
// button or pressing the ESC or m key (when the keyboard
// interaction option is enabled).
sticky: false,
// If 'true' standard menu items will be automatically opened
// when navigating using the keyboard. Note: this only takes
// effect when both the 'keyboard' and 'sticky' options are enabled.
autoOpen: true,
// If 'true' the menu will not be created until it is explicitly
// requested by calling RevealMenu.init(). Note this will delay
// the creation of all menu panels, including custom panels, and
// the menu button.
delayInit: false,
// If 'true' the menu will be shown when the menu is initialised.
openOnInit: false,
// By default the menu will load it's own font-awesome library
// icons. If your presentation needs to load a different
// font-awesome library the 'loadIcons' option can be set to false
// and the menu will not attempt to load the font-awesome library.
loadIcons: false
},
chalkboard: {
toggleChalkboardButton: { left: "60px", bottom: "30px", top: "auto", right: "auto" },
toggleNotesButton: { left: "90px", bottom: "30px", top: "auto", right: "auto" },
}
});
</script>
</body>
</html>