vendor/reveal.js/README.md in slide_hero-0.0.3 vs vendor/reveal.js/README.md in slide_hero-0.0.4
- old
+ new
@@ -9,11 +9,11 @@
- [Installation](#installation): Step-by-step instructions for getting reveal.js running on your computer.
- [Changelog](https://github.com/hakimel/reveal.js/releases): Up-to-date version history.
- [Examples](https://github.com/hakimel/reveal.js/wiki/Example-Presentations): Presentations created with reveal.js, add your own!
- [Browser Support](https://github.com/hakimel/reveal.js/wiki/Browser-Support): Explanation of browser support and fallbacks.
-## Slides
+## Online Editor
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://slid.es](http://slid.es).
## Instructions
@@ -52,14 +52,48 @@
#### External Markdown
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.
+When used locally, this feature requires that reveal.js [runs from a local web server](#full-setup).
+
```html
-<section data-markdown="example.md" data-separator="^\n\n\n" data-vertical="^\n\n" data-notes="^Note:" data-charset="iso-8859-15"></section>
+<section data-markdown="example.md"
+ data-separator="^\n\n\n"
+ data-vertical="^\n\n"
+ data-notes="^Note:"
+ data-charset="iso-8859-15">
+</section>
```
+#### Element Attributes
+
+Special syntax (in html comment) is available for adding attributes to Markdown elements. This is useful for fragments, amongst other things.
+
+```html
+<section data-markdown>
+ <script type="text/template">
+ - Item 1 <!-- .element: class="fragment" data-fragment-index="2" -->
+ - Item 2 <!-- .element: class="fragment" data-fragment-index="1" -->
+ </script>
+</section>
+```
+
+#### Slide Attributes
+
+Special syntax (in html comment) is available for adding attributes to the slide `<section>` elements generated by your Markdown.
+
+```html
+<section data-markdown>
+ <script type="text/template">
+ <!-- .slide: data-background="#ff0000" -->
+ Mardown content
+ </script>
+</section>
+```
+
+
### Configuration
At the end of your page you need to initialize reveal by running the following code. Note that all config values are optional and will default as specified below.
```javascript
@@ -69,48 +103,77 @@
controls: true,
// Display a presentation progress bar
progress: true,
+ // Display the page number of the current slide
+ slideNumber: false,
+
// Push each slide change to the browser history
history: false,
// Enable keyboard shortcuts for navigation
keyboard: true,
- // Enable touch events for navigation
- touch: true,
-
// Enable the slide overview mode
overview: true,
// Vertical centering of slides
center: true,
+ // Enables touch navigation on devices with touch input
+ touch: true,
+
// Loop the presentation
loop: false,
// Change the presentation direction to be RTL
rtl: false,
+ // Turns fragments on and off globally
+ fragments: true,
+
+ // Flags if the presentation is running in an embedded mode,
+ // i.e. contained within a limited portion of the screen
+ embedded: 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
autoSlide: 0,
+ // Stop auto-sliding after user input
+ autoSlideStoppable: true,
+
// Enable slide navigation via mouse wheel
mouseWheel: false,
+ // Hides the address bar on mobile devices
+ hideAddressBar: true,
+
+ // Opens links in an iframe preview overlay
+ previewLinks: false,
+
// Transition style
transition: 'default', // default/cube/page/concave/zoom/linear/fade/none
// Transition speed
transitionSpeed: 'default', // default/fast/slow
- // Transition style for full page backgrounds
- backgroundTransition: 'default' // default/linear/none
+ // Transition style for full page slide backgrounds
+ backgroundTransition: 'default', // default/none/slide/concave/convex/zoom
+ // Number of slides away from the current that are visible
+ viewDistance: 3,
+
+ // Parallax background image
+ parallaxBackgroundImage: '', // e.g. "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'"
+
+ // Parallax background size
+ parallaxBackgroundSize: '' // CSS syntax, e.g. "2100px 900px"
+
+
});
```
Note that the new default vertical centering option will break compatibility with slides that were using transitions with backgrounds (`cube` and `page`). To restore the previous behavior, set `center` to `false`.
@@ -190,10 +253,31 @@
maxScale: 1.0
});
```
+
+### Auto-sliding
+
+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:
+
+```javascript
+// Slide every five seconds
+Reveal.configure({
+ autoSlide: 5000
+});
+```
+
+When this is turned on a control element will appear that enables users to pause and resume auto-sliding. Sliding is also paused automatically as soon as the user starts navigating. You can disable these controls by specifying ```autoSlideStoppable: false``` in your reveal.js config.
+
+You can also override the slide duration for individual slides by using the ```data-autoslide``` attribute on individual sections:
+
+```html
+<section data-autoslide="10000">This will remain on screen for 10 seconds</section>
+```
+
+
### Keyboard Bindings
If you're unhappy with any of the default keyboard bindings you can override them using the ```keyboard``` config option:
```javascript
@@ -290,10 +374,33 @@
```
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.
+### Parallax Background
+
+If you want to use a parallax scrolling background, set the two following config properties when initializing reveal.js (the third one is optional).
+
+```javascript
+Reveal.initialize({
+
+ // Parallax background image
+ parallaxBackgroundImage: '', // e.g. "https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg"
+
+ // Parallax background size
+ parallaxBackgroundSize: '', // CSS syntax, e.g. "2100px 900px" - currently only pixels are supported (don't use % or auto)
+
+ // This slide transition gives best results:
+ transition: linear
+
+});
+```
+
+Make sure that the background size is much bigger than screen size to allow for some scrolling. [View example](http://lab.hakim.se/reveal-js/?parallaxBackgroundImage=https%3A%2F%2Fs3.amazonaws.com%2Fhakim-static%2Freveal-js%2Freveal-parallax-1.jpg¶llaxBackgroundSize=2100px%20900px).
+
+
+
### Slide Transitions
The global presentation transition is set using the ```transition``` config value. You can override the global transition for a specific slide by using the ```data-transition``` attribute:
```html
<section data-transition="zoom">
@@ -328,20 +435,22 @@
<a href="#" class="navigate-next"> <!-- Next vertical or horizontal slide -->
```
### Fragments
-Fragments are used to highlight individual elements on a slide. Every element with the class ```fragment``` will be stepped through before moving on to the next slide. Here's an example: http://lab.hakim.se/reveal-js/#/16
+Fragments are used to highlight individual elements on a slide. Every element with the class ```fragment``` will be stepped through before moving on to the next slide. Here's an example: http://lab.hakim.se/reveal-js/#/fragments
The default fragment style is to start out invisible and fade in. This style can be changed by appending a different class to the fragment:
```html
<section>
<p class="fragment grow">grow</p>
<p class="fragment shrink">shrink</p>
<p class="fragment roll-in">roll-in</p>
<p class="fragment fade-out">fade-out</p>
+ <p class="fragment current-visible">visible only once</p>
+ <p class="fragment highlight-current-blue">blue only once</p>
<p class="fragment highlight-red">highlight-red</p>
<p class="fragment highlight-green">highlight-green</p>
<p class="fragment highlight-blue">highlight-blue</p>
</section>
```
@@ -395,11 +504,18 @@
(lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
</code></pre>
</section>
```
+### Slide number
+If you would like to display the page number of the current slide you can do so using the ```slideNumber``` configuration value.
+```javascript
+Reveal.configure({ slideNumber: true });
+```
+
+
### Overview mode
Press "Esc" or "o" keys to toggle the overview mode on and off. While you're in this mode, you can still navigate between slides,
as if you were at 1,000 feet above your presentation. The overview mode comes with a few API hooks:
@@ -422,11 +538,13 @@
```html
<video data-autoplay src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"></video>
```
+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.
+
### Stretching elements
Sometimes it's desirable to have an element, like an image or video, stretch to consume as much space as possible within a given slide. This can be done by adding the ```.stretch``` class to an element as seen below:
```html
<section>
@@ -462,10 +580,11 @@
- beige: Beige background, dark text, brown links
- sky: Blue background, thin white text, blue links
- night: Black background, thick white text, orange links
- serif: Cappuccino background, gray text, brown links
- simple: White background, black text, blue links
+- solarized: Cream-colored background, dark green text, blue links
Each theme is available as a separate stylesheet. To change theme you will need to replace **default** below with your desired theme name in index.html:
```html
<link rel="stylesheet" href="css/theme/default.css" id="theme">
@@ -478,10 +597,12 @@
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.
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.
+When used locally, this feature requires that reveal.js [runs from a local web server](#full-setup).
+
```html
<section>
<h2>Some Slide</h2>
<aside class="notes">
@@ -662,36 +783,32 @@
## 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 — Point to anything on screen. Move your finger past the device to expand the pointer.
+Pointer — 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
-
+##### 1 hand + 3 or more fingers (left/right/up/down)
Navigate through your slides. See config options to invert movements.
-##### 2 hands
-* Up
-
+##### 2 hands upwards
Toggle the overview mode. Do it a second time to exit the overview.
#### Config Options
You can edit the following options:
-* autoCenter: Defaults to true. Center the pointer based on where you put your finger into the leap motions detection field.
-* gestureDelay: Defaults to 500. How long to delay between gestures in milliseconds.
-* naturalSwipe: Defaults to true. Swipe as though you were touching a touch screen. Set to false to invert.
-* pointerColor: Defaults to #00aaff. The color of the pointer.
-* pointerOpacity: Defaults to 0.7. The opacity of the pointer.
-* pointerSize: Defaults to 15. The minimum height and width of the pointer.
-* pointerTolerance: Defaults to 120. Bigger = slower pointer.
+| 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...
@@ -732,11 +849,11 @@
]
});
```
-Read MathJax's documentation if you want [secure delivery](http://docs.mathjax.org/en/latest/start.html#secure-access-to-the-cdn) or serve [specific versons](http://docs.mathjax.org/en/latest/configuration.html#loading-mathjax-from-the-cdn) for stabilty.
+Read MathJax's documentation if you need [HTTPS delivery](http://docs.mathjax.org/en/latest/start.html#secure-access-to-the-cdn) or serving of [specific versions](http://docs.mathjax.org/en/latest/configuration.html#loading-mathjax-from-the-cdn) for stability.
## Installation
The **basic setup** is for authoring presentations only. The **full setup** gives you access to all reveal.js features and plugins such as speaker notes as well as the development tasks needed to make changes to the source.
@@ -752,44 +869,62 @@
3. Open index.html in a browser to view it
### Full setup
-Some reveal.js features, like external markdown, 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.
+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.
1. Install [Node.js](http://nodejs.org/)
2. Install [Grunt](http://gruntjs.com/getting-started#installing-the-cli)
4. Clone the reveal.js repository
+```sh
+$ git clone https://github.com/hakimel/reveal.js.git
```
-$ git clone git@github.com:hakimel/reveal.js.git
-```
5. Navigate to the reveal.js folder
-```
+```sh
$ cd reveal.js
```
6. Install dependencies
-```
+```sh
$ npm install
```
7. Serve the presentation and monitor source files for changes
-```
+```sh
$ grunt serve
```
8. Open <http://localhost:8000> to view your presentation
+You can change the port by using `grunt serve --port 8001`.
+
### Folder Structure
- **css/** Core styles without which the project does not function
- **js/** Like above but for JavaScript
- **plugin/** Components that have been developed as extensions to reveal.js
- **lib/** All other third party assets (JavaScript, CSS, fonts)
+
+### Contributing
+
+Please keep the [issue tracker](http://github.com/hakimel/reveal.js/issues) limited to **bug reports**, **feature requests** and **pull requests**. If you are reporting a bug make sure to include information about which browser and operating system you are using as well as the necessary steps to reproduce the issue.
+
+If you have personal support questions use [StackOverflow](http://stackoverflow.com/questions/tagged/reveal.js).
+
+
+#### Pull requests
+
+- Should follow the coding style of the file you work in, most importantly:
+ - Tabs to indent
+ - Single-quoted strings
+- Should be made towards the **dev branch**
+- Should be submitted from a feature/topic branch (not your master)
+- Should not include the minified **reveal.min.js** file
## License
MIT licensed