This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-training.git
The following commit(s) were added to refs/heads/develop by this push:
new 54579c2 chore: Updated reveal.js to 4.5.0
54579c2 is described below
commit 54579c23afa618e86645cf236f98ad0071be3cf6
Author: Christofer Dutz <[email protected]>
AuthorDate: Tue Jul 11 16:33:01 2023 +0200
chore: Updated reveal.js to 4.5.0
---
content/Apache/Airflow/src/main/theme/apache.css | 1 -
.../ComDev/ApacheIntro/src/main/theme}/apache.css | 3 +-
.../ComDev/ComDevIntro/src/main/theme}/apache.css | 3 +-
content/Apache/Druid/src/main/theme/apache.css | 2 +-
content/Apache/Flink/src/main/theme/apache.css | 2 +-
content/Apache/Hadoop/src/main/theme/apache.css | 2 +-
content/Apache/Hive/src/main/theme/apache.css | 2 +-
content/Apache/Ignite/src/main/theme/apache.css | 2 +-
.../ReleaseChecklist/src/main/theme}/apache.css | 3 +-
.../src/main/theme}/apache.css | 3 +-
content/Apache/Pulsar/src/main/theme/apache.css | 2 +-
content/Apache/Samza/src/main/theme/apache.css | 2 +-
.../Spark/1-Basics/src/main/theme/apache.css | 2 +-
content/Apache/ZooKeeper/src/main/theme/apache.css | 2 +-
tools/content-parent-pom/pom.xml | 8 +-
.../src/main/resources/apache.css | 3 +-
.../src/main/resources/document.html.slim | 382 ++++++++++-----------
17 files changed, 205 insertions(+), 219 deletions(-)
diff --git a/content/Apache/Airflow/src/main/theme/apache.css
b/content/Apache/Airflow/src/main/theme/apache.css
index 079a53f..f9dcff9 100644
--- a/content/Apache/Airflow/src/main/theme/apache.css
+++ b/content/Apache/Airflow/src/main/theme/apache.css
@@ -24,7 +24,6 @@ section.has-light-background, section.has-light-background
h1, section.has-light
* GLOBAL STYLES
*********************************************/
body {
- background-image: url("../../../images/background.jpg");
background-repeat: no-repeat;
background-size: cover;
background-color: #fff; }
diff --git a/tools/content-parent-resources/src/main/resources/apache.css
b/content/Apache/ComDev/ApacheIntro/src/main/theme/apache.css
similarity index 99%
copy from tools/content-parent-resources/src/main/resources/apache.css
copy to content/Apache/ComDev/ApacheIntro/src/main/theme/apache.css
index 5e94da4..89536b2 100644
--- a/tools/content-parent-resources/src/main/resources/apache.css
+++ b/content/Apache/ComDev/ApacheIntro/src/main/theme/apache.css
@@ -24,7 +24,8 @@ section.has-light-background, section.has-light-background
h1, section.has-light
* GLOBAL STYLES
*********************************************/
body {
- background-image: url("../../../images/background.jpg");
+/* TODO: Fix this */
+/* background-image: url("../../../images/background.jpg");*/
background-repeat: no-repeat;
background-size: cover;
background-color: #fff; }
diff --git a/tools/content-parent-resources/src/main/resources/apache.css
b/content/Apache/ComDev/ComDevIntro/src/main/theme/apache.css
similarity index 99%
copy from tools/content-parent-resources/src/main/resources/apache.css
copy to content/Apache/ComDev/ComDevIntro/src/main/theme/apache.css
index 5e94da4..89536b2 100644
--- a/tools/content-parent-resources/src/main/resources/apache.css
+++ b/content/Apache/ComDev/ComDevIntro/src/main/theme/apache.css
@@ -24,7 +24,8 @@ section.has-light-background, section.has-light-background
h1, section.has-light
* GLOBAL STYLES
*********************************************/
body {
- background-image: url("../../../images/background.jpg");
+/* TODO: Fix this */
+/* background-image: url("../../../images/background.jpg");*/
background-repeat: no-repeat;
background-size: cover;
background-color: #fff; }
diff --git a/content/Apache/Druid/src/main/theme/apache.css
b/content/Apache/Druid/src/main/theme/apache.css
index 079a53f..f3e371b 100644
--- a/content/Apache/Druid/src/main/theme/apache.css
+++ b/content/Apache/Druid/src/main/theme/apache.css
@@ -24,7 +24,7 @@ section.has-light-background, section.has-light-background
h1, section.has-light
* GLOBAL STYLES
*********************************************/
body {
- background-image: url("../../../images/background.jpg");
+ /*background-image: url("../../../images/background.jpg");*/
background-repeat: no-repeat;
background-size: cover;
background-color: #fff; }
diff --git a/content/Apache/Flink/src/main/theme/apache.css
b/content/Apache/Flink/src/main/theme/apache.css
index 079a53f..f3e371b 100644
--- a/content/Apache/Flink/src/main/theme/apache.css
+++ b/content/Apache/Flink/src/main/theme/apache.css
@@ -24,7 +24,7 @@ section.has-light-background, section.has-light-background
h1, section.has-light
* GLOBAL STYLES
*********************************************/
body {
- background-image: url("../../../images/background.jpg");
+ /*background-image: url("../../../images/background.jpg");*/
background-repeat: no-repeat;
background-size: cover;
background-color: #fff; }
diff --git a/content/Apache/Hadoop/src/main/theme/apache.css
b/content/Apache/Hadoop/src/main/theme/apache.css
index 079a53f..f3e371b 100644
--- a/content/Apache/Hadoop/src/main/theme/apache.css
+++ b/content/Apache/Hadoop/src/main/theme/apache.css
@@ -24,7 +24,7 @@ section.has-light-background, section.has-light-background
h1, section.has-light
* GLOBAL STYLES
*********************************************/
body {
- background-image: url("../../../images/background.jpg");
+ /*background-image: url("../../../images/background.jpg");*/
background-repeat: no-repeat;
background-size: cover;
background-color: #fff; }
diff --git a/content/Apache/Hive/src/main/theme/apache.css
b/content/Apache/Hive/src/main/theme/apache.css
index 079a53f..f3e371b 100644
--- a/content/Apache/Hive/src/main/theme/apache.css
+++ b/content/Apache/Hive/src/main/theme/apache.css
@@ -24,7 +24,7 @@ section.has-light-background, section.has-light-background
h1, section.has-light
* GLOBAL STYLES
*********************************************/
body {
- background-image: url("../../../images/background.jpg");
+ /*background-image: url("../../../images/background.jpg");*/
background-repeat: no-repeat;
background-size: cover;
background-color: #fff; }
diff --git a/content/Apache/Ignite/src/main/theme/apache.css
b/content/Apache/Ignite/src/main/theme/apache.css
index 079a53f..f3e371b 100644
--- a/content/Apache/Ignite/src/main/theme/apache.css
+++ b/content/Apache/Ignite/src/main/theme/apache.css
@@ -24,7 +24,7 @@ section.has-light-background, section.has-light-background
h1, section.has-light
* GLOBAL STYLES
*********************************************/
body {
- background-image: url("../../../images/background.jpg");
+ /*background-image: url("../../../images/background.jpg");*/
background-repeat: no-repeat;
background-size: cover;
background-color: #fff; }
diff --git a/tools/content-parent-resources/src/main/resources/apache.css
b/content/Apache/Incubator/ReleaseChecklist/src/main/theme/apache.css
similarity index 99%
copy from tools/content-parent-resources/src/main/resources/apache.css
copy to content/Apache/Incubator/ReleaseChecklist/src/main/theme/apache.css
index 5e94da4..89536b2 100644
--- a/tools/content-parent-resources/src/main/resources/apache.css
+++ b/content/Apache/Incubator/ReleaseChecklist/src/main/theme/apache.css
@@ -24,7 +24,8 @@ section.has-light-background, section.has-light-background
h1, section.has-light
* GLOBAL STYLES
*********************************************/
body {
- background-image: url("../../../images/background.jpg");
+/* TODO: Fix this */
+/* background-image: url("../../../images/background.jpg");*/
background-repeat: no-repeat;
background-size: cover;
background-color: #fff; }
diff --git a/tools/content-parent-resources/src/main/resources/apache.css
b/content/Apache/PLC4X/revolutionizing-iiot-with-plc4x/src/main/theme/apache.css
similarity index 99%
copy from tools/content-parent-resources/src/main/resources/apache.css
copy to
content/Apache/PLC4X/revolutionizing-iiot-with-plc4x/src/main/theme/apache.css
index 5e94da4..89536b2 100644
--- a/tools/content-parent-resources/src/main/resources/apache.css
+++
b/content/Apache/PLC4X/revolutionizing-iiot-with-plc4x/src/main/theme/apache.css
@@ -24,7 +24,8 @@ section.has-light-background, section.has-light-background
h1, section.has-light
* GLOBAL STYLES
*********************************************/
body {
- background-image: url("../../../images/background.jpg");
+/* TODO: Fix this */
+/* background-image: url("../../../images/background.jpg");*/
background-repeat: no-repeat;
background-size: cover;
background-color: #fff; }
diff --git a/content/Apache/Pulsar/src/main/theme/apache.css
b/content/Apache/Pulsar/src/main/theme/apache.css
index 079a53f..f3e371b 100644
--- a/content/Apache/Pulsar/src/main/theme/apache.css
+++ b/content/Apache/Pulsar/src/main/theme/apache.css
@@ -24,7 +24,7 @@ section.has-light-background, section.has-light-background
h1, section.has-light
* GLOBAL STYLES
*********************************************/
body {
- background-image: url("../../../images/background.jpg");
+ /*background-image: url("../../../images/background.jpg");*/
background-repeat: no-repeat;
background-size: cover;
background-color: #fff; }
diff --git a/content/Apache/Samza/src/main/theme/apache.css
b/content/Apache/Samza/src/main/theme/apache.css
index 079a53f..f3e371b 100644
--- a/content/Apache/Samza/src/main/theme/apache.css
+++ b/content/Apache/Samza/src/main/theme/apache.css
@@ -24,7 +24,7 @@ section.has-light-background, section.has-light-background
h1, section.has-light
* GLOBAL STYLES
*********************************************/
body {
- background-image: url("../../../images/background.jpg");
+ /*background-image: url("../../../images/background.jpg");*/
background-repeat: no-repeat;
background-size: cover;
background-color: #fff; }
diff --git a/content/Apache/Spark/1-Basics/src/main/theme/apache.css
b/content/Apache/Spark/1-Basics/src/main/theme/apache.css
index 74cb7b2..1d0a652 100644
--- a/content/Apache/Spark/1-Basics/src/main/theme/apache.css
+++ b/content/Apache/Spark/1-Basics/src/main/theme/apache.css
@@ -24,7 +24,7 @@ section.has-light-background, section.has-light-background
h1, section.has-light
* GLOBAL STYLES
*********************************************/
body {
- background-image: url("../../../images/background.jpg");
+ /*background-image: url("../../../images/background.jpg");*/
background-repeat: no-repeat;
background-size: cover;
background-color: #fff; }
diff --git a/content/Apache/ZooKeeper/src/main/theme/apache.css
b/content/Apache/ZooKeeper/src/main/theme/apache.css
index 13a0d08..ed484e8 100644
--- a/content/Apache/ZooKeeper/src/main/theme/apache.css
+++ b/content/Apache/ZooKeeper/src/main/theme/apache.css
@@ -24,7 +24,7 @@ section.has-light-background, section.has-light-background
h1, section.has-light
* GLOBAL STYLES
*********************************************/
body {
- background-image: url("../../../images/background.jpg");
+ /*background-image: url("../../../images/background.jpg");*/
background-repeat: no-repeat;
background-size: cover;
background-color: #fff; }
diff --git a/tools/content-parent-pom/pom.xml b/tools/content-parent-pom/pom.xml
index 29d3fee..7a22e26 100644
--- a/tools/content-parent-pom/pom.xml
+++ b/tools/content-parent-pom/pom.xml
@@ -50,9 +50,7 @@
<asciidoctorj-revealjs.version>5.0.0.rc1</asciidoctorj-revealjs.version>
<asciidoctorj.diagram.version>2.2.9</asciidoctorj.diagram.version>
- <!-- Reveal.JS 4.x doesn't seem to work yet -->
- <revealjs.version>3.9.2</revealjs.version>
- <!--revealjs.version>4.5.0</revealjs.version-->
+ <revealjs.version>4.5.0</revealjs.version>
<asciidoctor-maven-plugin.version>2.2.4</asciidoctor-maven-plugin.version>
<download-maven-plugin.version>1.7.0</download-maven-plugin.version>
@@ -145,7 +143,7 @@
<goal>wget</goal>
</goals>
<configuration>
-
<url>https://github.com/hakimel/reveal.js/archive/${revealjs.version}.zip</url>
+
<url>https://codeload.github.com/hakimel/reveal.js/zip/refs/tags/${revealjs.version}</url>
<unpack>true</unpack>
<outputFileName>reveal.js-${revealjs.version}.zip</outputFileName>
<outputDirectory>${project.slides.directory}</outputDirectory>
@@ -215,7 +213,7 @@
<resource>
<directory>src/main/theme</directory>
<filtering>true</filtering>
-
<targetPath>${project.slides.directory}/reveal.js-${revealjs.version}/css/theme</targetPath>
+
<targetPath>${project.slides.directory}/reveal.js-${revealjs.version}/dist/theme</targetPath>
</resource>
</resources>
</configuration>
diff --git a/tools/content-parent-resources/src/main/resources/apache.css
b/tools/content-parent-resources/src/main/resources/apache.css
index 5e94da4..89536b2 100644
--- a/tools/content-parent-resources/src/main/resources/apache.css
+++ b/tools/content-parent-resources/src/main/resources/apache.css
@@ -24,7 +24,8 @@ section.has-light-background, section.has-light-background
h1, section.has-light
* GLOBAL STYLES
*********************************************/
body {
- background-image: url("../../../images/background.jpg");
+/* TODO: Fix this */
+/* background-image: url("../../../images/background.jpg");*/
background-repeat: no-repeat;
background-size: cover;
background-color: #fff; }
diff --git
a/tools/content-parent-resources/src/main/resources/document.html.slim
b/tools/content-parent-resources/src/main/resources/document.html.slim
index 878bd76..9bc9acc 100644
--- a/tools/content-parent-resources/src/main/resources/document.html.slim
+++ b/tools/content-parent-resources/src/main/resources/document.html.slim
@@ -1,3 +1,14 @@
+- slides_content = self.content
+- content_for :slides
+ - unless noheader
+ - unless (header_docinfo = docinfo :header, '-revealjs.html').empty?
+ = header_docinfo
+ - if header?
+ include title_slide.html.slim
+ = slides_content
+ - unless (footer_docinfo = docinfo :footer, '-revealjs.html').empty?
+ = footer_docinfo
+
doctype 5
html lang=(attr :lang, 'en' unless attr? :nolang)
head
@@ -16,9 +27,18 @@ html lang=(attr :lang, 'en' unless attr? :nolang)
- [:description, :keywords, :author, :copyright].each do |key|
- if attr? key
meta name=key content=(attr key)
+ - if attr? 'favicon'
+ - if (icon_href = attr 'favicon').empty?
+ - icon_href = 'favicon.ico'
+ - icon_type = 'image/x-icon'
+ - elsif (icon_ext = File.extname icon_href)
+ - icon_type = icon_ext == '.ico' ? 'image/x-icon' :
%(image/#{icon_ext.slice 1, icon_ext.length})
+ - else
+ - icon_type = 'image/x-icon'
+ link rel="icon" type="#{icon_type}" href="#{icon_href}"
- linkcss = (attr? 'linkcss')
- link rel="stylesheet" href="#{revealjsdir}/css/reset.css"
- link rel="stylesheet" href="#{revealjsdir}/css/reveal.css"
+ link rel="stylesheet" href="#{revealjsdir}/dist/reset.css"
+ link rel="stylesheet" href="#{revealjsdir}/dist/reveal.css"
/ START ADDED For Apache Training
/ Start adding c3, d3
@@ -29,7 +49,7 @@ html lang=(attr :lang, 'en' unless attr? :nolang)
/ END ADDED For Apache Training
/ Default theme required even when using custom theme
- link rel='stylesheet' href=(attr :revealjs_customtheme,
%(#{revealjsdir}/css/theme/#{attr 'revealjs_theme', 'black'}.css)) id='theme'
+ link rel='stylesheet' href=(attr :revealjs_customtheme,
%(#{revealjsdir}/dist/theme/#{attr 'revealjs_theme', 'black'}.css)) id='theme'
/! This CSS is generated by the Asciidoctor reveal.js converter to further
integrate AsciiDoc's existing semantic with reveal.js
style type="text/css"
include asciidoctor-compatibility.css
@@ -45,38 +65,10 @@ html lang=(attr :lang, 'en' unless attr? :nolang)
link rel='stylesheet'
href=%(#{cdn_base}/font-awesome/#{font_awesome_version}/css/v4-shims.min.css)
- else
link rel='stylesheet' href=(normalize_web_path %(#{attr
'iconfont-name', 'font-awesome'}.css), (attr 'stylesdir', ''), false)
- - if attr? :stem
- - eqnums_val = (attr 'eqnums', 'none')
- - eqnums_val = 'AMS' if eqnums_val == ''
- - eqnums_opt = %( equationNumbers: { autoNumber: "#{eqnums_val}" } )
- - mathjaxdir = (attr 'mathjaxdir', "#{cdn_base}/mathjax/2.7.6")
- script type='text/x-mathjax-config'
- | MathJax.Hub.Config({
- tex2jax: {
- inlineMath:
[#{Asciidoctor::INLINE_MATH_DELIMITERS[:latexmath].to_s}],
- displayMath:
[#{Asciidoctor::BLOCK_MATH_DELIMITERS[:latexmath].to_s}],
- ignoreClass: "nostem|nolatexmath"
- },
- asciimath2jax: {
- delimiters:
[#{Asciidoctor::BLOCK_MATH_DELIMITERS[:asciimath].to_s}],
- ignoreClass: "nostem|noasciimath"
- },
- TeX: {#{eqnums_opt}}
- });
- script src='#{mathjaxdir}/MathJax.js?config=TeX-MML-AM_HTMLorMML'
-
+ = generate_stem(cdn_base)
- syntax_hl = self.syntax_highlighter
- if syntax_hl && (syntax_hl.docinfo? :head)
=syntax_hl.docinfo :head, self, cdn_base_url: cdn_base, linkcss:
linkcss, self_closing_tag_slash: '/'
-
- /! Printing and PDF exports
- javascript:
- var link = document.createElement( 'link' );
- link.rel = 'stylesheet';
- link.type = 'text/css';
- link.href = window.location.search.match( /print-pdf/gi ) ?
"#{revealjsdir}/css/print/pdf.css" : "#{revealjsdir}/css/print/paper.css";
- document.getElementsByTagName( 'head' )[0].appendChild( link );
-
- if attr? :customcss
link rel='stylesheet' href=((customcss = attr :customcss).empty? ?
'asciidoctor-revealjs.css' : customcss)
- unless (_docinfo = docinfo :head, '-revealjs.html').empty?
@@ -90,188 +82,180 @@ html lang=(attr :lang, 'en' unless attr? :nolang)
.reveal
/ Any section element inside of this container is displayed as a slide
.slides
- - unless noheader
- - unless (_docinfo = docinfo :header, '-revealjs.html').empty?
- = _docinfo
- - if header?
- include title_slide.html.slim
- = content
- - unless (_docinfo = docinfo :footer, '-revealjs.html').empty?
- = _docinfo
+ - yield_content :slides
/ START ADDED For Apache Training
.footer
.left
.right
/ END ADDED For Apache Training
- script src="#{revealjsdir}/js/reveal.js"
+ script src="#{revealjsdir}/dist/reveal.js"
/ Supports easy AsciiDoc syntax for background color
javascript:
- Array.prototype.slice.call(document.querySelectorAll('.slides
section')).forEach(function(slide) {
- if (slide.getAttribute('data-background-color')) return;
- // user needs to explicitly say he wants CSS color to override
otherwise we might break custom css or theme (#226)
- if (!(slide.classList.contains('canvas') ||
slide.classList.contains('background'))) return;
- var bgColor = getComputedStyle(slide).backgroundColor;
- if (bgColor !== 'rgba(0, 0, 0, 0)' && bgColor !== 'transparent') {
- slide.setAttribute('data-background-color', bgColor);
- slide.style.backgroundColor = 'transparent';
- }
- });
-
- // More info about config & dependencies:
- // - https://github.com/hakimel/reveal.js#configuration
- // - https://github.com/hakimel/reveal.js#dependencies
- Reveal.initialize({
- // Display presentation control arrows
- controls: #{to_boolean(attr 'revealjs_controls', true)},
- // Help the user learn the controls by providing hints, for
example by
- // bouncing the down arrow when they first encounter a vertical
slide
- controlsTutorial: #{to_boolean(attr 'revealjs_controlstutorial',
true)},
- // Determines where controls appear, "edges" or "bottom-right"
- controlsLayout: '#{attr 'revealjs_controlslayout',
'bottom-right'}',
- // Visibility rule for backwards navigation arrows; "faded",
"hidden"
- // or "visible"
- controlsBackArrows: '#{attr 'revealjs_controlsbackarrows',
'faded'}',
- // Display a presentation progress bar
- progress: #{to_boolean(attr 'revealjs_progress', true)},
- // Display the page number of the current slide
- slideNumber: #{to_valid_slidenumber(attr 'revealjs_slidenumber',
false)},
- // Control which views the slide number displays on
- showSlideNumber: '#{attr 'revealjs_showslidenumber', 'all'}',
- // Add the current slide number to the URL hash so that reloading
the
- // page/copying the URL will return you to the same slide
- hash: #{to_boolean(attr 'revealjs_hash', false)},
- // Push each slide change to the browser history. Implies `hash:
true`
- history: #{to_boolean(attr 'revealjs_history', false)},
- // Enable keyboard shortcuts for navigation
- keyboard: #{to_boolean(attr 'revealjs_keyboard', true)},
- // Enable the slide overview mode
- overview: #{to_boolean(attr 'revealjs_overview', true)},
- // Disables the default reveal.js slide layout so that you can use
custom CSS layout
- disableLayout: #{to_boolean(attr 'revealjs_disablelayout', false)},
- // Vertical centering of slides
- center: #{to_boolean(attr 'revealjs_center', true)},
- // Enables touch navigation on devices with touch input
- touch: #{to_boolean(attr 'revealjs_touch', true)},
- // Loop the presentation
- loop: #{to_boolean(attr 'revealjs_loop', false)},
- // Change the presentation direction to be RTL
- rtl: #{to_boolean(attr 'revealjs_rtl', false)},
- // See https://github.com/hakimel/reveal.js/#navigation-mode
- navigationMode: '#{attr 'revealjs_navigationmode', 'default'}',
- // Randomizes the order of slides each time the presentation loads
- shuffle: #{to_boolean(attr 'revealjs_shuffle', false)},
- // Turns fragments on and off globally
- fragments: #{to_boolean(attr 'revealjs_fragments', true)},
- // Flags whether to include the current fragment in the URL,
- // so that reloading brings you to the same fragment position
- fragmentInURL: #{to_boolean(attr 'revealjs_fragmentinurl', false)},
- // Flags if the presentation is running in an embedded mode,
- // i.e. contained within a limited portion of the screen
- embedded: #{to_boolean(attr 'revealjs_embedded', false)},
- // Flags if we should show a help overlay when the questionmark
- // key is pressed
- help: #{to_boolean(attr 'revealjs_help', true)},
- // Flags if speaker notes should be visible to all viewers
- showNotes: #{to_boolean(attr 'revealjs_shownotes', false)},
- // Global override for autolaying embedded media
(video/audio/iframe)
- // - null: Media will only autoplay if data-autoplay is present
- // - true: All media will autoplay, regardless of individual
setting
- // - false: No media will autoplay, regardless of individual
setting
- autoPlayMedia: #{attr 'revealjs_autoplaymedia', 'null'},
- // Global override for preloading lazy-loaded iframes
- // - null: Iframes with data-src AND data-preload will be loaded
when within
- // the viewDistance, iframes with only data-src will be loaded
when visible
- // - true: All iframes with data-src will be loaded when within
the viewDistance
- // - false: All iframes with data-src will be loaded only when
visible
- preloadIframes: #{attr 'revealjs_preloadiframes', 'null'},
- // 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: #{attr 'revealjs_autoslide', 0},
- // Stop auto-sliding after user input
- autoSlideStoppable: #{to_boolean(attr
'revealjs_autoslidestoppable', true)},
- // Use this method for navigation when auto-sliding
- autoSlideMethod: #{attr 'revealjs_autoslidemethod',
'Reveal.navigateNext'},
- // Specify the average time in seconds that you think you will
spend
- // presenting each slide. This is used to show a pacing timer in
the
- // speaker view
- defaultTiming: #{attr 'revealjs_defaulttiming', 120},
- // Specify the total time in seconds that is available to
- // present. If this is set to a nonzero value, the pacing
- // timer will work out the time available for each slide,
- // instead of using the defaultTiming value
- totalTime: #{attr 'revealjs_totaltime', 0},
- // Specify the minimum amount of time you want to allot to
- // each slide, if using the totalTime calculation method. If
- // the automated time allocation causes slide pacing to fall
- // below this threshold, then you will see an alert in the
- // speaker notes window
- minimumTimePerSlide: #{attr 'revealjs_minimumtimeperslide', 0},
- // Enable slide navigation via mouse wheel
- mouseWheel: #{to_boolean(attr 'revealjs_mousewheel', false)},
- // Hide cursor if inactive
- hideInactiveCursor: #{to_boolean(attr
'revealjs_hideinactivecursor', true)},
- // Time before the cursor is hidden (in ms)
- hideCursorTime: #{attr 'revealjs_hidecursortime', 5000},
- // Hides the address bar on mobile devices
- hideAddressBar: #{to_boolean(attr 'revealjs_hideaddressbar',
true)},
- // Opens links in an iframe preview overlay
- // Add `data-preview-link` and `data-preview-link="false"` to
customise each link
- // individually
- previewLinks: #{to_boolean(attr 'revealjs_previewlinks', false)},
- // Transition style (e.g., none, fade, slide, convex, concave,
zoom)
- transition: '#{attr 'revealjs_transition', 'slide'}',
- // Transition speed (e.g., default, fast, slow)
- transitionSpeed: '#{attr 'revealjs_transitionspeed', 'default'}',
- // Transition style for full page slide backgrounds (e.g., none,
fade, slide, convex, concave, zoom)
- backgroundTransition: '#{attr 'revealjs_backgroundtransition',
'fade'}',
- // Number of slides away from the current that are visible
- viewDistance: #{attr 'revealjs_viewdistance', 3},
- // Number of slides away from the current that are visible on
mobile
- // devices. It is advisable to set this to a lower number than
- // viewDistance in order to save resources.
- mobileViewDistance: #{attr 'revealjs_mobileviewdistance', 3},
- // Parallax background image (e.g.,
"'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'")
- parallaxBackgroundImage: '#{attr
'revealjs_parallaxbackgroundimage', ''}',
- // Parallax background size in CSS syntax (e.g., "2100px 900px")
- parallaxBackgroundSize: '#{attr 'revealjs_parallaxbackgroundsize',
''}',
- // Number of pixels to move the parallax background per slide
- // - Calculated automatically unless specified
- // - Set to 0 to disable movement along an axis
- parallaxBackgroundHorizontal: #{attr
'revealjs_parallaxbackgroundhorizontal', 'null'},
- parallaxBackgroundVertical: #{attr
'revealjs_parallaxbackgroundvertical', 'null'},
- // The display mode that will be used to show slides
- display: '#{attr 'revealjs_display', 'block'}',
-
- // 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: #{attr 'revealjs_width', 960},
- height: #{attr 'revealjs_height', 700},
+ Array.prototype.slice.call(document.querySelectorAll('.slides
section')).forEach(function(slide) {
+ if (slide.getAttribute('data-background-color')) return;
+ // user needs to explicitly say he wants CSS color to override
otherwise we might break custom css or theme (#226)
+ if (!(slide.classList.contains('canvas') ||
slide.classList.contains('background'))) return;
+ var bgColor = getComputedStyle(slide).backgroundColor;
+ if (bgColor !== 'rgba(0, 0, 0, 0)' && bgColor !== 'transparent') {
+ slide.setAttribute('data-background-color', bgColor);
+ slide.style.backgroundColor = 'transparent';
+ }
+ });
- // Factor of the display size that should remain empty around the
content
- margin: #{attr 'revealjs_margin', 0.1},
+ // More info about config & dependencies:
+ // - https://github.com/hakimel/reveal.js#configuration
+ // - https://github.com/hakimel/reveal.js#dependencies
+ Reveal.initialize({
+ // Display presentation control arrows
+ controls: #{to_boolean(attr 'revealjs_controls', true)},
+ // Help the user learn the controls by providing hints, for example by
+ // bouncing the down arrow when they first encounter a vertical slide
+ controlsTutorial: #{to_boolean(attr 'revealjs_controlstutorial',
true)},
+ // Determines where controls appear, "edges" or "bottom-right"
+ controlsLayout: '#{attr 'revealjs_controlslayout', 'bottom-right'}',
+ // Visibility rule for backwards navigation arrows; "faded", "hidden"
+ // or "visible"
+ controlsBackArrows: '#{attr 'revealjs_controlsbackarrows', 'faded'}',
+ // Display a presentation progress bar
+ progress: #{to_boolean(attr 'revealjs_progress', true)},
+ // Display the page number of the current slide
+ slideNumber: #{to_valid_slidenumber(attr 'revealjs_slidenumber',
false)},
+ // Control which views the slide number displays on
+ showSlideNumber: '#{attr 'revealjs_showslidenumber', 'all'}',
+ // Add the current slide number to the URL hash so that reloading the
+ // page/copying the URL will return you to the same slide
+ hash: #{to_boolean(attr 'revealjs_hash', false)},
+ // Push each slide change to the browser history. Implies `hash: true`
+ history: #{to_boolean(attr 'revealjs_history', false)},
+ // Enable keyboard shortcuts for navigation
+ keyboard: #{to_boolean(attr 'revealjs_keyboard', true)},
+ // Enable the slide overview mode
+ overview: #{to_boolean(attr 'revealjs_overview', true)},
+ // Disables the default reveal.js slide layout so that you can use
custom CSS layout
+ disableLayout: #{to_boolean(attr 'revealjs_disablelayout', false)},
+ // Vertical centering of slides
+ center: #{to_boolean(attr 'revealjs_center', true)},
+ // Enables touch navigation on devices with touch input
+ touch: #{to_boolean(attr 'revealjs_touch', true)},
+ // Loop the presentation
+ loop: #{to_boolean(attr 'revealjs_loop', false)},
+ // Change the presentation direction to be RTL
+ rtl: #{to_boolean(attr 'revealjs_rtl', false)},
+ // See https://github.com/hakimel/reveal.js/#navigation-mode
+ navigationMode: '#{attr 'revealjs_navigationmode', 'default'}',
+ // Randomizes the order of slides each time the presentation loads
+ shuffle: #{to_boolean(attr 'revealjs_shuffle', false)},
+ // Turns fragments on and off globally
+ fragments: #{to_boolean(attr 'revealjs_fragments', true)},
+ // Flags whether to include the current fragment in the URL,
+ // so that reloading brings you to the same fragment position
+ fragmentInURL: #{to_boolean(attr 'revealjs_fragmentinurl', false)},
+ // Flags if the presentation is running in an embedded mode,
+ // i.e. contained within a limited portion of the screen
+ embedded: #{to_boolean(attr 'revealjs_embedded', false)},
+ // Flags if we should show a help overlay when the questionmark
+ // key is pressed
+ help: #{to_boolean(attr 'revealjs_help', true)},
+ // Flags if speaker notes should be visible to all viewers
+ showNotes: #{to_boolean(attr 'revealjs_shownotes', false)},
+ // Global override for autolaying embedded media (video/audio/iframe)
+ // - null: Media will only autoplay if data-autoplay is present
+ // - true: All media will autoplay, regardless of individual setting
+ // - false: No media will autoplay, regardless of individual setting
+ autoPlayMedia: #{attr 'revealjs_autoplaymedia', 'null'},
+ // Global override for preloading lazy-loaded iframes
+ // - null: Iframes with data-src AND data-preload will be loaded when
within
+ // the viewDistance, iframes with only data-src will be loaded when
visible
+ // - true: All iframes with data-src will be loaded when within the
viewDistance
+ // - false: All iframes with data-src will be loaded only when visible
+ preloadIframes: #{attr 'revealjs_preloadiframes', 'null'},
+ // 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: #{attr 'revealjs_autoslide', 0},
+ // Stop auto-sliding after user input
+ autoSlideStoppable: #{to_boolean(attr 'revealjs_autoslidestoppable',
true)},
+ // Use this method for navigation when auto-sliding
+ autoSlideMethod: #{attr 'revealjs_autoslidemethod',
'Reveal.navigateNext'},
+ // Specify the average time in seconds that you think you will spend
+ // presenting each slide. This is used to show a pacing timer in the
+ // speaker view
+ defaultTiming: #{attr 'revealjs_defaulttiming', 120},
+ // Specify the total time in seconds that is available to
+ // present. If this is set to a nonzero value, the pacing
+ // timer will work out the time available for each slide,
+ // instead of using the defaultTiming value
+ totalTime: #{attr 'revealjs_totaltime', 0},
+ // Specify the minimum amount of time you want to allot to
+ // each slide, if using the totalTime calculation method. If
+ // the automated time allocation causes slide pacing to fall
+ // below this threshold, then you will see an alert in the
+ // speaker notes window
+ minimumTimePerSlide: #{attr 'revealjs_minimumtimeperslide', 0},
+ // Enable slide navigation via mouse wheel
+ mouseWheel: #{to_boolean(attr 'revealjs_mousewheel', false)},
+ // Hide cursor if inactive
+ hideInactiveCursor: #{to_boolean(attr 'revealjs_hideinactivecursor',
true)},
+ // Time before the cursor is hidden (in ms)
+ hideCursorTime: #{attr 'revealjs_hidecursortime', 5000},
+ // Hides the address bar on mobile devices
+ hideAddressBar: #{to_boolean(attr 'revealjs_hideaddressbar', true)},
+ // Opens links in an iframe preview overlay
+ // Add `data-preview-link` and `data-preview-link="false"` to
customise each link
+ // individually
+ previewLinks: #{to_boolean(attr 'revealjs_previewlinks', false)},
+ // Transition style (e.g., none, fade, slide, convex, concave, zoom)
+ transition: '#{attr 'revealjs_transition', 'slide'}',
+ // Transition speed (e.g., default, fast, slow)
+ transitionSpeed: '#{attr 'revealjs_transitionspeed', 'default'}',
+ // Transition style for full page slide backgrounds (e.g., none, fade,
slide, convex, concave, zoom)
+ backgroundTransition: '#{attr 'revealjs_backgroundtransition',
'fade'}',
+ // Number of slides away from the current that are visible
+ viewDistance: #{attr 'revealjs_viewdistance', 3},
+ // Number of slides away from the current that are visible on mobile
+ // devices. It is advisable to set this to a lower number than
+ // viewDistance in order to save resources.
+ mobileViewDistance: #{attr 'revealjs_mobileviewdistance', 3},
+ // Parallax background image (e.g.,
"'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'")
+ parallaxBackgroundImage: '#{attr 'revealjs_parallaxbackgroundimage',
''}',
+ // Parallax background size in CSS syntax (e.g., "2100px 900px")
+ parallaxBackgroundSize: '#{attr 'revealjs_parallaxbackgroundsize',
''}',
+ // Number of pixels to move the parallax background per slide
+ // - Calculated automatically unless specified
+ // - Set to 0 to disable movement along an axis
+ parallaxBackgroundHorizontal: #{attr
'revealjs_parallaxbackgroundhorizontal', 'null'},
+ parallaxBackgroundVertical: #{attr
'revealjs_parallaxbackgroundvertical', 'null'},
+ // The display mode that will be used to show slides
+ display: '#{attr 'revealjs_display', 'block'}',
- // Bounds for smallest/largest possible scale to apply to content
- minScale: #{attr 'revealjs_minscale', 0.2},
- maxScale: #{attr 'revealjs_maxscale', 1.5},
+ // 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: #{attr 'revealjs_width', 960},
+ height: #{attr 'revealjs_height', 700},
- // PDF Export Options
- // Put each fragment on a separate page
- pdfSeparateFragments: #{to_boolean(attr
'revealjs_pdfseparatefragments', true)},
- // For slides that do not fit on a page, max number of pages
- pdfMaxPagesPerSlide: #{attr 'revealjs_pdfmaxpagesperslide', 1},
+ // Factor of the display size that should remain empty around the
content
+ margin: #{attr 'revealjs_margin', 0.1},
- // Optional libraries used to extend on reveal.js
- dependencies: [
- #{revealjs_dependencies(document, self, revealjsdir)}
- ],
+ // Bounds for smallest/largest possible scale to apply to content
+ minScale: #{attr 'revealjs_minscale', 0.2},
+ maxScale: #{attr 'revealjs_maxscale', 1.5},
- #{(attr? 'revealjs_plugins_configuration') ?
File.read(attr('revealjs_plugins_configuration', '')) : ""}
+ // PDF Export Options
+ // Put each fragment on a separate page
+ pdfSeparateFragments: #{to_boolean(attr
'revealjs_pdfseparatefragments', true)},
+ // For slides that do not fit on a page, max number of pages
+ pdfMaxPagesPerSlide: #{attr 'revealjs_pdfmaxpagesperslide', 1},
- });
+ // Optional libraries used to extend on reveal.js
+ dependencies: [
+ #{revealjs_dependencies(document, self, revealjsdir)}
+ ],
+ });
/ Workaround the "Only direct descendants of a slide section can be
stretched" limitation in reveal.js
/ https://github.com/hakimel/reveal.js/issues/2584
+
+
include stretch_nested_elements.js.slim
- if syntax_hl && (syntax_hl.docinfo? :footer)