starterlog-theme 1.1.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +52 -8
  3. data/_layouts/slide.html +105 -0
  4. data/_pages/profile/index.html +1 -1
  5. data/_pages/start/index.html +7 -2
  6. data/assets/modules/reveal.js/.gitignore +13 -0
  7. data/assets/modules/reveal.js/.travis.yml +5 -0
  8. data/assets/modules/reveal.js/CONTRIBUTING.md +23 -0
  9. data/assets/modules/reveal.js/Gruntfile.js +187 -0
  10. data/assets/modules/reveal.js/LICENSE +19 -0
  11. data/assets/modules/reveal.js/README.md +1185 -0
  12. data/assets/modules/reveal.js/bower.json +27 -0
  13. data/assets/modules/reveal.js/css/print/paper.css +203 -0
  14. data/assets/modules/reveal.js/css/print/pdf.css +171 -0
  15. data/assets/modules/reveal.js/css/reveal.css +1365 -0
  16. data/assets/modules/reveal.js/css/reveal.scss +1446 -0
  17. data/assets/modules/reveal.js/css/theme/README.md +21 -0
  18. data/assets/modules/reveal.js/css/theme/beige.css +296 -0
  19. data/assets/modules/reveal.js/css/theme/black.css +292 -0
  20. data/assets/modules/reveal.js/css/theme/blood.css +315 -0
  21. data/assets/modules/reveal.js/css/theme/league.css +298 -0
  22. data/assets/modules/reveal.js/css/theme/moon.css +296 -0
  23. data/assets/modules/reveal.js/css/theme/night.css +290 -0
  24. data/assets/modules/reveal.js/css/theme/serif.css +292 -0
  25. data/assets/modules/reveal.js/css/theme/simple.css +295 -0
  26. data/assets/modules/reveal.js/css/theme/sky.css +299 -0
  27. data/assets/modules/reveal.js/css/theme/solarized.css +296 -0
  28. data/assets/modules/reveal.js/css/theme/source/beige.scss +39 -0
  29. data/assets/modules/reveal.js/css/theme/source/black.scss +49 -0
  30. data/assets/modules/reveal.js/css/theme/source/blood.scss +78 -0
  31. data/assets/modules/reveal.js/css/theme/source/league.scss +34 -0
  32. data/assets/modules/reveal.js/css/theme/source/moon.scss +57 -0
  33. data/assets/modules/reveal.js/css/theme/source/night.scss +34 -0
  34. data/assets/modules/reveal.js/css/theme/source/serif.scss +35 -0
  35. data/assets/modules/reveal.js/css/theme/source/simple.scss +43 -0
  36. data/assets/modules/reveal.js/css/theme/source/sky.scss +46 -0
  37. data/assets/modules/reveal.js/css/theme/source/solarized.scss +63 -0
  38. data/assets/modules/reveal.js/css/theme/source/white.scss +49 -0
  39. data/assets/modules/reveal.js/css/theme/template/mixins.scss +29 -0
  40. data/assets/modules/reveal.js/css/theme/template/settings.scss +43 -0
  41. data/assets/modules/reveal.js/css/theme/template/theme.scss +352 -0
  42. data/assets/modules/reveal.js/css/theme/white.css +292 -0
  43. data/assets/modules/reveal.js/demo.html +410 -0
  44. data/assets/modules/reveal.js/index.html +50 -0
  45. data/assets/modules/reveal.js/js/reveal.js +4961 -0
  46. data/assets/modules/reveal.js/lib/css/zenburn.css +80 -0
  47. data/assets/modules/reveal.js/lib/font/league-gothic/LICENSE +2 -0
  48. data/assets/modules/reveal.js/lib/font/league-gothic/league-gothic.css +10 -0
  49. data/assets/modules/reveal.js/lib/font/league-gothic/league-gothic.eot +0 -0
  50. data/assets/modules/reveal.js/lib/font/league-gothic/league-gothic.ttf +0 -0
  51. data/assets/modules/reveal.js/lib/font/league-gothic/league-gothic.woff +0 -0
  52. data/assets/modules/reveal.js/lib/font/source-sans-pro/LICENSE +45 -0
  53. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.eot +0 -0
  54. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.ttf +0 -0
  55. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.woff +0 -0
  56. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.eot +0 -0
  57. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.ttf +0 -0
  58. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.woff +0 -0
  59. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.eot +0 -0
  60. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.ttf +0 -0
  61. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.woff +0 -0
  62. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot +0 -0
  63. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf +0 -0
  64. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff +0 -0
  65. data/assets/modules/reveal.js/lib/font/source-sans-pro/source-sans-pro.css +39 -0
  66. data/assets/modules/reveal.js/lib/js/classList.js +2 -0
  67. data/assets/modules/reveal.js/lib/js/head.min.js +9 -0
  68. data/assets/modules/reveal.js/lib/js/html5shiv.js +7 -0
  69. data/assets/modules/reveal.js/package.json +45 -0
  70. data/assets/modules/reveal.js/plugin/highlight/highlight.js +78 -0
  71. data/assets/modules/reveal.js/plugin/markdown/example.html +129 -0
  72. data/assets/modules/reveal.js/plugin/markdown/example.md +31 -0
  73. data/assets/modules/reveal.js/plugin/markdown/markdown.js +411 -0
  74. data/assets/modules/reveal.js/plugin/markdown/marked.js +6 -0
  75. data/assets/modules/reveal.js/plugin/math/math.js +67 -0
  76. data/assets/modules/reveal.js/plugin/multiplex/client.js +13 -0
  77. data/assets/modules/reveal.js/plugin/multiplex/index.js +64 -0
  78. data/assets/modules/reveal.js/plugin/multiplex/master.js +31 -0
  79. data/assets/modules/reveal.js/plugin/multiplex/package.json +19 -0
  80. data/assets/modules/reveal.js/plugin/notes-server/client.js +65 -0
  81. data/assets/modules/reveal.js/plugin/notes-server/index.js +69 -0
  82. data/assets/modules/reveal.js/plugin/notes-server/notes.html +585 -0
  83. data/assets/modules/reveal.js/plugin/notes/notes.html +609 -0
  84. data/assets/modules/reveal.js/plugin/notes/notes.js +145 -0
  85. data/assets/modules/reveal.js/plugin/print-pdf/print-pdf.js +51 -0
  86. data/assets/modules/reveal.js/plugin/search/search.js +196 -0
  87. data/assets/modules/reveal.js/plugin/zoom-js/zoom.js +288 -0
  88. data/assets/modules/reveal.js/test/examples/assets/image1.png +0 -0
  89. data/assets/modules/reveal.js/test/examples/assets/image2.png +0 -0
  90. data/assets/modules/reveal.js/test/examples/barebones.html +41 -0
  91. data/assets/modules/reveal.js/test/examples/embedded-media.html +49 -0
  92. data/assets/modules/reveal.js/test/examples/math.html +185 -0
  93. data/assets/modules/reveal.js/test/examples/slide-backgrounds.html +144 -0
  94. data/assets/modules/reveal.js/test/examples/slide-transitions.html +101 -0
  95. data/assets/modules/reveal.js/test/qunit-1.12.0.css +244 -0
  96. data/assets/modules/reveal.js/test/qunit-1.12.0.js +2212 -0
  97. data/assets/modules/reveal.js/test/simple.md +12 -0
  98. data/assets/modules/reveal.js/test/test-markdown-element-attributes.html +134 -0
  99. data/assets/modules/reveal.js/test/test-markdown-element-attributes.js +46 -0
  100. data/assets/modules/reveal.js/test/test-markdown-external.html +36 -0
  101. data/assets/modules/reveal.js/test/test-markdown-external.js +24 -0
  102. data/assets/modules/reveal.js/test/test-markdown-options.html +41 -0
  103. data/assets/modules/reveal.js/test/test-markdown-options.js +26 -0
  104. data/assets/modules/reveal.js/test/test-markdown-slide-attributes.html +128 -0
  105. data/assets/modules/reveal.js/test/test-markdown-slide-attributes.js +47 -0
  106. data/assets/modules/reveal.js/test/test-markdown.html +52 -0
  107. data/assets/modules/reveal.js/test/test-markdown.js +15 -0
  108. data/assets/modules/reveal.js/test/test-pdf.html +83 -0
  109. data/assets/modules/reveal.js/test/test-pdf.js +15 -0
  110. data/assets/modules/reveal.js/test/test.html +86 -0
  111. data/assets/modules/reveal.js/test/test.js +597 -0
  112. metadata +117 -10
