summaryrefslogtreecommitdiffhomepage
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md122
1 files changed, 61 insertions, 61 deletions
diff --git a/README.md b/README.md
index 91da8f6..c52a492 100644
--- a/README.md
+++ b/README.md
@@ -152,6 +152,9 @@ Reveal.initialize({
// Stop auto-sliding after user input
autoSlideStoppable: true,
+ // Use this method for navigation when auto-sliding
+ autoSlideMethod: Reveal.navigateNext,
+
// Enable slide navigation via mouse wheel
mouseWheel: false,
@@ -179,10 +182,11 @@ Reveal.initialize({
// Parallax background size
parallaxBackgroundSize: '', // CSS syntax, e.g. "2100px 900px"
- // Amount to move parallax background (horizontal and vertical) on slide change
- // Number, e.g. 100
- parallaxBackgroundHorizontal: '',
- parallaxBackgroundVertical: ''
+ // Number of pixels to move the parallax background per slide
+ // - Calculated automatically unless specified
+ // - Set to 0 to disable movement along an axis
+ parallaxBackgroundHorizontal: null,
+ parallaxBackgroundVertical: null
});
```
@@ -199,6 +203,34 @@ Reveal.configure({ autoSlide: 5000 });
```
+### Presentation Size
+
+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.
+
+See below for a list of configuration options related to sizing, including default values:
+
+```javascript
+Reveal.initialize({
+
+ ...
+
+ // The "normal" size of the presentation, aspect ratio will be preserved
+ // when the presentation is scaled to fit different resolutions. Can be
+ // specified using percentage units.
+ width: 960,
+ height: 700,
+
+ // Factor of the display size that should remain empty around the content
+ margin: 0.1,
+
+ // Bounds for smallest/largest possible scale to apply to content
+ minScale: 0.2,
+ maxScale: 1.5
+
+});
+```
+
+
### Dependencies
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:
@@ -222,9 +254,6 @@ Reveal.initialize({
// Speaker notes
{ src: 'plugin/notes/notes.js', async: true },
- // Remote control your reveal.js presentation using a touch device
- { src: 'plugin/remotes/remotes.js', async: true },
-
// MathJax
{ src: 'plugin/math/math.js', async: true }
]
@@ -249,34 +278,6 @@ Reveal.addEventListener( 'ready', function( event ) {
```
-### Presentation Size
-
-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.
-
-See below for a list of configuration options related to sizing, including default values:
-
-```javascript
-Reveal.initialize({
-
- ...
-
- // The "normal" size of the presentation, aspect ratio will be preserved
- // when the presentation is scaled to fit different resolutions. Can be
- // specified using percentage units.
- width: 960,
- height: 700,
-
- // Factor of the display size that should remain empty around the content
- margin: 0.1,
-
- // Bounds for smallest/largest possible scale to apply to content
- minScale: 0.2,
- maxScale: 1.5
-
-});
-```
-
-
### Auto-sliding
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:
@@ -299,6 +300,8 @@ You can also override the slide duration for individual slides and fragments by
</section>
```
+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```.
+
Whenever the auto-slide mode is resumed or paused the ```autoslideresumed``` and ```autoslidepaused``` events are fired.
@@ -469,9 +472,9 @@ Reveal.initialize({
// Parallax background size
parallaxBackgroundSize: '', // CSS syntax, e.g. "2100px 900px" - currently only pixels are supported (don't use % or auto)
- // Amount of pixels to move the parallax background per slide step,
- // a value of 0 disables movement along the given axis
- // These are optional, if they aren't specified they'll be calculated automatically
+ // Number of pixels to move the parallax background per slide
+ // - Calculated automatically unless specified
+ // - Set to 0 to disable movement along an axis
parallaxBackgroundHorizontal: 200,
parallaxBackgroundVertical: 50
@@ -516,9 +519,6 @@ You can also use different in and out transitions for the same slide:
```
-Note that this does not work with the page and cube transitions.
-
-
### Internal links
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">```):
@@ -595,7 +595,7 @@ Reveal.addEventListener( 'fragmenthidden', function( event ) {
### Code syntax highlighting
-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.
+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
<section>
@@ -617,11 +617,11 @@ If you would like to display the page number of the current slide you can do so
Reveal.configure({ slideNumber: true });
// Slide number formatting can be configured using these variables:
-// h: current slide's horizontal index
-// v: current slide's vertical index
-// c: current slide index (flattened)
-// t: total number of slides (flattened)
-Reveal.configure({ slideNumber: 'c / t' });
+// "h.v": horizontal . vertical slide number (default)
+// "h/v": horizontal / vertical slide number
+// "c": flattened slide number
+// "c/t": flattened slide number / total slides
+Reveal.configure({ slideNumber: 'c/t' });
```
@@ -682,7 +682,7 @@ When reveal.js runs inside of an iframe it can optionally bubble all of its even
```javascript
window.addEventListener( 'message', function( event ) {
var data = JSON.parse( event.data );
- if( data.namespace === 'reveal' && data.eventName ='slidechanged' ) {
+ if( data.namespace === 'reveal' && data.eventName ==='slidechanged' ) {
// Slide changed, see data.state for slide number
}
} );
@@ -802,7 +802,7 @@ Then:
## Multiplexing
-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).
+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-51546.onmodulus.net/](http://revealjs-51546.onmodulus.net/).
The multiplex plugin needs the following 3 things to operate:
@@ -831,12 +831,12 @@ Reveal.initialize({
// Example values. To generate your own, see the socket.io server instructions.
secret: '13652805320794272084', // Obtained from the socket.io server. Gives this (the master) control of the presentation
id: '1ea875674b17ca76', // Obtained from socket.io server
- url: 'revealjs.jit.su:80' // Location of socket.io server
+ url: 'revealjs-51546.onmodulus.net:80' // Location of socket.io server
},
// Don't forget to add the dependencies
dependencies: [
- { src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.16/socket.io.min.js', async: true },
+ { src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
{ src: 'plugin/multiplex/master.js', async: true },
// and if you want speaker notes
@@ -859,12 +859,12 @@ Reveal.initialize({
// Example values. To generate your own, see the socket.io server instructions.
secret: null, // null so the clients do not have control of the master presentation
id: '1ea875674b17ca76', // id, obtained from socket.io server
- url: 'revealjs.jit.su:80' // Location of socket.io server
+ url: 'revealjs-51546.onmodulus.net:80' // Location of socket.io server
},
// Don't forget to add the dependencies
dependencies: [
- { src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.16/socket.io.min.js', async: true },
+ { src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
{ src: 'plugin/multiplex/client.js', async: true }
// other dependencies...
@@ -878,15 +878,15 @@ Server that receives the slideChanged events from the master presentation and br
1. ```npm install```
2. ```node plugin/multiplex```
-Or you use the socket.io server at [http://revealjs.jit.su](http://revealjs.jit.su).
+Or you use the socket.io server at [http://revealjs-51546.onmodulus.net/](http://revealjs-51546.onmodulus.net/).
-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).
+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-51546.onmodulus.net/](http://revealjs-51546.onmodulus.net/), visit [http://revealjs-51546.onmodulus.net/token](http://revealjs-51546.onmodulus.net/token).
-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.
+You are very welcome to point your presentations at the Socket.io server running at [http://revealjs-51546.onmodulus.net/](http://revealjs-51546.onmodulus.net/), 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.
##### socket.io server as file static server
-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.)
+The socket.io server can play the role of static file server for your client presentation, as in the example at [http://revealjs-51546.onmodulus.net/](http://revealjs-51546.onmodulus.net/). (Open [http://revealjs-51546.onmodulus.net/](http://revealjs-51546.onmodulus.net/) in two browsers. Navigate through the slides on one, and the other will update to match.)
Example configuration:
```javascript
@@ -902,14 +902,14 @@ Reveal.initialize({
// Don't forget to add the dependencies
dependencies: [
- { src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.16/socket.io.min.js', async: true },
+ { src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
{ src: 'plugin/multiplex/client.js', async: true }
// other dependencies...
]
```
-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. ;)
+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-51546.onmodulus.net/](http://revealjs-51546.onmodulus.net/) 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. ;)
Example configuration:
```javascript
@@ -925,7 +925,7 @@ Reveal.initialize({
// Don't forget to add the dependencies
dependencies: [
- { src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.16/socket.io.min.js', async: true },
+ { src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
{ src: 'plugin/multiplex/master.js', async: true },
{ src: 'plugin/multiplex/client.js', async: true }
@@ -948,7 +948,7 @@ Reveal.initialize({
// other options ...
math: {
- mathjax: 'http://cdn.mathjax.org/mathjax/latest/MathJax.js',
+ mathjax: 'https://cdn.mathjax.org/mathjax/latest/MathJax.js',
config: 'TeX-AMS_HTML-full' // See http://docs.mathjax.org/en/latest/config-files.html
},