reveal-ck 3.6.0 → 3.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/files/reveal.js/CONTRIBUTING.md +4 -0
  3. data/files/reveal.js/Gruntfile.js +44 -26
  4. data/files/reveal.js/LICENSE +1 -1
  5. data/files/reveal.js/README.md +375 -161
  6. data/files/reveal.js/bower.json +27 -0
  7. data/files/reveal.js/css/print/paper.css +4 -3
  8. data/files/reveal.js/css/print/pdf.css +53 -38
  9. data/files/reveal.js/css/reveal.css +452 -206
  10. data/files/reveal.js/css/reveal.scss +328 -175
  11. data/files/reveal.js/css/theme/README.md +2 -6
  12. data/files/reveal.js/css/theme/beige.css +81 -50
  13. data/files/reveal.js/css/theme/black.css +70 -39
  14. data/files/reveal.js/css/theme/blood.css +81 -57
  15. data/files/reveal.js/css/theme/league.css +75 -44
  16. data/files/reveal.js/css/theme/moon.css +75 -44
  17. data/files/reveal.js/css/theme/night.css +70 -39
  18. data/files/reveal.js/css/theme/serif.css +72 -41
  19. data/files/reveal.js/css/theme/simple.css +72 -38
  20. data/files/reveal.js/css/theme/sky.css +75 -44
  21. data/files/reveal.js/css/theme/solarized.css +75 -44
  22. data/files/reveal.js/css/theme/source/black.scss +2 -2
  23. data/files/reveal.js/css/theme/source/blood.scss +3 -16
  24. data/files/reveal.js/css/theme/source/night.scss +0 -1
  25. data/files/reveal.js/css/theme/source/simple.scss +5 -0
  26. data/files/reveal.js/css/theme/source/white.scss +2 -2
  27. data/files/reveal.js/css/theme/template/settings.scss +1 -1
  28. data/files/reveal.js/css/theme/template/theme.scss +36 -23
  29. data/files/reveal.js/css/theme/white.css +75 -44
  30. data/files/reveal.js/demo.html +410 -0
  31. data/files/reveal.js/index.html +14 -373
  32. data/files/reveal.js/js/reveal.js +1186 -350
  33. data/files/reveal.js/lib/css/zenburn.css +41 -78
  34. data/files/reveal.js/lib/js/head.min.js +9 -8
  35. data/files/reveal.js/package.json +22 -26
  36. data/files/reveal.js/plugin/highlight/highlight.js +52 -4
  37. data/files/reveal.js/plugin/markdown/example.html +1 -1
  38. data/files/reveal.js/plugin/markdown/markdown.js +40 -21
  39. data/files/reveal.js/plugin/markdown/marked.js +2 -33
  40. data/files/reveal.js/plugin/math/math.js +5 -2
  41. data/files/reveal.js/plugin/multiplex/client.js +1 -1
  42. data/files/reveal.js/plugin/multiplex/index.js +24 -16
  43. data/files/reveal.js/plugin/multiplex/master.js +22 -42
  44. data/files/reveal.js/plugin/multiplex/package.json +19 -0
  45. data/files/reveal.js/plugin/notes-server/client.js +6 -1
  46. data/files/reveal.js/plugin/notes-server/index.js +17 -14
  47. data/files/reveal.js/plugin/notes-server/notes.html +215 -26
  48. data/files/reveal.js/plugin/notes/notes.html +372 -32
  49. data/files/reveal.js/plugin/notes/notes.js +40 -7
  50. data/files/reveal.js/plugin/print-pdf/print-pdf.js +47 -26
  51. data/files/reveal.js/plugin/zoom-js/zoom.js +12 -2
  52. data/files/reveal.js/test/examples/math.html +1 -1
  53. data/files/reveal.js/test/examples/slide-backgrounds.html +1 -1
  54. data/files/reveal.js/test/examples/slide-transitions.html +101 -0
  55. data/files/reveal.js/test/simple.md +12 -0
  56. data/files/reveal.js/test/test-markdown-element-attributes.html +3 -3
  57. data/files/reveal.js/test/test-markdown-element-attributes.js +1 -1
  58. data/files/reveal.js/test/test-markdown-external.html +36 -0
  59. data/files/reveal.js/test/test-markdown-external.js +24 -0
  60. data/files/reveal.js/test/test-markdown-options.html +41 -0
  61. data/files/reveal.js/test/test-markdown-options.js +26 -0
  62. data/files/reveal.js/test/test-markdown.html +1 -1
  63. data/files/reveal.js/test/test.html +5 -1
  64. data/files/reveal.js/test/test.js +26 -1
  65. data/lib/reveal-ck/version.rb +1 -1
  66. metadata +11 -4
  67. data/files/reveal.js/plugin/leap/leap.js +0 -159
  68. data/files/reveal.js/plugin/remotes/remotes.js +0 -39
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 35dca89fefa9a67e27ae9e895b8825ba195fe905
4
- data.tar.gz: 774ce2424ecda5c7c2b3b5c3b4daccb93fa14752
3
+ metadata.gz: 6f00dc9362b886a41503ee704896eac8f85d089c
4
+ data.tar.gz: 549d29f0cb678579da8c7c5aac00090e4257df3e
5
5
  SHA512:
6
- metadata.gz: 75700135fe17408154e56ddeeda673904e1ebc62c26db3d30044537dc56bc4bfe46db17c14c26033a3fd56ca3a6dccdc46b90cc41ecd74d10e785d073e8be19a
7
- data.tar.gz: 26a79e3851769b63e5ba2260a29ddf459137ff9480507e17f56ad7f70b5400dc2433c51e9be54dbd682a4fae8597159577b4351ce513c218f4a92c021b9c8a8e
6
+ metadata.gz: 07a6941e03153814fe0900418c23435f8386024f2b1cfeeb4551d355950b387d5ab751d40edce8b22b39c627cd174ac4e88a810769fa2239ed3c392c9315a1c6
7
+ data.tar.gz: 334822b84449b70a131e70d124071deec97824e791b6c350bee7a6c514a7b23da7204f3f7aafebdb4b96255f49c2a2467577998aa9022a45beed842cbe5704fb
@@ -17,3 +17,7 @@ When reporting a bug make sure to include information about which browser and op
17
17
  - Single-quoted strings
