aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2018-02-22 10:08:02 +0100
committerHakim El Hattab <hakim.elhattab@gmail.com>2018-02-22 10:08:02 +0100
commit5848a432d9c59dfc5ba51d64181183768d8fb24f (patch)
tree3b7cc9e93f6b753742e5ab081bafc245ee7a2f84
parent325162692ea2de30e4f7ebd8b858da15580844f1 (diff)
parent5d273cfb2986b77bacee28301ea108a81e7616bc (diff)
downloadfreenode-live-2017-presentation-5848a432d9c59dfc5ba51d64181183768d8fb24f.tar
freenode-live-2017-presentation-5848a432d9c59dfc5ba51d64181183768d8fb24f.tar.gz
Merge branch 'patch-1' of https://github.com/Jmuccigr/reveal.js into dev
-rw-r--r--README.md18
-rw-r--r--css/theme/README.md2
-rw-r--r--js/reveal.js10
3 files changed, 24 insertions, 6 deletions
diff --git a/README.md b/README.md
index c0d019a..ad7d539 100644
--- a/README.md
+++ b/README.md
@@ -126,11 +126,15 @@ You can write your content as a separate file and have reveal.js load it at runt
When used locally, this feature requires that reveal.js [runs from a local web server](#full-setup). The following example customises all available options:
```html
-<section data-markdown="example.md"
- data-separator="^\n\n\n"
- data-separator-vertical="^\n\n"
- data-separator-notes="^Note:"
+<section data-markdown="example.md"
+ data-separator="^\n\n\n"
+ data-separator-vertical="^\n\n"
+ data-separator-notes="^Note:"
data-charset="iso-8859-15">
+ <!--
+ Note that Windows uses `\r\n` instead of `\n` as its linefeed character.
+ For a regex that supports all operating systems, use `\r?\n` instead of `\n`.
+ -->
</section>
```
@@ -272,6 +276,8 @@ Reveal.initialize({
hideAddressBar: true,
// Opens links in an iframe preview overlay
+ // Add `data-preview-link` and `data-preview-link="false"` to customise each link
+ // individually
previewLinks: false,
// Transition style
@@ -798,7 +804,9 @@ Reveal.addEventListener( 'fragmenthidden', function( event ) {
### Code syntax highlighting
-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.
+By default, Reveal is configured with [highlight.js](https://highlightjs.org/) for code syntax highlighting. To enable syntax highlighting, you'll have to load the highlight plugin ([plugin/highlight/highlight.js](plugin/highlight/highlight.js)) and a highlight.js CSS theme (Reveal comes packaged with the zenburn theme: [lib/css/zenburn.css](lib/css/zenburn.css)).
+
+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>
diff --git a/css/theme/README.md b/css/theme/README.md
index 1bca121..8ae164b 100644
--- a/css/theme/README.md
+++ b/css/theme/README.md
@@ -4,7 +4,7 @@ Themes are written using Sass to keep things modular and reduce the need for rep
## Creating a Theme
-To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js)) when you run `grunt css-themes`.
+To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js)) when you run `npm run build -- css-themes`.
Each theme file does four things in the following order:
diff --git a/js/reveal.js b/js/reveal.js
index 230d001..d4778cb 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -154,6 +154,8 @@
hideAddressBar: true,
// Opens links in an iframe preview overlay
+ // Add `data-preview-link` and `data-preview-link="false"` to customise each link
+ // individually
previewLinks: false,
// Exposes the reveal.js API through window.postMessage
@@ -180,6 +182,12 @@
// Parallax background size
parallaxBackgroundSize: '', // CSS syntax, e.g. "3000px 2000px"
+ // Parallax background repeat
+ parallaxBackgroundRepeat: '', // repeat/repeat-x/repeat-y/no-repeat/initial/inherit
+
+ // Parallax background position
+ parallaxBackgroundPosition: '', // CSS syntax, e.g. "top left"
+
// Amount of pixels to move the parallax background per slide step
parallaxBackgroundHorizontal: null,
parallaxBackgroundVertical: null,
@@ -877,6 +885,8 @@
dom.background.style.backgroundImage = 'url("' + config.parallaxBackgroundImage + '")';
dom.background.style.backgroundSize = config.parallaxBackgroundSize;
+ dom.background.style.backgroundRepeat = config.parallaxBackgroundRepeat;
+ dom.background.style.backgroundPosition = config.parallaxBackgroundPosition;
// Make sure the below properties are set on the element - these properties are
// needed for proper transitions to be set on the element via CSS. To remove