@@ -0,0 +1,19 @@
1
+ Copyright (C) 2016 Hakim El Hattab, http://hakim.se, and reveal.js contributors
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
@@ -0,0 +1,1185 @@
1
+ # reveal.js [![Build Status](https://travis-ci.org/hakimel/reveal.js.svg?branch=master)](https://travis-ci.org/hakimel/reveal.js) <a href="https://slides.com?ref=github"><img src="https://s3.amazonaws.com/static.slid.es/images/slides-github-banner-320x40.png?1" alt="Slides" width="160" height="20"></a>
2
+
3
+ A framework for easily creating beautiful presentations using HTML. [Check out the live demo](http://lab.hakim.se/reveal-js/).
4
+
5
+ reveal.js comes with a broad range of features including [nested slides](https://github.com/hakimel/reveal.js#markup), [Markdown contents](https://github.com/hakimel/reveal.js#markdown), [PDF export](https://github.com/hakimel/reveal.js#pdf-export), [speaker notes](https://github.com/hakimel/reveal.js#speaker-notes) and a [JavaScript API](https://github.com/hakimel/reveal.js#api). There's also a fully featured visual editor and platform for sharing reveal.js presentations at [slides.com](https://slides.com?ref=github).
6
+
7
+ ## Table of contents
8
+ - [Online Editor](#online-editor)
9
+ - [Instructions](#instructions)
10
+ - [Markup](#markup)
11
+ - [Markdown](#markdown)
12
+ - [Element Attributes](#element-attributes)
13
+ - [Slide Attributes](#slide-attributes)
14
+ - [Configuration](#configuration)
15
+ - [Presentation Size](#presentation-size)
16
+ - [Dependencies](#dependencies)
17
+ - [Ready Event](#ready-event)
18
+ - [Auto-sliding](#auto-sliding)
19
+ - [Keyboard Bindings](#keyboard-bindings)
20
+ - [Touch Navigation](#touch-navigation)
21
+ - [Lazy Loading](#lazy-loading)
22
+ - [API](#api)
23
+ - [Slide Changed Event](#slide-changed-event)
24
+ - [Presentation State](#presentation-state)
25
+ - [Slide States](#slide-states)
26
+ - [Slide Backgrounds](#slide-backgrounds)
27
+ - [Parallax Background](#parallax-background)
28
+ - [Slide Transitions](#slide-transitions)
29
+ - [Internal links](#internal-links)
30
+ - [Fragments](#fragments)
31
+ - [Fragment events](#fragment-events)
32
+ - [Code syntax highlighting](#code-syntax-highlighting)
33
+ - [Slide number](#slide-number)
34
+ - [Overview mode](#overview-mode)
35
+ - [Fullscreen mode](#fullscreen-mode)
36
+ - [Embedded media](#embedded-media)
37
+ - [Stretching elements](#stretching-elements)
38
+ - [postMessage API](#postmessage-api)
39
+ - [PDF Export](#pdf-export)
40
+ - [Theming](#theming)
41
+ - [Speaker Notes](#speaker-notes)
42
+ - [Share and Print Speaker Notes](#share-and-print-speaker-notes)
43
+ - [Server Side Speaker Notes](#server-side-speaker-notes)
44
+ - [Multiplexing](#multiplexing)
45
+ - [Master presentation](#master-presentation)
46
+ - [Client presentation](#client-presentation)
47
+ - [Socket.io server](#socketio-server)
48
+ - [MathJax](#mathjax)
49
+ - [Installation](#installation)
50
+ - [Basic setup](#basic-setup)
51
+ - [Full setup](#full-setup)
52
+ - [Folder Structure](#folder-structure)
53
+ - [License](#license)
54
+
55
+ #### More reading
56
+ - [Changelog](https://github.com/hakimel/reveal.js/releases): Up-to-date version history.
57
+ - [Examples](https://github.com/hakimel/reveal.js/wiki/Example-Presentations): Presentations created with reveal.js, add your own!
58
+ - [Browser Support](https://github.com/hakimel/reveal.js/wiki/Browser-Support): Explanation of browser support and fallbacks.
59
+ - [Plugins](https://github.com/hakimel/reveal.js/wiki/Plugins,-Tools-and-Hardware): A list of plugins that can be used to extend reveal.js.
60
+
61
+ ## Online Editor
62
+
63
+ Presentations are written using HTML or Markdown but there's also an online editor for those of you who prefer a graphical interface. Give it a try at [https://slides.com](https://slides.com?ref=github).
64
+
65
+
66
+ ## Instructions
67
+
68
+ ### Markup
69
+
70
+ Here's a barebones example of a fully working reveal.js presentation:
71
+ ```html
72
+ <html>
73
+ <head>
74
+ <link rel="stylesheet" href="css/reveal.css">
75
+ <link rel="stylesheet" href="css/theme/white.css">
76
+ </head>
77
+ <body>
78
+ <div class="reveal">
79
+ <div class="slides">
80
+ <section>Slide 1</section>
81
+ <section>Slide 2</section>
82
+ </div>
83
+ </div>
84
+ <script src="js/reveal.js"></script>
85
+ <script>
86
+ Reveal.initialize();
87
+ </script>
88
+ </body>
89
+ </html>
90
+ ```
91
+
92
+ The presentation markup hierarchy needs to be `.reveal > .slides > section` where the `section` represents one slide and can be repeated indefinitely. If you place multiple `section` elements inside of another `section` they will be shown as vertical slides. The first of the vertical slides is the "root" of the others (at the top), and will be included in the horizontal sequence. For example:
93
+
94
+ ```html
95
+ <div class="reveal">
96
+ <div class="slides">
97
+ <section>Single Horizontal Slide</section>
98
+ <section>
99
+ <section>Vertical Slide 1</section>
100
+ <section>Vertical Slide 2</section>
101
+ </section>
102
+ </div>
103
+ </div>
104
+ ```
105
+
106
+ ### Markdown
107
+
108
+ It's possible to write your slides using Markdown. To enable Markdown, add the `data-markdown` attribute to your `<section>` elements and wrap the contents in a `<script type="text/template">` like the example below.
109
+
110
+ This is based on [data-markdown](https://gist.github.com/1343518) from [Paul Irish](https://github.com/paulirish) modified to use [marked](https://github.com/chjj/marked) to support [GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown). Sensitive to indentation (avoid mixing tabs and spaces) and line breaks (avoid consecutive breaks).
111
+
112
+ ```html
113
+ <section data-markdown>
114
+ <script type="text/template">
115
+ ## Page title
116
+
117
+ A paragraph with some text and a [link](http://hakim.se).
118
+ </script>
119
+ </section>
120
+ ```
121
+
122
+ #### External Markdown
123
+
124
+ You can write your content as a separate file and have reveal.js load it at runtime. Note the separator arguments which determine how slides are delimited in the external file: the `data-separator` attribute defines a regular expression for horizontal slides (defaults to `^\r?\n---\r?\n$`, a newline-bounded horizontal rule) and `data-separator-vertical` defines vertical slides (disabled by default). The `data-separator-notes` attribute is a regular expression for specifying the beginning of the current slide's speaker notes (defaults to `note:`). The `data-charset` attribute is optional and specifies which charset to use when loading the external file.
125
+
126
+ When used locally, this feature requires that reveal.js [runs from a local web server](#full-setup). The following example customises all available options:
127
+
128
+ ```html
129
+ <section data-markdown="example.md"
130
+ data-separator="^\n\n\n"
131
+ data-separator-vertical="^\n\n"
132
+ data-separator-notes="^Note:"
133
+ data-charset="iso-8859-15">
134
+ </section>
135
+ ```
136
+
137
+ #### Element Attributes
138
+
139
+ Special syntax (in html comment) is available for adding attributes to Markdown elements. This is useful for fragments, amongst other things.
140
+
141
+ ```html
142
+ <section data-markdown>
143
+ <script type="text/template">
144
+ - Item 1 <!-- .element: class="fragment" data-fragment-index="2" -->
145
+ - Item 2 <!-- .element: class="fragment" data-fragment-index="1" -->
146
+ </script>
147
+ </section>
148
+ ```
149
+
150
+ #### Slide Attributes
151
+
152
+ Special syntax (in html comment) is available for adding attributes to the slide `<section>` elements generated by your Markdown.
153
+
154
+ ```html
155
+ <section data-markdown>
156
+ <script type="text/template">
157
+ <!-- .slide: data-background="#ff0000" -->
158
+ Markdown content
159
+ </script>
160
+ </section>
161
+ ```
162
+
163
+ #### Configuring *marked*
164
+
165
+ We use [marked](https://github.com/chjj/marked) to parse Markdown. To customise marked's rendering, you can pass in options when [configuring Reveal](#configuration):
166
+
167
+ ```javascript
168
+ Reveal.initialize({
169
+ // Options which are passed into marked
170
+ // See https://github.com/chjj/marked#options-1
171
+ markdown: {
172
+ smartypants: true
173
+ }
174
+ });
175
+ ```
176
+
177
+ ### Configuration
178
+
179
+ At the end of your page you need to initialize reveal by running the following code. Note that all config values are optional and will default as specified below.
180
+
181
+ ```javascript
182
+ Reveal.initialize({
183
+
184
+ // Display controls in the bottom right corner
185
+ controls: true,
186
+
187
+ // Display a presentation progress bar
188
+ progress: true,
189
+
190
+ // Display the page number of the current slide
191
+ slideNumber: false,
192
+
193
+ // Push each slide change to the browser history
194
+ history: false,
195
+
196
+ // Enable keyboard shortcuts for navigation
197
+ keyboard: true,
198
+
199
+ // Enable the slide overview mode
200
+ overview: true,
201
+
202
+ // Vertical centering of slides
203
+ center: true,
204
+
205
+ // Enables touch navigation on devices with touch input
206
+ touch: true,
207
+
208
+ // Loop the presentation
209
+ loop: false,
210
+
211
+ // Change the presentation direction to be RTL
212
+ rtl: false,
213
+
214
+ // Randomizes the order of slides each time the presentation loads
215
+ shuffle: false,
216
+
217
+ // Turns fragments on and off globally
218
+ fragments: true,
219
+
220
+ // Flags if the presentation is running in an embedded mode,
221
+ // i.e. contained within a limited portion of the screen
222
+ embedded: false,
223
+
224
+ // Flags if we should show a help overlay when the questionmark
225
+ // key is pressed
226
+ help: true,
227
+
228
+ // Flags if speaker notes should be visible to all viewers
229
+ showNotes: false,
230
+
231
+ // Number of milliseconds between automatically proceeding to the
232
+ // next slide, disabled when set to 0, this value can be overwritten
233
+ // by using a data-autoslide attribute on your slides
234
+ autoSlide: 0,
235
+
236
+ // Stop auto-sliding after user input
237
+ autoSlideStoppable: true,
238
+
239
+ // Use this method for navigation when auto-sliding
240
+ autoSlideMethod: Reveal.navigateNext,
241
+
242
+ // Enable slide navigation via mouse wheel
243
+ mouseWheel: false,
244
+
245
+ // Hides the address bar on mobile devices
246
+ hideAddressBar: true,
247
+
248
+ // Opens links in an iframe preview overlay
249
+ previewLinks: false,
250
+
251
+ // Transition style
252
+ transition: 'slide', // none/fade/slide/convex/concave/zoom
253
+
254
+ // Transition speed
255
+ transitionSpeed: 'default', // default/fast/slow
256
+
257
+ // Transition style for full page slide backgrounds
258
+ backgroundTransition: 'fade', // none/fade/slide/convex/concave/zoom
259
+
260
+ // Number of slides away from the current that are visible
261
+ viewDistance: 3,
262
+
263
+ // Parallax background image
264
+ parallaxBackgroundImage: '', // e.g. "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'"
265
+
266
+ // Parallax background size
267
+ parallaxBackgroundSize: '', // CSS syntax, e.g. "2100px 900px"
268
+
269
+ // Number of pixels to move the parallax background per slide
270
+ // - Calculated automatically unless specified
271
+ // - Set to 0 to disable movement along an axis
272
+ parallaxBackgroundHorizontal: null,
273
+ parallaxBackgroundVertical: null
274
+
275
+ });
276
+ ```
277
+
278
+
279
+ The configuration can be updated after initialization using the ```configure``` method:
280
+
281
+ ```javascript
282
+ // Turn autoSlide off
283
+ Reveal.configure({ autoSlide: 0 });
284
+
285
+ // Start auto-sliding every 5s
286
+ Reveal.configure({ autoSlide: 5000 });
287
+ ```
288
+
289
+
290
+ ### Presentation Size
291
+
292
+ All presentations have a normal size, that is the resolution at which they are authored. The framework will automatically scale presentations uniformly based on this size to ensure that everything fits on any given display or viewport.
293
+
294
+ See below for a list of configuration options related to sizing, including default values:
295
+
296
+ ```javascript
297
+ Reveal.initialize({
298
+
299
+ ...
300
+
301
+ // The "normal" size of the presentation, aspect ratio will be preserved
302
+ // when the presentation is scaled to fit different resolutions. Can be
303
+ // specified using percentage units.
304
+ width: 960,
305
+ height: 700,
306
+
307
+ // Factor of the display size that should remain empty around the content
308
+ margin: 0.1,
309
+
310
+ // Bounds for smallest/largest possible scale to apply to content
311
+ minScale: 0.2,
312
+ maxScale: 1.5
313
+
314
+ });
315
+ ```
316
+
317
+ If you wish to disable this behavior and do your own scaling (e.g. using media queries), try these settings:
318
+
319
+ ```javascript
320
+ Reveal.initialize({
321
+
322
+ ...
323
+
324
+ width: "100%",
325
+ height: "100%",
326
+ margin: 0,
327
+ minScale: 1,
328
+ maxScale: 1
329
+ });
330
+ ```
331
+
332
+ ### Dependencies
333
+
334
+ Reveal.js doesn't _rely_ on any third party scripts to work but a few optional libraries are included by default. These libraries are loaded as dependencies in the order they appear, for example:
335
+
336
+ ```javascript
337
+ Reveal.initialize({
338
+ dependencies: [
339
+ // Cross-browser shim that fully implements classList - https://github.com/eligrey/classList.js/
340
+ { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
341
+
342
+ // Interpret Markdown in <section> elements
343
+ { src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
344
+ { src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
345
+
346
+ // Syntax highlight for <code> elements
347
+ { src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
348
+
349
+ // Zoom in and out with Alt+click
350
+ { src: 'plugin/zoom-js/zoom.js', async: true },
351
+
352
+ // Speaker notes
353
+ { src: 'plugin/notes/notes.js', async: true },
354
+
355
+ // MathJax
356
+ { src: 'plugin/math/math.js', async: true }
357
+ ]
358
+ });
359
+ ```
360
+
361
+ You can add your own extensions using the same syntax. The following properties are available for each dependency object:
362
+ - **src**: Path to the script to load
363
+ - **async**: [optional] Flags if the script should load after reveal.js has started, defaults to false
364
+ - **callback**: [optional] Function to execute when the script has loaded
365
+ - **condition**: [optional] Function which must return true for the script to be loaded
366
+
367
+ To load these dependencies, reveal.js requires [head.js](http://headjs.com/) *(a script loading library)* to be loaded before reveal.js.
368
+
369
+ ### Ready Event
370
+
371
+ A 'ready' event is fired when reveal.js has loaded all non-async dependencies and is ready to start navigating. To check if reveal.js is already 'ready' you can call `Reveal.isReady()`.
372
+
373
+ ```javascript
374
+ Reveal.addEventListener( 'ready', function( event ) {
375
+ // event.currentSlide, event.indexh, event.indexv
376
+ } );
377
+ ```
378
+
379
+ Note that we also add a `.ready` class to the `.reveal` element so that you can hook into this with CSS.
380
+
381
+ ### Auto-sliding
382
+
383
+ Presentations can be configured to progress through slides automatically, without any user input. To enable this you will need to tell the framework how many milliseconds it should wait between slides:
384
+
385
+ ```javascript
386
+ // Slide every five seconds
387
+ Reveal.configure({
388
+ autoSlide: 5000
389
+ });
390
+ ```
391
+ When this is turned on a control element will appear that enables users to pause and resume auto-sliding. Alternatively, sliding can be paused or resumed by pressing »a« on the keyboard. Sliding is paused automatically as soon as the user starts navigating. You can disable these controls by specifying ```autoSlideStoppable: false``` in your reveal.js config.
392
+
393
+ You can also override the slide duration for individual slides and fragments by using the ```data-autoslide``` attribute:
394
+
395
+ ```html
396
+ <section data-autoslide="2000">
397
+ <p>After 2 seconds the first fragment will be shown.</p>
398
+ <p class="fragment" data-autoslide="10000">After 10 seconds the next fragment will be shown.</p>
399
+ <p class="fragment">Now, the fragment is displayed for 2 seconds before the next slide is shown.</p>
400
+ </section>
401
+ ```
402
+
403
+ To override the method used for navigation when auto-sliding, you can specify the ```autoSlideMethod``` setting. To only navigate along the top layer and ignore vertical slides, set this to ```Reveal.navigateRight```.
404
+
405
+ Whenever the auto-slide mode is resumed or paused the ```autoslideresumed``` and ```autoslidepaused``` events are fired.
406
+
407
+
408
+ ### Keyboard Bindings
409
+
410
+ If you're unhappy with any of the default keyboard bindings you can override them using the ```keyboard``` config option:
411
+
412
+ ```javascript
413
+ Reveal.configure({
414
+ keyboard: {
415
+ 13: 'next', // go to the next slide when the ENTER key is pressed
416
+ 27: function() {}, // do something custom when ESC is pressed
417
+ 32: null // don't do anything when SPACE is pressed (i.e. disable a reveal.js default binding)
418
+ }
419
+ });
420
+ ```
421
+
422
+ ### Touch Navigation
423
+
424
+ You can swipe to navigate through a presentation on any touch-enabled device. Horizontal swipes change between horizontal slides, vertical swipes change between vertical slides. If you wish to disable this you can set the `touch` config option to false when initializing reveal.js.
425
+
426
+ If there's some part of your content that needs to remain accessible to touch events you'll need to highlight this by adding a `data-prevent-swipe` attribute to the element. One common example where this is useful is elements that need to be scrolled.
427
+
428
+
429
+ ### Lazy Loading
430
+
431
+ When working on presentation with a lot of media or iframe content it's important to load lazily. Lazy loading means that reveal.js will only load content for the few slides nearest to the current slide. The number of slides that are preloaded is determined by the `viewDistance` configuration option.
432
+
433
+ To enable lazy loading all you need to do is change your "src" attributes to "data-src" as shown below. This is supported for image, video, audio and iframe elements. Lazy loaded iframes will also unload when the containing slide is no longer visible.
434
+
435
+ ```html
436
+ <section>
437
+ <img data-src="image.png">
438
+ <iframe data-src="http://hakim.se"></iframe>
439
+ <video>
440
+ <source data-src="video.webm" type="video/webm" />
441
+ <source data-src="video.mp4" type="video/mp4" />
442
+ </video>
443
+ </section>
444
+ ```
445
+
446
+
447
+ ### API
448
+
449
+ The ``Reveal`` object exposes a JavaScript API for controlling navigation and reading state:
450
+
451
+ ```javascript
452
+ // Navigation
453
+ Reveal.slide( indexh, indexv, indexf );
454
+ Reveal.left();
455
+ Reveal.right();
456
+ Reveal.up();
457
+ Reveal.down();
458
+ Reveal.prev();
459
+ Reveal.next();
460
+ Reveal.prevFragment();
461
+ Reveal.nextFragment();
462
+
463
+ // Randomize the order of slides
464
+ Reveal.shuffle();
465
+
466
+ // Shows a help overlay with keyboard shortcuts
467
+ Reveal.showHelp();
468
+
469
+ // Toggle presentation states, optionally pass true/false to force on/off
470
+ Reveal.toggleOverview();
471
+ Reveal.togglePause();
472
+ Reveal.toggleAutoSlide();
473
+
474
+ // Change a config value at runtime
475
+ Reveal.configure({ controls: true });
476
+
477
+ // Returns the present configuration options
478
+ Reveal.getConfig();
479
+
480
+ // Fetch the current scale of the presentation
481
+ Reveal.getScale();
482
+
483
+ // Retrieves the previous and current slide elements
484
+ Reveal.getPreviousSlide();
485
+ Reveal.getCurrentSlide();
486
+
487
+ Reveal.getIndices(); // { h: 0, v: 0 } }
488
+ Reveal.getProgress(); // 0-1
489
+ Reveal.getTotalSlides();
490
+
491
+ // Returns the speaker notes for the current slide
492
+ Reveal.getSlideNotes();
493
+
494
+ // State checks
495
+ Reveal.isFirstSlide();
496
+ Reveal.isLastSlide();
497
+ Reveal.isOverview();
498
+ Reveal.isPaused();
499
+ Reveal.isAutoSliding();
500
+ ```
501
+
502
+ ### Slide Changed Event
503
+
504
+ A 'slidechanged' event is fired each time the slide is changed (regardless of state). The event object holds the index values of the current slide as well as a reference to the previous and current slide HTML nodes.
505
+
506
+ Some libraries, like MathJax (see [#226](https://github.com/hakimel/reveal.js/issues/226#issuecomment-10261609)), get confused by the transforms and display states of slides. Often times, this can be fixed by calling their update or render function from this callback.
507
+
508
+ ```javascript
509
+ Reveal.addEventListener( 'slidechanged', function( event ) {
510
+ // event.previousSlide, event.currentSlide, event.indexh, event.indexv
511
+ } );
512
+ ```
513
+
514
+ ### Presentation State
515
+
516
+ The presentation's current state can be fetched by using the `getState` method. A state object contains all of the information required to put the presentation back as it was when `getState` was first called. Sort of like a snapshot. It's a simple object that can easily be stringified and persisted or sent over the wire.
517
+
518
+ ```javascript
519
+ Reveal.slide( 1 );
520
+ // we're on slide 1
521
+
522
+ var state = Reveal.getState();
523
+
524
+ Reveal.slide( 3 );
525
+ // we're on slide 3
526
+
527
+ Reveal.setState( state );
528
+ // we're back on slide 1
529
+ ```
530
+
531
+ ### Slide States
532
+
533
+ If you set ``data-state="somestate"`` on a slide ``<section>``, "somestate" will be applied as a class on the document element when that slide is opened. This allows you to apply broad style changes to the page based on the active slide.
534
+
535
+ Furthermore you can also listen to these changes in state via JavaScript:
536
+
537
+ ```javascript
538
+ Reveal.addEventListener( 'somestate', function() {
539
+ // TODO: Sprinkle magic
540
+ }, false );
541
+ ```
542
+
543
+ ### Slide Backgrounds
544
+
545
+ Slides are contained within a limited portion of the screen by default to allow them to fit any display and scale uniformly. You can apply full page backgrounds outside of the slide area by adding a ```data-background``` attribute to your ```<section>``` elements. Four different types of backgrounds are supported: color, image, video and iframe.
546
+
547
+ ##### Color Backgrounds
548
+ All CSS color formats are supported, like rgba() or hsl().
549
+ ```html
550
+ <section data-background-color="#ff0000">
551
+ <h2>Color</h2>
552
+ </section>
553
+ ```
554
+
555
+ ##### Image Backgrounds
556
+ By default, background images are resized to cover the full page. Available options:
557
+
558
+ | Attribute | Default | Description |
559
+ | :--------------------------- | :--------- | :---------- |
560
+ | data-background-image | | URL of the image to show. GIFs restart when the slide opens. |
561
+ | data-background-size | cover | See [background-size](https://developer.mozilla.org/docs/Web/CSS/background-size) on MDN. |
562
+ | data-background-position | center | See [background-position](https://developer.mozilla.org/docs/Web/CSS/background-position) on MDN. |
563
+ | data-background-repeat | no-repeat | See [background-repeat](https://developer.mozilla.org/docs/Web/CSS/background-repeat) on MDN. |
564
+ ```html
565
+ <section data-background-image="http://example.com/image.png">
566
+ <h2>Image</h2>
567
+ </section>
568
+ <section data-background-image="http://example.com/image.png" data-background-size="100px" data-background-repeat="repeat">
569
+ <h2>This background image will be sized to 100px and repeated</h2>
570
+ </section>
571
+ ```
572
+
573
+ ##### Video Backgrounds
574
+ Automatically plays a full size video behind the slide.
575
+
576
+ | Attribute | Default | Description |
577
+ | :--------------------------- | :------ | :---------- |
578
+ | data-background-video | | A single video source, or a comma separated list of video sources. |
579
+ | data-background-video-loop | false | Flags if the video should play repeatedly. |
580
+ | data-background-video-muted | false | Flags if the audio should be muted. |
581
+
582
+ ```html
583
+ <section data-background-video="https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.mp4,https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.webm" data-background-video-loop data-background-video-muted>
584
+ <h2>Video</h2>
585
+ </section>
586
+ ```
587
+
588
+ ##### Iframe Backgrounds
589
+ Embeds a web page as a background. Note that since the iframe is in the background layer, behind your slides, it is not possible to interact with the embedded page.
590
+ ```html
591
+ <section data-background-iframe="https://slides.com">
592
+ <h2>Iframe</h2>
593
+ </section>
594
+ ```
595
+
596
+ ##### Background Transitions
597
+ Backgrounds transition using a fade animation by default. This can be changed to a linear sliding transition by passing ```backgroundTransition: 'slide'``` to the ```Reveal.initialize()``` call. Alternatively you can set ```data-background-transition``` on any section with a background to override that specific transition.
598
+
599
+
600
+ ### Parallax Background
601
+
602
+ If you want to use a parallax scrolling background, set the first two config properties below when initializing reveal.js (the other two are optional).
603
+
604
+ ```javascript
605
+ Reveal.initialize({
606
+
607
+ // Parallax background image
608
+ parallaxBackgroundImage: '', // e.g. "https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg"
609
+
610
+ // Parallax background size
611
+ parallaxBackgroundSize: '', // CSS syntax, e.g. "2100px 900px" - currently only pixels are supported (don't use % or auto)
612
+
613
+ // Number of pixels to move the parallax background per slide
614
+ // - Calculated automatically unless specified
615
+ // - Set to 0 to disable movement along an axis
616
+ parallaxBackgroundHorizontal: 200,
617
+ parallaxBackgroundVertical: 50
618
+
619
+ });
620
+ ```
621
+
622
+ Make sure that the background size is much bigger than screen size to allow for some scrolling. [View example](http://lab.hakim.se/reveal-js/?parallaxBackgroundImage=https%3A%2F%2Fs3.amazonaws.com%2Fhakim-static%2Freveal-js%2Freveal-parallax-1.jpg&parallaxBackgroundSize=2100px%20900px).
623
+
624
+
625
+
626
+ ### Slide Transitions
627
+ The global presentation transition is set using the ```transition``` config value. You can override the global transition for a specific slide by using the ```data-transition``` attribute:
628
+
629
+ ```html
630
+ <section data-transition="zoom">
631
+ <h2>This slide will override the presentation transition and zoom!</h2>
632
+ </section>
633
+
634
+ <section data-transition-speed="fast">
635
+ <h2>Choose from three transition speeds: default, fast or slow!</h2>
636
+ </section>
637
+ ```
638
+
639
+ You can also use different in and out transitions for the same slide:
640
+
641
+ ```html
642
+ <section data-transition="slide">
643
+ The train goes on …
644
+ </section>
645
+ <section data-transition="slide">
646
+ and on …
647
+ </section>
648
+ <section data-transition="slide-in fade-out">
649
+ and stops.
650
+ </section>
651
+ <section data-transition="fade-in slide-out">
652
+ (Passengers entering and leaving)
653
+ </section>
654
+ <section data-transition="slide">
655
+ And it starts again.
656
+ </section>
657
+ ```
658
+
659
+
660
+ ### Internal links
661
+
662
+ It's easy to link between slides. The first example below targets the index of another slide whereas the second targets a slide with an ID attribute (```<section id="some-slide">```):
663
+
664
+ ```html
665
+ <a href="#/2/2">Link</a>
666
+ <a href="#/some-slide">Link</a>
667
+ ```
668
+
669
+ You can also add relative navigation links, similar to the built in reveal.js controls, by appending one of the following classes on any element. Note that each element is automatically given an ```enabled``` class when it's a valid navigation route based on the current slide.
670
+
671
+ ```html
672
+ <a href="#" class="navigate-left">
673
+ <a href="#" class="navigate-right">
674
+ <a href="#" class="navigate-up">
675
+ <a href="#" class="navigate-down">
676
+ <a href="#" class="navigate-prev"> <!-- Previous vertical or horizontal slide -->
677
+ <a href="#" class="navigate-next"> <!-- Next vertical or horizontal slide -->
678
+ ```
679
+
680
+
681
+ ### Fragments
682
+ Fragments are used to highlight individual elements on a slide. Every element with the class ```fragment``` will be stepped through before moving on to the next slide. Here's an example: http://lab.hakim.se/reveal-js/#/fragments
683
+
684
+ The default fragment style is to start out invisible and fade in. This style can be changed by appending a different class to the fragment:
685
+
686
+ ```html
687
+ <section>
688
+ <p class="fragment grow">grow</p>
689
+ <p class="fragment shrink">shrink</p>
690
+ <p class="fragment fade-out">fade-out</p>
691
+ <p class="fragment fade-up">fade-up (also down, left and right!)</p>
692
+ <p class="fragment current-visible">visible only once</p>
693
+ <p class="fragment highlight-current-blue">blue only once</p>
694
+ <p class="fragment highlight-red">highlight-red</p>
695
+ <p class="fragment highlight-green">highlight-green</p>
696
+ <p class="fragment highlight-blue">highlight-blue</p>
697
+ </section>
698
+ ```
699
+
700
+ Multiple fragments can be applied to the same element sequentially by wrapping it, this will fade in the text on the first step and fade it back out on the second.
701
+
702
+ ```html
703
+ <section>
704
+ <span class="fragment fade-in">
705
+ <span class="fragment fade-out">I'll fade in, then out</span>
706
+ </span>
707
+ </section>
708
+ ```
709
+
710
+ The display order of fragments can be controlled using the ```data-fragment-index``` attribute.
711
+
712
+ ```html
713
+ <section>
714
+ <p class="fragment" data-fragment-index="3">Appears last</p>
715
+ <p class="fragment" data-fragment-index="1">Appears first</p>
716
+ <p class="fragment" data-fragment-index="2">Appears second</p>
717
+ </section>
718
+ ```
719
+
720
+ ### Fragment events
721
+
722
+ When a slide fragment is either shown or hidden reveal.js will dispatch an event.
723
+
724
+ Some libraries, like MathJax (see #505), get confused by the initially hidden fragment elements. Often times this can be fixed by calling their update or render function from this callback.
725
+
726
+ ```javascript
727
+ Reveal.addEventListener( 'fragmentshown', function( event ) {
728
+ // event.fragment = the fragment DOM element
729
+ } );
730
+ Reveal.addEventListener( 'fragmenthidden', function( event ) {
731
+ // event.fragment = the fragment DOM element
732
+ } );
733
+ ```
734
+
735
+ ### Code syntax highlighting
736
+
737
+ By default, Reveal is configured with [highlight.js](https://highlightjs.org/) for code syntax highlighting. Below is an example with clojure code that will be syntax highlighted. When the `data-trim` attribute is present, surrounding whitespace is automatically removed. HTML will be escaped by default. To avoid this, for example if you are using `<mark>` to call out a line of code, add the `data-noescape` attribute to the `<code>` element.
738
+
739
+ ```html
740
+ <section>
741
+ <pre><code data-trim data-noescape>
742
+ (def lazy-fib
743
+ (concat
744
+ [0 1]
745
+ <mark>((fn rfib [a b]</mark>
746
+ (lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
747
+ </code></pre>
748
+ </section>
749
+ ```
750
+
751
+ ### Slide number
752
+ If you would like to display the page number of the current slide you can do so using the ```slideNumber``` configuration value.
753
+
754
+ ```javascript
755
+ // Shows the slide number using default formatting
756
+ Reveal.configure({ slideNumber: true });
757
+
758
+ // Slide number formatting can be configured using these variables:
759
+ // "h.v": horizontal . vertical slide number (default)
760
+ // "h/v": horizontal / vertical slide number
761
+ // "c": flattened slide number
762
+ // "c/t": flattened slide number / total slides
763
+ Reveal.configure({ slideNumber: 'c/t' });
764
+
765
+ ```
766
+
767
+
768
+ ### Overview mode
769
+
770
+ Press "Esc" or "o" keys to toggle the overview mode on and off. While you're in this mode, you can still navigate between slides,
771
+ as if you were at 1,000 feet above your presentation. The overview mode comes with a few API hooks:
772
+
773
+ ```javascript
774
+ Reveal.addEventListener( 'overviewshown', function( event ) { /* ... */ } );
775
+ Reveal.addEventListener( 'overviewhidden', function( event ) { /* ... */ } );
776
+
777
+ // Toggle the overview mode programmatically
778
+ Reveal.toggleOverview();
779
+ ```
780
+
781
+ ### Fullscreen mode
782
+ Just press »F« on your keyboard to show your presentation in fullscreen mode. Press the »ESC« key to exit fullscreen mode.
783
+
784
+
785
+ ### Embedded media
786
+ Embedded HTML5 `<video>`/`<audio>` and YouTube iframes are automatically paused when you navigate away from a slide. This can be disabled by decorating your element with a `data-ignore` attribute.
787
+
788
+ Add `data-autoplay` to your media element if you want it to automatically start playing when the slide is shown:
789
+
790
+ ```html
791
+ <video data-autoplay src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"></video>
792
+ ```
793
+
794
+ Additionally the framework automatically pushes two [post messages](https://developer.mozilla.org/en-US/docs/Web/API/Window.postMessage) to all iframes, ```slide:start``` when the slide containing the iframe is made visible and ```slide:stop``` when it is hidden.
795
+
796
+
797
+ ### Stretching elements
798
+ Sometimes it's desirable to have an element, like an image or video, stretch to consume as much space as possible within a given slide. This can be done by adding the ```.stretch``` class to an element as seen below:
799
+
800
+ ```html
801
+ <section>
802
+ <h2>This video will use up the remaining space on the slide</h2>
803
+ <video class="stretch" src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"></video>
804
+ </section>
805
+ ```
806
+
807
+ Limitations:
808
+ - Only direct descendants of a slide section can be stretched
809
+ - Only one descendant per slide section can be stretched
810
+
811
+
812
+ ### postMessage API
813
+ The framework has a built-in postMessage API that can be used when communicating with a presentation inside of another window. Here's an example showing how you'd make a reveal.js instance in the given window proceed to slide 2:
814
+
815
+ ```javascript
816
+ <window>.postMessage( JSON.stringify({ method: 'slide', args: [ 2 ] }), '*' );
817
+ ```
818
+
819
+ When reveal.js runs inside of an iframe it can optionally bubble all of its events to the parent. Bubbled events are stringified JSON with three fields: namespace, eventName and state. Here's how you subscribe to them from the parent window:
820
+
821
+ ```javascript
822
+ window.addEventListener( 'message', function( event ) {
823
+ var data = JSON.parse( event.data );
824
+ if( data.namespace === 'reveal' && data.eventName ==='slidechanged' ) {
825
+ // Slide changed, see data.state for slide number
826
+ }
827
+ } );
828
+ ```
829
+
830
+ This cross-window messaging can be toggled on or off using configuration flags.
831
+
832
+ ```javascript
833
+ Reveal.initialize({
834
+ ...,
835
+
836
+ // Exposes the reveal.js API through window.postMessage
837
+ postMessage: true,
838
+
839
+ // Dispatches all reveal.js events to the parent window through postMessage
840
+ postMessageEvents: false
841
+ });
842
+ ```
843
+
844
+
845
+ ## PDF Export
846
+
847
+ Presentations can be exported to PDF via a special print stylesheet. This feature requires that you use [Google Chrome](http://google.com/chrome) or [Chromium](https://www.chromium.org/Home) and to be serving the presention from a webserver.
848
+ Here's an example of an exported presentation that's been uploaded to SlideShare: http://www.slideshare.net/hakimel/revealjs-300.
849
+
850
+ ### Page size
851
+ Export dimensions are inferred from the configured [presentation size](#presentation-size). Slides that are too tall to fit within a single page will expand onto multiple pages. You can limit how many pages a slide may expand onto using the `pdfMaxPagesPerSlide` config option, for example `Reveal.configure({ pdfMaxPagesPerSlide: 1 })` ensures that no slide ever grows to more than one printed page.
852
+
853
+ ### Print stylesheet
854
+ To enable the PDF print capability in your presentation, the special print stylesheet at [/css/print/pdf.css](https://github.com/hakimel/reveal.js/blob/master/css/print/pdf.css) must be loaded. The default index.html file handles this for you when `print-pdf` is included in the query string. If you're using a different HTML template, you can add this to your HEAD:
855
+
856
+ ```html
857
+ <script>
858
+ var link = document.createElement( 'link' );
859
+ link.rel = 'stylesheet';
860
+ link.type = 'text/css';
861
+ link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
862
+ document.getElementsByTagName( 'head' )[0].appendChild( link );
863
+ </script>
864
+ ```
865
+
866
+ ### Instructions
867
+ 1. Open your presentation with `print-pdf` included in the query string i.e. http://localhost:8000/?print-pdf. You can test this with [lab.hakim.se/reveal-js?print-pdf](http://lab.hakim.se/reveal-js?print-pdf).
868
+ 2. Open the in-browser print dialog (CTRL/CMD+P).
869
+ 3. Change the **Destination** setting to **Save as PDF**.
870
+ 4. Change the **Layout** to **Landscape**.
871
+ 5. Change the **Margins** to **None**.
872
+ 6. Enable the **Background graphics** option.
873
+ 7. Click **Save**.
874
+
875
+ ![Chrome Print Settings](https://s3.amazonaws.com/hakim-static/reveal-js/pdf-print-settings-2.png)
876
+
877
+ Alternatively you can use the [decktape](https://github.com/astefanutti/decktape) project.
878
+
879
+ ## Theming
880
+
881
+ The framework comes with a few different themes included:
882
+
883
+ - black: Black background, white text, blue links (default theme)
884
+ - white: White background, black text, blue links
885
+ - league: Gray background, white text, blue links (default theme for reveal.js < 3.0.0)
886
+ - beige: Beige background, dark text, brown links
887
+ - sky: Blue background, thin dark text, blue links
888
+ - night: Black background, thick white text, orange links
889
+ - serif: Cappuccino background, gray text, brown links
890
+ - simple: White background, black text, blue links
891
+ - solarized: Cream-colored background, dark green text, blue links
892
+
893
+ Each theme is available as a separate stylesheet. To change theme you will need to replace **black** below with your desired theme name in index.html:
894
+
895
+ ```html
896
+ <link rel="stylesheet" href="css/theme/black.css" id="theme">
897
+ ```
898
+
899
+ If you want to add a theme of your own see the instructions here: [/css/theme/README.md](https://github.com/hakimel/reveal.js/blob/master/css/theme/README.md).
900
+
901
+
902
+ ## Speaker Notes
903
+
904
+ reveal.js comes with a speaker notes plugin which can be used to present per-slide notes in a separate browser window. The notes window also gives you a preview of the next upcoming slide so it may be helpful even if you haven't written any notes. Press the 's' key on your keyboard to open the notes window.
905
+
906
+ A speaker timer starts as soon as the speaker view is opened. You can reset it to 00:00:00 at any time by simply clicking/tapping on it.
907
+
908
+ Notes are defined by appending an ```<aside>``` element to a slide as seen below. You can add the ```data-markdown``` attribute to the aside element if you prefer writing notes using Markdown.
909
+
910
+ Alternatively you can add your notes in a `data-notes` attribute on the slide. Like `<section data-notes="Something important"></section>`.
911
+
912
+ When used locally, this feature requires that reveal.js [runs from a local web server](#full-setup).
913
+
914
+ ```html
915
+ <section>
916
+ <h2>Some Slide</h2>
917
+
918
+ <aside class="notes">
919
+ Oh hey, these are some notes. They'll be hidden in your presentation, but you can see them if you open the speaker notes window (hit 's' on your keyboard).
920
+ </aside>
921
+ </section>
922
+ ```
923
+
924
+ If you're using the external Markdown plugin, you can add notes with the help of a special delimiter:
925
+
926
+ ```html
927
+ <section data-markdown="example.md" data-separator="^\n\n\n" data-separator-vertical="^\n\n" data-separator-notes="^Note:"></section>
928
+
929
+ # Title
930
+ ## Sub-title
931
+
932
+ Here is some content...
933
+
934
+ Note:
935
+ This will only display in the notes window.
936
+ ```
937
+
938
+ #### Share and Print Speaker Notes
939
+
940
+ Notes are only visible to the speaker inside of the speaker view. If you wish to share your notes with others you can initialize reveal.js with the `showNotes` config value set to `true`. Notes will appear along the bottom of the presentations.
941
+
942
+ When `showNotes` is enabled notes are also included when you [export to PDF](https://github.com/hakimel/reveal.js#pdf-export). By default, notes are printed in a semi-transparent box on top of slide. If you'd rather print them on a separate page after the slide, set `showNotes: "separate-page"`.
943
+
944
+ ## Server Side Speaker Notes
945
+
946
+ In some cases it can be desirable to run notes on a separate device from the one you're presenting on. The Node.js-based notes plugin lets you do this using the same note definitions as its client side counterpart. Include the required scripts by adding the following dependencies:
947
+
948
+ ```javascript
949
+ Reveal.initialize({
950
+ ...
951
+
952
+ dependencies: [
953
+ { src: 'socket.io/socket.io.js', async: true },
954
+ { src: 'plugin/notes-server/client.js', async: true }
955
+ ]
956
+ });
957
+ ```
958
+
959
+ Then:
960
+
961
+ 1. Install [Node.js](http://nodejs.org/) (4.0.0 or later)
962
+ 2. Run ```npm install```
963
+ 3. Run ```node plugin/notes-server```
964
+
965
+
966
+ ## Multiplexing
967
+
968
+ The multiplex plugin allows your audience to view the slides of the presentation you are controlling on their own phone, tablet or laptop. As the master presentation navigates the slides, all client presentations will update in real time. See a demo at [https://reveal-js-multiplex-ccjbegmaii.now.sh/](https://reveal-js-multiplex-ccjbegmaii.now.sh/).
969
+
970
+ The multiplex plugin needs the following 3 things to operate:
971
+
972
+ 1. Master presentation that has control
973
+ 2. Client presentations that follow the master
974
+ 3. Socket.io server to broadcast events from the master to the clients
975
+
976
+ More details:
977
+
978
+ #### Master presentation
979
+ Served from a static file server accessible (preferably) only to the presenter. This need only be on your (the presenter's) computer. (It's safer to run the master presentation from your own computer, so if the venue's Internet goes down it doesn't stop the show.) An example would be to execute the following commands in the directory of your master presentation:
980
+
981
+ 1. ```npm install node-static```
982
+ 2. ```static```
983
+
984
+ If you want to use the speaker notes plugin with your master presentation then make sure you have the speaker notes plugin configured correctly along with the configuration shown below, then execute ```node plugin/notes-server``` in the directory of your master presentation. The configuration below will cause it to connect to the socket.io server as a master, as well as launch your speaker-notes/static-file server.
985
+
986
+ You can then access your master presentation at ```http://localhost:1947```
987
+
988
+ Example configuration:
989
+ ```javascript
990
+ Reveal.initialize({
991
+ // other options...
992
+
993
+ multiplex: {
994
+ // Example values. To generate your own, see the socket.io server instructions.
995
+ secret: '13652805320794272084', // Obtained from the socket.io server. Gives this (the master) control of the presentation
996
+ id: '1ea875674b17ca76', // Obtained from socket.io server
997
+ url: 'https://reveal-js-multiplex-ccjbegmaii.now.sh' // Location of socket.io server
998
+ },
999
+
1000
+ // Don't forget to add the dependencies
1001
+ dependencies: [
1002
+ { src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
1003
+ { src: 'plugin/multiplex/master.js', async: true },
1004
+
1005
+ // and if you want speaker notes
1006
+ { src: 'plugin/notes-server/client.js', async: true }
1007
+
1008
+ // other dependencies...
1009
+ ]
1010
+ });
1011
+ ```
1012
+
1013
+ #### Client presentation
1014
+ Served from a publicly accessible static file server. Examples include: GitHub Pages, Amazon S3, Dreamhost, Akamai, etc. The more reliable, the better. Your audience can then access the client presentation via ```http://example.com/path/to/presentation/client/index.html```, with the configuration below causing them to connect to the socket.io server as clients.
1015
+
1016
+ Example configuration:
1017
+ ```javascript
1018
+ Reveal.initialize({
1019
+ // other options...
1020
+
1021
+ multiplex: {
1022
+ // Example values. To generate your own, see the socket.io server instructions.
1023
+ secret: null, // null so the clients do not have control of the master presentation
1024
+ id: '1ea875674b17ca76', // id, obtained from socket.io server
1025
+ url: 'https://reveal-js-multiplex-ccjbegmaii.now.sh' // Location of socket.io server
1026
+ },
1027
+
1028
+ // Don't forget to add the dependencies
1029
+ dependencies: [
1030
+ { src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
1031
+ { src: 'plugin/multiplex/client.js', async: true }
1032
+
1033
+ // other dependencies...
1034
+ ]
1035
+ });
1036
+ ```
1037
+
1038
+ #### Socket.io server
1039
+ Server that receives the slideChanged events from the master presentation and broadcasts them out to the connected client presentations. This needs to be publicly accessible. You can run your own socket.io server with the commands:
1040
+
1041
+ 1. ```npm install```
1042
+ 2. ```node plugin/multiplex```
1043
+
1044
+ Or you use the socket.io server at [https://reveal-js-multiplex-ccjbegmaii.now.sh/](https://reveal-js-multiplex-ccjbegmaii.now.sh/).
1045
+
1046
+ You'll need to generate a unique secret and token pair for your master and client presentations. To do so, visit ```http://example.com/token```, where ```http://example.com``` is the location of your socket.io server. Or if you're going to use the socket.io server at [https://reveal-js-multiplex-ccjbegmaii.now.sh/](https://reveal-js-multiplex-ccjbegmaii.now.sh/), visit [https://reveal-js-multiplex-ccjbegmaii.now.sh/token](https://reveal-js-multiplex-ccjbegmaii.now.sh/token).
1047
+
1048
+ You are very welcome to point your presentations at the Socket.io server running at [https://reveal-js-multiplex-ccjbegmaii.now.sh/](https://reveal-js-multiplex-ccjbegmaii.now.sh/), but availability and stability are not guaranteed. For anything mission critical I recommend you run your own server. It is simple to deploy to nodejitsu, heroku, your own environment, etc.
1049
+
1050
+ ##### socket.io server as file static server
1051
+
1052
+ The socket.io server can play the role of static file server for your client presentation, as in the example at [https://reveal-js-multiplex-ccjbegmaii.now.sh/](https://reveal-js-multiplex-ccjbegmaii.now.sh/). (Open [https://reveal-js-multiplex-ccjbegmaii.now.sh/](https://reveal-js-multiplex-ccjbegmaii.now.sh/) in two browsers. Navigate through the slides on one, and the other will update to match.)
1053
+
1054
+ Example configuration:
1055
+ ```javascript
1056
+ Reveal.initialize({
1057
+ // other options...
1058
+
1059
+ multiplex: {
1060
+ // Example values. To generate your own, see the socket.io server instructions.
1061
+ secret: null, // null so the clients do not have control of the master presentation
1062
+ id: '1ea875674b17ca76', // id, obtained from socket.io server
1063
+ url: 'example.com:80' // Location of your socket.io server
1064
+ },
1065
+
1066
+ // Don't forget to add the dependencies
1067
+ dependencies: [
1068
+ { src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
1069
+ { src: 'plugin/multiplex/client.js', async: true }
1070
+
1071
+ // other dependencies...
1072
+ ]
1073
+ ```
1074
+
1075
+ It can also play the role of static file server for your master presentation and client presentations at the same time (as long as you don't want to use speaker notes). (Open [https://reveal-js-multiplex-ccjbegmaii.now.sh/](https://reveal-js-multiplex-ccjbegmaii.now.sh/) in two browsers. Navigate through the slides on one, and the other will update to match. Navigate through the slides on the second, and the first will update to match.) This is probably not desirable, because you don't want your audience to mess with your slides while you're presenting. ;)
1076
+
1077
+ Example configuration:
1078
+ ```javascript
1079
+ Reveal.initialize({
1080
+ // other options...
1081
+
1082
+ multiplex: {
1083
+ // Example values. To generate your own, see the socket.io server instructions.
1084
+ secret: '13652805320794272084', // Obtained from the socket.io server. Gives this (the master) control of the presentation
1085
+ id: '1ea875674b17ca76', // Obtained from socket.io server
1086
+ url: 'example.com:80' // Location of your socket.io server
1087
+ },
1088
+
1089
+ // Don't forget to add the dependencies
1090
+ dependencies: [
1091
+ { src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
1092
+ { src: 'plugin/multiplex/master.js', async: true },
1093
+ { src: 'plugin/multiplex/client.js', async: true }
1094
+
1095
+ // other dependencies...
1096
+ ]
1097
+ });
1098
+ ```
1099
+
1100
+ ## MathJax
1101
+
1102
+ If you want to display math equations in your presentation you can easily do so by including this plugin. The plugin is a very thin wrapper around the [MathJax](http://www.mathjax.org/) library. To use it you'll need to include it as a reveal.js dependency, [find our more about dependencies here](#dependencies).
1103
+
1104
+ The plugin defaults to using [LaTeX](http://en.wikipedia.org/wiki/LaTeX) but that can be adjusted through the ```math``` configuration object. Note that MathJax is loaded from a remote server. If you want to use it offline you'll need to download a copy of the library and adjust the ```mathjax``` configuration value.
1105
+
1106
+ Below is an example of how the plugin can be configured. If you don't intend to change these values you do not need to include the ```math``` config object at all.
1107
+
1108
+ ```js
1109
+ Reveal.initialize({
1110
+
1111
+ // other options ...
1112
+
1113
+ math: {
1114
+ mathjax: 'https://cdn.mathjax.org/mathjax/latest/MathJax.js',
1115
+ config: 'TeX-AMS_HTML-full' // See http://docs.mathjax.org/en/latest/config-files.html
1116
+ },
1117
+
1118
+ dependencies: [
1119
+ { src: 'plugin/math/math.js', async: true }
1120
+ ]
1121
+
1122
+ });
1123
+ ```
1124
+
1125
+ Read MathJax's documentation if you need [HTTPS delivery](http://docs.mathjax.org/en/latest/start.html#secure-access-to-the-cdn) or serving of [specific versions](http://docs.mathjax.org/en/latest/configuration.html#loading-mathjax-from-the-cdn) for stability.
1126
+
1127
+
1128
+ ## Installation
1129
+
1130
+ The **basic setup** is for authoring presentations only. The **full setup** gives you access to all reveal.js features and plugins such as speaker notes as well as the development tasks needed to make changes to the source.
1131
+
1132
+ ### Basic setup
1133
+
1134
+ The core of reveal.js is very easy to install. You'll simply need to download a copy of this repository and open the index.html file directly in your browser.
1135
+
1136
+ 1. Download the latest version of reveal.js from <https://github.com/hakimel/reveal.js/releases>
1137
+
1138
+ 2. Unzip and replace the example contents in index.html with your own
1139
+
1140
+ 3. Open index.html in a browser to view it
1141
+
1142
+
1143
+ ### Full setup
1144
+
1145
+ Some reveal.js features, like external Markdown and speaker notes, require that presentations run from a local web server. The following instructions will set up such a server as well as all of the development tasks needed to make edits to the reveal.js source code.
1146
+
1147
+ 1. Install [Node.js](http://nodejs.org/) (4.0.0 or later)
1148
+
1149
+ 1. Clone the reveal.js repository
1150
+ ```sh
1151
+ $ git clone https://github.com/hakimel/reveal.js.git
1152
+ ```
1153
+
1154
+ 1. Navigate to the reveal.js folder
1155
+ ```sh
1156
+ $ cd reveal.js
1157
+ ```
1158
+
1159
+ 1. Install dependencies
1160
+ ```sh
1161
+ $ npm install
1162
+ ```
1163
+
1164
+ 1. Serve the presentation and monitor source files for changes
1165
+ ```sh
1166
+ $ npm start
1167
+ ```
1168
+
1169
+ 1. Open <http://localhost:8000> to view your presentation
1170
+
1171
+ You can change the port by using `npm start -- --port=8001`.
1172
+
1173
+
1174
+ ### Folder Structure
1175
+ - **css/** Core styles without which the project does not function
1176
+ - **js/** Like above but for JavaScript
1177
+ - **plugin/** Components that have been developed as extensions to reveal.js
1178
+ - **lib/** All other third party assets (JavaScript, CSS, fonts)
1179
+
1180
+
1181
+ ## License
1182
+
1183
+ MIT licensed
1184
+
1185
+ Copyright (C) 2016 Hakim El Hattab, http://hakim.se