18
18
  - Should be made towards the **dev branch**
19
19
  - Should be submitted from a feature/topic branch (not your master)
20
+
21
+
22
+ ### Plugins
23
+ Please do not submit plugins as pull requests. They should be maintained in their own separate repository. More information here: https://github.com/hakimel/reveal.js/wiki/Plugin-Guidelines
@@ -1,6 +1,10 @@
1
1
  /* global module:false */
2
2
  module.exports = function(grunt) {
3
3
  var port = grunt.option('port') || 8000;
4
+ var root = grunt.option('root') || '.';
5
+
6
+ if (!Array.isArray(root)) root = [root];
7
+
4
8
  // Project configuration
5
9
  grunt.initConfig({
6
10
  pkg: grunt.file.readJSON('package.json'),
@@ -11,7 +15,7 @@ module.exports = function(grunt) {
11
15
  ' * http://lab.hakim.se/reveal-js\n' +
12
16
  ' * MIT licensed\n' +
13
17
  ' *\n' +
14
- ' * Copyright (C) 2015 Hakim El Hattab, http://hakim.se\n' +
18
+ ' * Copyright (C) 2017 Hakim El Hattab, http://hakim.se\n' +
15
19
  ' */'
16
20
  },
17
21
 
@@ -36,19 +40,15 @@ module.exports = function(grunt) {
36
40
  }
37
41
  },
38
42
  themes: {
39
- files: {
40
- 'css/theme/black.css': 'css/theme/source/black.scss',
41
- 'css/theme/white.css': 'css/theme/source/white.scss',
42
- 'css/theme/league.css': 'css/theme/source/league.scss',
43
- 'css/theme/beige.css': 'css/theme/source/beige.scss',
44
- 'css/theme/night.css': 'css/theme/source/night.scss',
45
- 'css/theme/serif.css': 'css/theme/source/serif.scss',
46
- 'css/theme/simple.css': 'css/theme/source/simple.scss',
47
- 'css/theme/sky.css': 'css/theme/source/sky.scss',
48
- 'css/theme/moon.css': 'css/theme/source/moon.scss',
49
- 'css/theme/solarized.css': 'css/theme/source/solarized.scss',
50
- 'css/theme/blood.css': 'css/theme/source/blood.scss'
51
- }
43
+ files: [
44
+ {
45
+ expand: true,
46
+ cwd: 'css/theme/source',
47
+ src: ['*.sass', '*.scss'],
48
+ dest: 'css/theme',
49
+ ext: '.css'
50
+ }
51
+ ]
52
52
  }
53
53
  },
54
54
 
@@ -71,6 +71,7 @@ module.exports = function(grunt) {
71
71
  curly: false,
72
72
  eqeqeq: true,
73
73
  immed: true,
74
+ esnext: true,
74
75
  latedef: true,
75
76
  newcap: true,
76
77
  noarg: true,
@@ -95,11 +96,12 @@ module.exports = function(grunt) {
95
96
  server: {
96
97
  options: {
97
98
  port: port,
98
- base: '.',
99
- livereload: true,
100
- open: true
99
+ base: root,
100
+ livereload: true,
101
+ open: true
101
102
  }
102
- }
103
+ },
104
+
103
105
  },
104
106
 
105
107
  zip: {
@@ -109,29 +111,44 @@ module.exports = function(grunt) {
109
111
  'js/**',
110
112
  'lib/**',
111
113
  'images/**',
112
- 'plugin/**'
114
+ 'plugin/**',
115
+ '**.md'
113
116
  ]
114
117
  },
115
118
 
116
119
  watch: {
117
- options: {
118
- livereload: true
119
- },
120
120
  js: {
121
121
  files: [ 'Gruntfile.js', 'js/reveal.js' ],
122
122
  tasks: 'js'
123
123
  },
124
124
  theme: {
125
- files: [ 'css/theme/source/*.scss', 'css/theme/template/*.scss' ],
125
+ files: [
126
+ 'css/theme/source/*.sass',
127
+ 'css/theme/source/*.scss',
128
+ 'css/theme/template/*.sass',
129
+ 'css/theme/template/*.scss'
130
+ ],
126
131
  tasks: 'css-themes'
127
132
  },
128
133
  css: {
129
134
  files: [ 'css/reveal.scss' ],
130
135
  tasks: 'css-core'
131
136
  },
132
- html: {
133
- files: [ 'index.html']
134
- }
137
+ html: {
138
+ files: root.map(path => path + '/*.html')
139
+ },
140
+ markdown: {
141
+ files: root.map(path => path + '/*.md')
142
+ },
143
+ options: {
144
+ livereload: true
145
+ }
146
+ },
147
+
148
+ retire: {
149
+ js: ['js/reveal.js', 'lib/js/*.js', 'plugin/**/*.js'],
150
+ node: ['.'],
151
+ options: {}
135
152
  }
136
153
 
137
154
  });
