From 80bc1971e017fcf3b90d7123b38e7c3c7472de2b Mon Sep 17 00:00:00 2001 From: Benjamin Tan Date: Tue, 6 Feb 2018 19:39:03 +0800 Subject: [PATCH 1/5] Docs: Add note about Windows carriage returns. Closes #1808. --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9d71472..563b305 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 -
+
``` From 57a4c45cf69b11cb58304085b84ce3b095fb3077 Mon Sep 17 00:00:00 2001 From: Benjamin Tan Date: Tue, 6 Feb 2018 22:12:35 +0800 Subject: [PATCH 2/5] Docs: avoid recommending global Grunt installation. Closes #1951. --- css/theme/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: From 410f7767b9c96c330a1b62d35acbee666021e6ad Mon Sep 17 00:00:00 2001 From: Benjamin Tan Date: Tue, 6 Feb 2018 22:34:25 +0800 Subject: [PATCH 3/5] Docs: mention that syntax highlighting requires CSS theme file. Closes #2075. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 563b305..fb93b7e 100644 --- a/README.md +++ b/README.md @@ -765,7 +765,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 `` to call out a line of code, add the `data-noescape` attribute to the `` 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 `` to call out a line of code, add the `data-noescape` attribute to the `` element. ```html
From 7991693bde3ee680868dfbfa1291d96735571c22 Mon Sep 17 00:00:00 2001 From: Benjamin Tan Date: Wed, 7 Feb 2018 12:51:14 +0800 Subject: [PATCH 4/5] Docs: add note on how to enable/disable preview links individually. Closes #2005. --- README.md | 2 ++ js/reveal.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index fb93b7e..f2ab6ca 100644 --- a/README.md +++ b/README.md @@ -270,6 +270,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 diff --git a/js/reveal.js b/js/reveal.js index f125c55..c371371 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -145,6 +145,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 From 5d273cfb2986b77bacee28301ea108a81e7616bc Mon Sep 17 00:00:00 2001 From: John Muccigrosso Date: Sat, 10 Feb 2018 12:32:16 -0500 Subject: [PATCH 5/5] Background repeat & position to parallax background --- js/reveal.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/reveal.js b/js/reveal.js index c371371..6cf8fee 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -173,6 +173,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, @@ -867,6 +873,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