aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md187
1 files changed, 79 insertions, 108 deletions
diff --git a/README.md b/README.md
index 3137f5d..d2ba20b 100644
--- a/README.md
+++ b/README.md
@@ -141,6 +141,9 @@ Reveal.initialize({
// key is pressed
help: true,
+ // Flags if speaker notes should be visible to all viewers
+ showNotes: false,
+
// Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoslide attribute on your slides
@@ -176,10 +179,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
});
```
@@ -196,6 +200,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:
@@ -219,9 +251,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 }
]
@@ -246,34 +275,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:
@@ -313,6 +314,13 @@ Reveal.configure({
});
```
+### Touch Navigation
+
+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.
+
+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.
+
+
### Lazy Loading
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.
@@ -369,6 +377,9 @@ Reveal.getIndices(); // { h: 0, v: 0 } }
Reveal.getProgress(); // 0-1
Reveal.getTotalSlides();
+// Returns the speaker notes for the current slide
+Reveal.getSlideNotes();
+
// State checks
Reveal.isFirstSlide();
Reveal.isLastSlide();
@@ -456,9 +467,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
@@ -503,9 +514,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">```):
@@ -582,7 +590,10 @@ 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. 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.
+<<<<<<< HEAD
+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.
+=======
+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.
```html
<section>
@@ -604,11 +615,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' });
```
@@ -669,7 +680,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
}
} );
@@ -700,9 +711,10 @@ Here's an example of an exported presentation that's been uploaded to SlideShare
3. Change the **Destination** setting to **Save as PDF**.
4. Change the **Layout** to **Landscape**.
5. Change the **Margins** to **None**.
-6. Click **Save**.
+6. Enable the **Background graphics** option.
+7. Click **Save**.
-![Chrome Print Settings](https://s3.amazonaws.com/hakim-static/reveal-js/pdf-print-settings.png)
+![Chrome Print Settings](https://s3.amazonaws.com/hakim-static/reveal-js/pdf-print-settings-2.png)
Alternatively you can use the [decktape](https://github.com/astefanutti/decktape) project.
@@ -735,6 +747,8 @@ reveal.js comes with a speaker notes plugin which can be used to present per-sli
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.
+Alternatively you can add your notes in a `data-notes` attribute on the slide. Like `<section data-notes="Something important"></section>`.
+
When used locally, this feature requires that reveal.js [runs from a local web server](#full-setup).
```html
@@ -747,6 +761,8 @@ When used locally, this feature requires that reveal.js [runs from a local web s
</section>
```
+Notes are only visible to you in the speaker view. If you wish to share your notes with the audience initialize reveal.js with the `showNotes` config value set to `true`.
+
If you're using the external Markdown plugin, you can add notes with the help of a special delimiter:
```html
@@ -785,7 +801,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:
@@ -814,12 +830,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
@@ -842,12 +858,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...
@@ -861,15 +877,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
@@ -885,14 +901,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
@@ -908,7 +924,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 }
@@ -917,51 +933,6 @@ Reveal.initialize({
});
```
-## Leap Motion
-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:
-
-##### 1 to 2 fingers
-Pointer &mdash; Point to anything on screen. Move your finger past the device to expand the pointer.
-
-##### 1 hand + 3 or more fingers (left/right/up/down)
-Navigate through your slides. See config options to invert movements.
-
-##### 2 hands upwards
-Toggle the overview mode. Do it a second time to exit the overview.
-
-#### Config Options
-You can edit the following options:
-
-| Property | Default | Description
-| ----------------- |:-----------------:| :-------------
-| autoCenter | true | Center the pointer based on where you put your finger into the leap motions detection field.
-| gestureDelay | 500 | How long to delay between gestures in milliseconds.
-| naturalSwipe | true | Swipe as though you were touching a touch screen. Set to false to invert.
-| pointerColor | #00aaff | The color of the pointer.
-| pointerOpacity | 0.7 | The opacity of the pointer.
-| pointerSize | 15 | The minimum height and width of the pointer.
-| pointerTolerance | 120 | Bigger = slower pointer.
-
-
-Example configuration:
-```js
-Reveal.initialize({
-
- // other options...
-
- leap: {
- naturalSwipe : false, // Invert swipe gestures
- pointerOpacity : 0.5, // Set pointer opacity to 0.5
- pointerColor : '#d80000' // Red pointer
- },
-
- dependencies: [
- { src: 'plugin/leap/leap.js', async: true }
- ]
-
-});
-```
-
## MathJax
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).
@@ -1049,4 +1020,4 @@ Some reveal.js features, like external Markdown and speaker notes, require that
MIT licensed
-Copyright (C) 2015 Hakim El Hattab, http://hakim.se
+Copyright (C) 2016 Hakim El Hattab, http://hakim.se