@@ -146,6 +163,7 @@ module.exports = function(grunt) {
146
163
  grunt.loadNpmTasks( 'grunt-contrib-connect' );
147
164
  grunt.loadNpmTasks( 'grunt-autoprefixer' );
148
165
  grunt.loadNpmTasks( 'grunt-zip' );
166
+ grunt.loadNpmTasks( 'grunt-retire' );
149
167
 
150
168
  // Default task
151
169
  grunt.registerTask( 'default', [ 'css', 'js' ] );
@@ -1,4 +1,4 @@
1
- Copyright (C) 2015 Hakim El Hattab, http://hakim.se
1
+ Copyright (C) 2017 Hakim El Hattab, http://hakim.se, and reveal.js contributors
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
@@ -1,26 +1,95 @@
1
- # reveal.js [![Build Status](https://travis-ci.org/hakimel/reveal.js.svg?branch=master)](https://travis-ci.org/hakimel/reveal.js)
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
2
 
3
3
  A framework for easily creating beautiful presentations using HTML. [Check out the live demo](http://lab.hakim.se/reveal-js/).
4
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). It's best viewed in a modern browser but [fallbacks](https://github.com/hakimel/reveal.js/wiki/Browser-Support) are available to make sure your presentation can still be viewed elsewhere.
6
-
7
-
8
- #### More reading:
9
- - [Installation](#installation): Step-by-step instructions for getting reveal.js running on your computer.
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
10
56
  - [Changelog](https://github.com/hakimel/reveal.js/releases): Up-to-date version history.
11
57
  - [Examples](https://github.com/hakimel/reveal.js/wiki/Example-Presentations): Presentations created with reveal.js, add your own!
12
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.
13
60
 
14
61
  ## Online Editor
15
62
 
16
- 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 [http://slides.com](http://slides.com).
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).
17
64
 
18
65
 
19
66
  ## Instructions
20
67
 
21
68
  ### Markup
22
69
 
23
- Markup hierarchy needs to be ``<div class="reveal"> <div class="slides"> <section>`` where the ``<section>`` represents one slide and can be repeated indefinitely. If you place multiple ``<section>``'s 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 it will be included in the horizontal sequence. For example:
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:
24
93
 
25
94
  ```html
26
95
  <div class="reveal">
@@ -36,25 +105,25 @@ Markup hierarchy needs to be ``<div class="reveal"> <div class="slides"> <sectio
36
105
 
37
106
  ### Markdown
38
107
 
39
- 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.
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 `<textarea data-template>` like the example below.
40
109
 
41
- 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 Flavoured Markdown](https://help.github.com/articles/github-flavored-markdown). Sensitive to indentation (avoid mixing tabs and spaces) and line breaks (avoid consecutive breaks).
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).
42
111
 
43
112
  ```html
44
113
  <section data-markdown>
45
- <script type="text/template">
114
+ <textarea data-template>
46
115
  ## Page title
47
116
 
48
117
  A paragraph with some text and a [link](http://hakim.se).
49
- </script>
118
+ </textarea>
50
119
  </section>
51
120
  ```
52
121
 
53
122
  #### External Markdown
54
123
 
55
- 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-charset``` attribute is optional and specifies which charset to use when loading the external file.
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.
56
125
 
57
- When used locally, this feature requires that reveal.js [runs from a local web server](#full-setup).
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:
58
127
 
59
128
  ```html
60
129
  <section data-markdown="example.md"
@@ -91,6 +160,19 @@ Special syntax (in html comment) is available for adding attributes to the slide
91
160
  </section>
92
161
  ```
93
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
+ ```
94
176
 
95
177
  ### Configuration
96
178
 
@@ -105,6 +187,9 @@ Reveal.initialize({
105
187
  // Display a presentation progress bar
106
188
  progress: true,
107
189
 
190
+ // Set default timing of 2 minutes per slide
191
+ defaultTiming: 120,
192
+
108
193
  // Display the page number of the current slide
109
194
  slideNumber: false,
110
195
 
@@ -129,6 +214,9 @@ Reveal.initialize({
129
214
  // Change the presentation direction to be RTL
130
215
  rtl: false,
131
216
 
217
+ // Randomizes the order of slides each time the presentation loads
218
+ shuffle: false,
219
+
132
220
  // Turns fragments on and off globally
133
221
  fragments: true,
134
222
 
@@ -140,6 +228,15 @@ Reveal.initialize({
140
228
  // key is pressed
141
229
  help: true,
142
230
 
231
+ // Flags if speaker notes should be visible to all viewers
232
+ showNotes: false,
233
+
234
+ // Global override for autolaying embedded media (video/audio/iframe)
235
+ // - null: Media will only autoplay if data-autoplay is present
236
+ // - true: All media will autoplay, regardless of individual setting
237
+ // - false: No media will autoplay, regardless of individual setting
238
+ autoPlayMedia: null,
239
+
143
240
  // Number of milliseconds between automatically proceeding to the
144
241
  // next slide, disabled when set to 0, this value can be overwritten
145
242
  // by using a data-autoslide attribute on your slides
@@ -148,6 +245,9 @@ Reveal.initialize({
148
245
  // Stop auto-sliding after user input
149
246
  autoSlideStoppable: true,
150
247
 
248
+ // Use this method for navigation when auto-sliding
249
+ autoSlideMethod: Reveal.navigateNext,
250
+
151
251
  // Enable slide navigation via mouse wheel
152
252
  mouseWheel: false,
153
253
 
@@ -158,13 +258,13 @@ Reveal.initialize({
158
258
  previewLinks: false,
159
259
 
160
260
  // Transition style
161
- transition: 'default', // none/fade/slide/convex/concave/zoom
261
+ transition: 'slide', // none/fade/slide/convex/concave/zoom
162
262
 
163
263
  // Transition speed
164
264
  transitionSpeed: 'default', // default/fast/slow
165
265
 
166
266
  // Transition style for full page slide backgrounds
167
- backgroundTransition: 'default', // none/fade/slide/convex/concave/zoom
267
+ backgroundTransition: 'fade', // none/fade/slide/convex/concave/zoom
168
268
 
169
269
  // Number of slides away from the current that are visible
170
270
  viewDistance: 3,
@@ -173,8 +273,16 @@ Reveal.initialize({
173
273
  parallaxBackgroundImage: '', // e.g. "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'"
174
274
 
175
275
  // Parallax background size
176
- parallaxBackgroundSize: '' // CSS syntax, e.g. "2100px 900px"
276
+ parallaxBackgroundSize: '', // CSS syntax, e.g. "2100px 900px"
277
+
278
+ // Number of pixels to move the parallax background per slide
279
+ // - Calculated automatically unless specified
280
+ // - Set to 0 to disable movement along an axis
281
+ parallaxBackgroundHorizontal: null,
282
+ parallaxBackgroundVertical: null,
177
283
 
284
+ // The display mode that will be used to show slides
285
+ display: 'block'
178
286
 
179
287
  });
180
288
  ```
@@ -191,6 +299,48 @@ Reveal.configure({ autoSlide: 5000 });
191
299
  ```
192
300
 
193
301
 
302
+ ### Presentation Size
303
+
304
+ 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.
305
+
306
+ See below for a list of configuration options related to sizing, including default values:
307
+
308
+ ```javascript
309
+ Reveal.initialize({
310
+
311
+ ...
312
+
313
+ // The "normal" size of the presentation, aspect ratio will be preserved
314
+ // when the presentation is scaled to fit different resolutions. Can be
315
+ // specified using percentage units.
316
+ width: 960,
317
+ height: 700,
318
+
319
+ // Factor of the display size that should remain empty around the content
320
+ margin: 0.1,
321
+
322
+ // Bounds for smallest/largest possible scale to apply to content
323
+ minScale: 0.2,
324
+ maxScale: 1.5
325
+
326
+ });
327
+ ```
328
+
329
+ If you wish to disable this behavior and do your own scaling (e.g. using media queries), try these settings:
330
+
331
+ ```javascript
332
+ Reveal.initialize({
333
+
334
+ ...
335
+
336
+ width: "100%",
337
+ height: "100%",
338
+ margin: 0,
339
+ minScale: 1,
340
+ maxScale: 1
341
+ });
342
+ ```
343
+
194
344
  ### Dependencies
195
345
 
196
346
  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:
@@ -214,9 +364,6 @@ Reveal.initialize({
214
364
  // Speaker notes
215
365
  { src: 'plugin/notes/notes.js', async: true },
216
366
 
217
- // Remote control your reveal.js presentation using a touch device
218
- { src: 'plugin/remotes/remotes.js', async: true },
219
-
220
367
  // MathJax
221
368
  { src: 'plugin/math/math.js', async: true }
222
369
  ]
@@ -229,6 +376,7 @@ You can add your own extensions using the same syntax. The following properties
229
376
  - **callback**: [optional] Function to execute when the script has loaded
230
377
  - **condition**: [optional] Function which must return true for the script to be loaded
231
378
 
379
+ To load these dependencies, reveal.js requires [head.js](http://headjs.com/) *(a script loading library)* to be loaded before reveal.js.
232
380
 
233
381
  ### Ready Event
234
382
 
@@ -240,38 +388,11 @@ Reveal.addEventListener( 'ready', function( event ) {
240
388
  } );
241
389
  ```
242
390
 
243
-
244
- ### Presentation Size
245
-
246
- 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.
247
-
248
- See below for a list of configuration options related to sizing, including default values:
249
-
250
- ```javascript
251
- Reveal.initialize({
252
-
253
- ...
254
-
255
- // The "normal" size of the presentation, aspect ratio will be preserved
256
- // when the presentation is scaled to fit different resolutions. Can be
257
- // specified using percentage units.
258
- width: 960,
259
- height: 700,
260
-
261
- // Factor of the display size that should remain empty around the content
262
- margin: 0.1,
263
-
264
- // Bounds for smallest/largest possible scale to apply to content
265
- minScale: 0.2,
266
- maxScale: 1.5
267
-
268
- });
269
- ```
270
-
391
+ Note that we also add a `.ready` class to the `.reveal` element so that you can hook into this with CSS.
271
392
 
272
393
  ### Auto-sliding
273
394
 
274
- Presentations can be configure 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:
395
+ 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:
275
396
 
276
397
  ```javascript
277
398
  // Slide every five seconds
@@ -291,6 +412,8 @@ You can also override the slide duration for individual slides and fragments by
291
412
  </section>
292
413
  ```
293
414
 
415
+ 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```.
416
+
294
417
  Whenever the auto-slide mode is resumed or paused the ```autoslideresumed``` and ```autoslidepaused``` events are fired.
295
418
 
296
419
 
@@ -308,16 +431,23 @@ Reveal.configure({
308
431
  });
309
432
  ```
310
433
 
434
+ ### Touch Navigation
435
+
436
+ 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.
437
+
438
+ 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.
439
+
440
+
311
441
  ### Lazy Loading
312
442
 
313
443
  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.
314
444
 
315
- 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.
445
+ 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.
316
446
 
317
447
  ```html
318
448
  <section>
319
449
  <img data-src="image.png">
320
- <iframe data-src="http://slides.com"></iframe>
450
+ <iframe data-src="http://hakim.se"></iframe>
321
451
  <video>
322
452
  <source data-src="video.webm" type="video/webm" />
323
453
  <source data-src="video.mp4" type="video/mp4" />
@@ -342,11 +472,18 @@ Reveal.next();
342
472
  Reveal.prevFragment();
343
473
  Reveal.nextFragment();
344
474
 
475
+ // Randomize the order of slides
476
+ Reveal.shuffle();
477
+
345
478
  // Toggle presentation states, optionally pass true/false to force on/off
346
479
  Reveal.toggleOverview();
347
480
  Reveal.togglePause();
348
481
  Reveal.toggleAutoSlide();
349
482
 
483
+ // Shows a help overlay with keyboard shortcuts, optionally pass true/false
484
+ // to force on/off
485
+ Reveal.toggleHelp();
486
+
350
487
  // Change a config value at runtime
351
488
  Reveal.configure({ controls: true });
352
489
 
@@ -360,9 +497,14 @@ Reveal.getScale();
360
497
  Reveal.getPreviousSlide();
361
498
  Reveal.getCurrentSlide();
362
499
 
363
- Reveal.getIndices(); // { h: 0, v: 0 } }
364
- Reveal.getProgress(); // 0-1
365
- Reveal.getTotalSlides();
500
+ Reveal.getIndices(); // { h: 0, v: 0 } }
501
+ Reveal.getPastSlideCount();
502
+ Reveal.getProgress(); // (0 == first slide, 1 == last slide)
503
+ Reveal.getSlides(); // Array of all slides
504
+ Reveal.getTotalSlides(); // total number of slides
505
+
506
+ // Returns the speaker notes for the current slide
507
+ Reveal.getSlideNotes();
366
508
 
367
509
  // State checks
368
510
  Reveal.isFirstSlide();
@@ -374,7 +516,7 @@ Reveal.isAutoSliding();
374
516
 
375
517
  ### Slide Changed Event
376
518
 
377
- An '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.
519
+ 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.
378
520
 
379
521
  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.
380
522
 
@@ -415,32 +557,65 @@ Reveal.addEventListener( 'somestate', function() {
415
557
 
416
558
  ### Slide Backgrounds
417
559
 
418
- 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. Below are a few examples.
560
+ 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.
419
561
 
562
+ #### Color Backgrounds
563
+ All CSS color formats are supported, like rgba() or hsl().
420
564
  ```html
421
- <section data-background="#ff0000">
422
- <h2>All CSS color formats are supported, like rgba() or hsl().</h2>
565
+ <section data-background-color="#ff0000">
566
+ <h2>Color</h2>
423
567
  </section>
424
- <section data-background="http://example.com/image.png">
425
- <h2>This slide will have a full-size background image.</h2>
568
+ ```
569
+
570
+ #### Image Backgrounds
571
+ By default, background images are resized to cover the full page. Available options:
572
+
573
+ | Attribute | Default | Description |
574
+ | :--------------------------- | :--------- | :---------- |
575
+ | data-background-image | | URL of the image to show. GIFs restart when the slide opens. |
576
+ | data-background-size | cover | See [background-size](https://developer.mozilla.org/docs/Web/CSS/background-size) on MDN. |
577
+ | data-background-position | center | See [background-position](https://developer.mozilla.org/docs/Web/CSS/background-position) on MDN. |
578
+ | data-background-repeat | no-repeat | See [background-repeat](https://developer.mozilla.org/docs/Web/CSS/background-repeat) on MDN. |
579
+ ```html
580
+ <section data-background-image="http://example.com/image.png">
581
+ <h2>Image</h2>
426
582
  </section>
427
- <section data-background="http://example.com/image.png" data-background-size="100px" data-background-repeat="repeat">
428
- <h2>This background image will be sized to 100px and repeated.</h2>
583
+ <section data-background-image="http://example.com/image.png" data-background-size="100px" data-background-repeat="repeat">
584
+ <h2>This background image will be sized to 100px and repeated</h2>
429
585
  </section>
430
- <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">
431
- <h2>Video. Multiple sources can be defined using a comma separated list.</h2>
586
+ ```
587
+
588
+ #### Video Backgrounds
589
+ Automatically plays a full size video behind the slide.
590
+
591
+ | Attribute | Default | Description |
592
+ | :--------------------------- | :------ | :---------- |
593
+ | data-background-video | | A single video source, or a comma separated list of video sources. |
594
+ | data-background-video-loop | false | Flags if the video should play repeatedly. |
595
+ | data-background-video-muted | false | Flags if the audio should be muted. |
596
+ | data-background-size | cover | Use `cover` for full screen and some cropping or `contain` for letterboxing. |
597
+
598
+ ```html
599
+ <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>
600
+ <h2>Video</h2>
432
601
  </section>
433
- <section data-background-iframe="https://slides.com">
434
- <h2>Embeds a web page as a background. Note that the page won't be interactive.</h2>
602
+ ```
603
+
604
+ #### Iframe Backgrounds
605
+ Embeds a web page as a slide background that covers 100% of the reveal.js width and height. The iframe is in the background layer, behind your slides, and as such it's not possible to interact with it by default. To make your background interactive, you can add the `data-background-interactive` attribute.
606
+ ```html
607
+ <section data-background-iframe="https://slides.com" data-background-interactive>
608
+ <h2>Iframe</h2>
435
609
  </section>
436
610
  ```
437
611
 
612
+ #### Background Transitions
438
613
  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.
439
614
 
440
615
 
441
616
  ### Parallax Background
442
617
 
443
- If you want to use a parallax scrolling background, set the two following config properties when initializing reveal.js (the third one is optional).
618
+ 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).
444
619
 
445
620
  ```javascript
446
621
  Reveal.initialize({
@@ -451,8 +626,11 @@ Reveal.initialize({
451
626
  // Parallax background size
452
627
  parallaxBackgroundSize: '', // CSS syntax, e.g. "2100px 900px" - currently only pixels are supported (don't use % or auto)
453
628
 
454
- // This slide transition gives best results:
455
- transition: 'slide'
629
+ // Number of pixels to move the parallax background per slide
630
+ // - Calculated automatically unless specified
631
+ // - Set to 0 to disable movement along an axis
632
+ parallaxBackgroundHorizontal: 200,
633
+ parallaxBackgroundVertical: 50
456
634
 
457
635
  });
458
636
  ```
@@ -474,7 +652,25 @@ The global presentation transition is set using the ```transition``` config valu
474
652
  </section>
475
653
  ```
476
654
 
477
- Note that this does not work with the page and cube transitions.
655
+ You can also use different in and out transitions for the same slide:
656
+
657
+ ```html
658
+ <section data-transition="slide">
659
+ The train goes on …
660
+ </section>
661
+ <section data-transition="slide">
662
+ and on …
663
+ </section>
664
+ <section data-transition="slide-in fade-out">
665
+ and stops.
666
+ </section>
667
+ <section data-transition="fade-in slide-out">
668
+ (Passengers entering and leaving)
669
+ </section>
670
+ <section data-transition="slide">
671
+ And it starts again.
672
+ </section>
673
+ ```
478
674
 
479
675
 
480
676
  ### Internal links
@@ -507,8 +703,8 @@ The default fragment style is to start out invisible and fade in. This style can
507
703
  <section>
508
704
  <p class="fragment grow">grow</p>
509
705
  <p class="fragment shrink">shrink</p>
510
- <p class="fragment roll-in">roll-in</p>
511
706
  <p class="fragment fade-out">fade-out</p>
707
+ <p class="fragment fade-up">fade-up (also down, left and right!)</p>
512
708
  <p class="fragment current-visible">visible only once</p>
513
709
  <p class="fragment highlight-current-blue">blue only once</p>
514
710
  <p class="fragment highlight-red">highlight-red</p>
@@ -554,25 +750,40 @@ Reveal.addEventListener( 'fragmenthidden', function( event ) {
554
750
 
555
751
  ### Code syntax highlighting
556
752
 
557
- By default, Reveal is configured with [highlight.js](http://softwaremaniacs.org/soft/highlight/en/) 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.
753
+ 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.
558
754
 
559
755
  ```html
560
756
  <section>
561
- <pre><code data-trim>
757
+ <pre><code data-trim data-noescape>
562
758
  (def lazy-fib
563
759
  (concat
564
760
  [0 1]
565
- ((fn rfib [a b]
761
+ <mark>((fn rfib [a b]</mark>
566
762
  (lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
567
763
  </code></pre>
568
764
  </section>
569
765
  ```
570
766
 
571
767
  ### Slide number
572
- If you would like to display the page number of the current slide you can do so using the ```slideNumber``` configuration value.
768
+ If you would like to display the page number of the current slide you can do so using the ```slideNumber``` and ```showSlideNumber``` configuration values.
573
769
 
574
770
  ```javascript
771
+ // Shows the slide number using default formatting
575
772
  Reveal.configure({ slideNumber: true });
773
+
774
+ // Slide number formatting can be configured using these variables:
775
+ // "h.v": horizontal . vertical slide number (default)
776
+ // "h/v": horizontal / vertical slide number
777
+ // "c": flattened slide number
778
+ // "c/t": flattened slide number / total slides
779
+ Reveal.configure({ slideNumber: 'c/t' });
780
+
781
+ // Control which views the slide number displays on using the "showSlideNumber" value:
782
+ // "all": show on all views (default)
783
+ // "speaker": only show slide numbers on speaker notes view
784
+ // "print": only show slide numbers when printing to PDF
785
+ Reveal.configure({ showSlideNumber: 'speaker' });
786
+
576
787
  ```
577
788
 
578
789
 
@@ -589,20 +800,26 @@ Reveal.addEventListener( 'overviewhidden', function( event ) { /* ... */ } );
589
800
  Reveal.toggleOverview();
590
801
  ```
591
802
 
803
+
592
804
  ### Fullscreen mode
593
805
  Just press »F« on your keyboard to show your presentation in fullscreen mode. Press the »ESC« key to exit fullscreen mode.
594
806
 
595
807
 
596
808
  ### Embedded media
597
- 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.
598
-
599
809
  Add `data-autoplay` to your media element if you want it to automatically start playing when the slide is shown:
600
810
 
601
811
  ```html
602
812
  <video data-autoplay src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"></video>
603
813
  ```
604
814
 
605
- 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.
815
+ If you want to enable or disable autoplay globally, for all embedded media, you can use the `autoPlayMedia` configuration option. If you set this to `true` ALL media will autoplay regardless of individual `data-autoplay` attributes. If you initialize with `autoPlayMedia: false` NO media will autoplay.
816
+
817
+ Note that embedded HTML5 `<video>`/`<audio>` and YouTube/Vimeo iframes are automatically paused when you navigate away from a slide. This can be disabled by decorating your element with a `data-ignore` attribute.
818
+
819
+
820
+ ### Embedded iframes
821
+
822
+ reveal.js automatically pushes two [post messages](https://developer.mozilla.org/en-US/docs/Web/API/Window.postMessage) to embedded iframes. ```slide:start``` when the slide containing the iframe is made visible and ```slide:stop``` when it is hidden.
606
823
 
607
824
 
608
825
  ### Stretching elements
@@ -632,7 +849,7 @@ When reveal.js runs inside of an iframe it can optionally bubble all of its even
632
849
  ```javascript
633
850
  window.addEventListener( 'message', function( event ) {
634
851
  var data = JSON.parse( event.data );
635
- if( data.namespace === 'reveal' && data.eventName ='slidechanged' ) {
852
+ if( data.namespace === 'reveal' && data.eventName ==='slidechanged' ) {
636
853
  // Slide changed, see data.state for slide number
637
854
  }
638
855
  } );
@@ -655,17 +872,38 @@ Reveal.initialize({
655
872
 
656
873
  ## PDF Export
657
874
 
658
- Presentations can be exported to PDF via a special print stylesheet. This feature requires that you use [Google Chrome](http://google.com/chrome).
875
+ 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.
659
876
  Here's an example of an exported presentation that's been uploaded to SlideShare: http://www.slideshare.net/hakimel/revealjs-300.
660
877
 
661
- 1. Open your presentation with `print-pdf` included anywhere in the query string. This triggers the default index HTML to load the PDF print stylesheet ([css/print/pdf.css](https://github.com/hakimel/reveal.js/blob/master/css/print/pdf.css)). You can test this with [lab.hakim.se/reveal-js?print-pdf](http://lab.hakim.se/reveal-js?print-pdf).
662
- 2. Open the in-browser print dialog (CMD+P).
663
- 3. Change the **Destination** setting to **Save as PDF**.
664
- 4. Change the **Layout** to **Landscape**.
665
- 5. Change the **Margins** to **None**.
666
- 6. Click **Save**.
878
+ ### Page size
879
+ 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.
667
880
 
668
- ![Chrome Print Settings](https://s3.amazonaws.com/hakim-static/reveal-js/pdf-print-settings.png)
881
+ ### Print stylesheet
882
+ 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:
883
+
884
+ ```html
885
+ <script>
886
+ var link = document.createElement( 'link' );
887
+ link.rel = 'stylesheet';
888
+ link.type = 'text/css';
889
+ link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
890
+ document.getElementsByTagName( 'head' )[0].appendChild( link );
891
+ </script>
892
+ ```
893
+
894
+ ### Instructions
895
+ 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).
896
+ * If you want to include [speaker notes](#speaker-notes) in your export, you can append `showNotes=true` to the query string: http://localhost:8000/?print-pdf&showNotes=true
897
+ 1. Open the in-browser print dialog (CTRL/CMD+P).
898
+ 1. Change the **Destination** setting to **Save as PDF**.
899
+ 1. Change the **Layout** to **Landscape**.
900
+ 1. Change the **Margins** to **None**.
901
+ 1. Enable the **Background graphics** option.
902
+ 1. Click **Save**.
903
+
904
+ ![Chrome Print Settings](https://s3.amazonaws.com/hakim-static/reveal-js/pdf-print-settings-2.png)
905
+
906
+ Alternatively you can use the [decktape](https://github.com/astefanutti/decktape) project.
669
907
 
670
908
  ## Theming
671
909
 
@@ -675,7 +913,7 @@ The framework comes with a few different themes included:
675
913
  - white: White background, black text, blue links
676
914
  - league: Gray background, white text, blue links (default theme for reveal.js < 3.0.0)
677
915
  - beige: Beige background, dark text, brown links
678
- - sky: Blue background, thin white text, blue links
916
+ - sky: Blue background, thin dark text, blue links
679
917
  - night: Black background, thick white text, orange links
680
918
  - serif: Cappuccino background, gray text, brown links
681
919
  - simple: White background, black text, blue links
@@ -694,8 +932,12 @@ If you want to add a theme of your own see the instructions here: [/css/theme/RE
694
932
 
695
933
  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.
696
934
 
935
+ 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.
936
+
697
937
  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.
698
938
 
939
+ Alternatively you can add your notes in a `data-notes` attribute on the slide. Like `<section data-notes="Something important"></section>`.
940
+
699
941
  When used locally, this feature requires that reveal.js [runs from a local web server](#full-setup).
700
942
 
701
943
  ```html
@@ -722,6 +964,23 @@ Note:
722
964
  This will only display in the notes window.
723
965
  ```
724
966
 
967
+ #### Share and Print Speaker Notes
968
+
969
+ 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.
970
+
971
+ 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 the slide. If you'd rather print them on a separate page after the slide, set `showNotes: "separate-page"`.
972
+
973
+ #### Speaker notes clock and timers
974
+
975
+ The speaker notes window will also show:
976
+
977
+ - Time elapsed since the beginning of the presentation. If you hover the mouse above this section, a timer reset button will appear.
978
+ - Current wall-clock time
979
+ - (Optionally) a pacing timer which indicates whether the current pace of the presentation is on track for the right timing (shown in green), and if not, whether the presenter should speed up (shown in red) or has the luxury of slowing down (blue).
980
+
981
+ The pacing timer can be enabled by configuring by the `defaultTiming` parameter in the `Reveal` configuration block, which specifies the number of seconds per slide. 120 can be a reasonable rule of thumb. Timings can also be given per slide `<section>` by setting the `data-timing` attribute. Both values are in numbers of seconds.
982
+
983
+
725
984
  ## Server Side Speaker Notes
726
985
 
727
986
  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:
@@ -739,14 +998,14 @@ Reveal.initialize({
739
998
 
740
999
  Then:
741
1000
 
742
- 1. Install [Node.js](http://nodejs.org/)
1001
+ 1. Install [Node.js](http://nodejs.org/) (4.0.0 or later)
743
1002
  2. Run ```npm install```
744
1003
  3. Run ```node plugin/notes-server```
745
1004
 
746
1005
 
747
1006
  ## Multiplexing
748
1007
 
749
- 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 [http://revealjs.jit.su/](http://revealjs.jit.su).
1008
+ 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/).
750
1009
 
751
1010
  The multiplex plugin needs the following 3 things to operate:
752
1011
 
@@ -757,7 +1016,7 @@ The multiplex plugin needs the following 3 things to operate:
757
1016
  More details:
758
1017
 
759
1018
  #### Master presentation
760
- 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:
1019
+ 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:
761
1020
 
762
1021
  1. ```npm install node-static```
763
1022
  2. ```static```
@@ -775,12 +1034,12 @@ Reveal.initialize({
775
1034
  // Example values. To generate your own, see the socket.io server instructions.
776
1035
  secret: '13652805320794272084', // Obtained from the socket.io server. Gives this (the master) control of the presentation
777
1036
  id: '1ea875674b17ca76', // Obtained from socket.io server
778
- url: 'revealjs.jit.su:80' // Location of socket.io server
1037
+ url: 'https://reveal-js-multiplex-ccjbegmaii.now.sh' // Location of socket.io server
779
1038
  },
780
1039
 
781
1040
  // Don't forget to add the dependencies
782
1041
  dependencies: [
783
- { src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.16/socket.io.min.js', async: true },
1042
+ { src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
784
1043
  { src: 'plugin/multiplex/master.js', async: true },
785
1044
 
786
1045
  // and if you want speaker notes
@@ -803,12 +1062,12 @@ Reveal.initialize({
803
1062
  // Example values. To generate your own, see the socket.io server instructions.
804
1063
  secret: null, // null so the clients do not have control of the master presentation
805
1064
  id: '1ea875674b17ca76', // id, obtained from socket.io server
806
- url: 'revealjs.jit.su:80' // Location of socket.io server
1065
+ url: 'https://reveal-js-multiplex-ccjbegmaii.now.sh' // Location of socket.io server
807
1066
  },
808
1067
 
809
1068
  // Don't forget to add the dependencies
810
1069
  dependencies: [
811
- { src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.16/socket.io.min.js', async: true },
1070
+ { src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
812
1071
  { src: 'plugin/multiplex/client.js', async: true }
813
1072
 
814
1073
  // other dependencies...
@@ -822,15 +1081,17 @@ Server that receives the slideChanged events from the master presentation and br
822
1081
  1. ```npm install```
823
1082
  2. ```node plugin/multiplex```
824
1083
 
825
- Or you use the socket.io server at [http://revealjs.jit.su](http://revealjs.jit.su).
1084
+ Or you can use the socket.io server at [https://reveal-js-multiplex-ccjbegmaii.now.sh/](https://reveal-js-multiplex-ccjbegmaii.now.sh/).
1085
+
1086
+ 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).
826
1087
 
827
- 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 [http://revealjs.jit.su](http://revealjs.jit.su), visit [http://revealjs.jit.su/token](http://revealjs.jit.su/token).
1088
+ 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.
828
1089
 
829
- You are very welcome to point your presentations at the Socket.io server running at [http://revealjs.jit.su](http://revealjs.jit.su), 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.
1090
+ For anything mission critical I recommend you run your own server. The easiest way to do this is by installing [now](https://zeit.co/now). With that installed, deploying your own Multiplex server is as easy running the following command from the reveal.js folder: `now plugin/multiplex`.
830
1091
 
831
1092
  ##### socket.io server as file static server
832
1093
 
833
- The socket.io server can play the role of static file server for your client presentation, as in the example at [http://revealjs.jit.su](http://revealjs.jit.su). (Open [http://revealjs.jit.su](http://revealjs.jit.su) in two browsers. Navigate through the slides on one, and the other will update to match.)
1094
+ 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.)
834
1095
 
835
1096
  Example configuration:
836
1097
  ```javascript
@@ -846,14 +1107,14 @@ Reveal.initialize({
846
1107
 
847
1108
  // Don't forget to add the dependencies
848
1109
  dependencies: [
849
- { src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.16/socket.io.min.js', async: true },
1110
+ { src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
850
1111
  { src: 'plugin/multiplex/client.js', async: true }
851
1112
 
852
1113
  // other dependencies...
853
1114
  ]
854
1115
  ```
855
1116
 
856
- 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 [http://revealjs.jit.su](http://revealjs.jit.su) 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. ;)
1117
+ 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. ;)
857
1118
 
858
1119
  Example configuration:
859
1120
  ```javascript
@@ -869,7 +1130,7 @@ Reveal.initialize({
869
1130
 
870
1131
  // Don't forget to add the dependencies
871
1132
  dependencies: [
872
- { src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.16/socket.io.min.js', async: true },
1133
+ { src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
873
1134
  { src: 'plugin/multiplex/master.js', async: true },
874
1135
  { src: 'plugin/multiplex/client.js', async: true }
875
1136
 
@@ -878,56 +1139,11 @@ Reveal.initialize({
878
1139
  });
879
1140
  ```
880
1141
 
881
- ## Leap Motion
882
- The Leap Motion plugin lets you utilize your [Leap Motion](https://www.leapmotion.com/) device to control basic navigation of your presentation. The gestures currently supported are:
883
-
884
- ##### 1 to 2 fingers
885
- Pointer &mdash; Point to anything on screen. Move your finger past the device to expand the pointer.
886
-
887
- ##### 1 hand + 3 or more fingers (left/right/up/down)
888
- Navigate through your slides. See config options to invert movements.
889
-
890
- ##### 2 hands upwards
891
- Toggle the overview mode. Do it a second time to exit the overview.
892
-
893
- #### Config Options
894
- You can edit the following options:
895
-
896
- | Property | Default | Description
897
- | ----------------- |:-----------------:| :-------------
898
- | autoCenter | true | Center the pointer based on where you put your finger into the leap motions detection field.
899
- | gestureDelay | 500 | How long to delay between gestures in milliseconds.
900
- | naturalSwipe | true | Swipe as though you were touching a touch screen. Set to false to invert.
901
- | pointerColor | #00aaff | The color of the pointer.
902
- | pointerOpacity | 0.7 | The opacity of the pointer.
903
- | pointerSize | 15 | The minimum height and width of the pointer.
904
- | pointerTolerance | 120 | Bigger = slower pointer.
905
-
906
-
907
- Example configuration:
908
- ```js
909
- Reveal.initialize({
910
-
911
- // other options...
912
-
913
- leap: {
914
- naturalSwipe : false, // Invert swipe gestures
915
- pointerOpacity : 0.5, // Set pointer opacity to 0.5
916
- pointerColor : '#d80000' // Red pointer
917
- },
918
-
919
- dependencies: [
920
- { src: 'plugin/leap/leap.js', async: true }
921
- ]
922
-
923
- });
924
- ```
925
-
926
1142
  ## MathJax
927
1143
 
928
1144
  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).
929
1145
 
930
- 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.
1146
+ 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.
931
1147
 
932
1148
  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.
933
1149
 
@@ -937,10 +1153,10 @@ Reveal.initialize({
937
1153
  // other options ...
938
1154
 
939
1155
  math: {
940
- mathjax: 'http://cdn.mathjax.org/mathjax/latest/MathJax.js',
1156
+ mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js',
941
1157
  config: 'TeX-AMS_HTML-full' // See http://docs.mathjax.org/en/latest/config-files.html
942
1158
  },
943
-
1159
+
944
1160
  dependencies: [
945
1161
  { src: 'plugin/math/math.js', async: true }
946
1162
  ]
@@ -970,33 +1186,31 @@ The core of reveal.js is very easy to install. You'll simply need to download a
970
1186
 
971
1187
  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.
972
1188
 
973
- 1. Install [Node.js](http://nodejs.org/)
974
-
975
- 2. Install [Grunt](http://gruntjs.com/getting-started#installing-the-cli)
1189
+ 1. Install [Node.js](http://nodejs.org/) (4.0.0 or later)
976
1190
 
977
- 4. Clone the reveal.js repository
1191
+ 1. Clone the reveal.js repository
978
1192
  ```sh
979
1193
  $ git clone https://github.com/hakimel/reveal.js.git
980
1194
  ```
981
1195
 
982
- 5. Navigate to the reveal.js folder
1196
+ 1. Navigate to the reveal.js folder
983
1197
  ```sh
984
1198
  $ cd reveal.js
985
1199
  ```
986
1200
 
987
- 6. Install dependencies
1201
+ 1. Install dependencies
988
1202
  ```sh
989
1203
  $ npm install
990
1204
  ```
991
1205
 
992
- 7. Serve the presentation and monitor source files for changes
1206
+ 1. Serve the presentation and monitor source files for changes
993
1207
  ```sh
994
- $ grunt serve
1208
+ $ npm start
995
1209
  ```
996
1210
 
997
- 8. Open <http://localhost:8000> to view your presentation
1211
+ 1. Open <http://localhost:8000> to view your presentation
998
1212
 
999
- You can change the port by using `grunt serve --port 8001`.
1213
+ You can change the port by using `npm start -- --port=8001`.
1000
1214
 
1001
1215
 
1002
1216
  ### Folder Structure
@@ -1010,4 +1224,4 @@ Some reveal.js features, like external Markdown and speaker notes, require that
1010
1224
 
1011
1225
  MIT licensed
1012
1226
 
1013
- Copyright (C) 2015 Hakim El Hattab, http://hakim.se
1227
+ Copyright (C) 2017 Hakim El Hattab, http://hakim.se