From 8ff5fe4986a8f83a660c0f28a14e3542d986c884 Mon Sep 17 00:00:00 2001
From: craigsdennis
Date: Fri, 16 Mar 2018 22:41:16 -0700
Subject: Updates copyright to 2018
---
css/reveal.scss | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'css/reveal.scss')
diff --git a/css/reveal.scss b/css/reveal.scss
index 1a87624..6fb5419 100644
--- a/css/reveal.scss
+++ b/css/reveal.scss
@@ -3,7 +3,7 @@
* http://revealjs.com
* MIT licensed
*
- * Copyright (C) 2017 Hakim El Hattab, http://hakim.se
+ * Copyright (C) 2018 Hakim El Hattab, http://hakim.se
*/
--
cgit v1.2.3
From 531d1e8791ea6b19834426bca603a3784ba71708 Mon Sep 17 00:00:00 2001
From: Hakim El Hattab
Date: Mon, 16 Apr 2018 09:48:37 +0200
Subject: prevent linked slide numbers from changing color
---
css/reveal.css | 3 +++
css/reveal.scss | 4 ++++
js/reveal.js | 67 +++++++++++++++++++++++++++++----------------------------
3 files changed, 41 insertions(+), 33 deletions(-)
(limited to 'css/reveal.scss')
diff --git a/css/reveal.css b/css/reveal.css
index d79024c..bc96e1e 100644
--- a/css/reveal.css
+++ b/css/reveal.css
@@ -460,6 +460,9 @@ body {
background-color: rgba(0, 0, 0, 0.4);
padding: 5px; }
+.reveal .slide-number a {
+ color: currentColor; }
+
.reveal .slide-number-delimiter {
margin: 0 3px; }
diff --git a/css/reveal.scss b/css/reveal.scss
index 6fb5419..5992250 100644
--- a/css/reveal.scss
+++ b/css/reveal.scss
@@ -553,6 +553,10 @@ $controlsArrowAngleActive: 36deg;
padding: 5px;
}
+.reveal .slide-number a {
+ color: currentColor;
+}
+
.reveal .slide-number-delimiter {
margin: 0 3px;
}
diff --git a/js/reveal.js b/js/reveal.js
index a953fe2..477a1ea 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -68,7 +68,7 @@
// Display the page number of the current slide
slideNumber: false,
-
+
// Use 1 based indexing for # links to match slide number (default is zero
// based)
hashOneBasedIndex: false,
@@ -1259,7 +1259,7 @@
document.removeEventListener( 'keypress', onDocumentKeyPress, false );
window.removeEventListener( 'hashchange', onWindowHashChange, false );
window.removeEventListener( 'resize', onWindowResize, false );
-
+
dom.wrapper.removeEventListener( 'pointerdown', onPointerDown, false );
dom.wrapper.removeEventListener( 'pointermove', onPointerMove, false );
dom.wrapper.removeEventListener( 'pointerup', onPointerUp, false );
@@ -2255,41 +2255,41 @@
return overview;
}
-
+
/**
* Return a hash URL that will resolve to the current slide location.
*/
-
function locationHash() {
-
- var url = '/';
- // Attempt to create a named link based on the slide's ID
+ var url = '/';
+
+ // Attempt to create a named link based on the slide's ID
var id = currentSlide ? currentSlide.getAttribute( 'id' ) : null;
- if( id ) {
- id = encodeURIComponent( id );
- }
-
- var indexf;
- if( config.fragmentInURL ) {
- indexf = getIndices().f;
- }
-
- // If the current slide has an ID, use that as a named link,
- // but we don't support named links with a fragment index
- if( typeof id === 'string' && id.length && indexf === undefined ) {
- url = '/' + id;
- }
- // Otherwise use the /h/v index
- else {
- if( indexh > 0 || indexv > 0 || indexf !== undefined ) url += indexh + config.hashOneBasedIndex;
- if( indexv > 0 || indexf !== undefined ) url += '/' + (indexv + config.hashOneBasedIndex);
- if( indexf !== undefined ) url += '/' + indexf;
- }
-
- return url;
- }
-
+ if( id ) {
+ id = encodeURIComponent( id );
+ }
+
+ var indexf;
+ if( config.fragmentInURL ) {
+ indexf = getIndices().f;
+ }
+
+ // If the current slide has an ID, use that as a named link,
+ // but we don't support named links with a fragment index
+ if( typeof id === 'string' && id.length && indexf === undefined ) {
+ url = '/' + id;
+ }
+ // Otherwise use the /h/v index
+ else {
+ if( indexh > 0 || indexv > 0 || indexf !== undefined ) url += indexh + config.hashOneBasedIndex;
+ if( indexv > 0 || indexf !== undefined ) url += '/' + (indexv + config.hashOneBasedIndex);
+ if( indexf !== undefined ) url += '/' + indexf;
+ }
+
+ return url;
+
+ }
+
/**
* Checks if the current or specified slide is vertical
* (nested within another slide).
@@ -3009,6 +3009,7 @@
* @return {string} HTML string fragment
*/
function formatSlideNumber( a, delimiter, b ) {
+
var url = '#' + locationHash();
if( typeof b === 'number' && !isNaN( b ) ) {
return '' +
@@ -3839,10 +3840,10 @@
}
else {
// Read the index components of the hash
-
var h = parseInt( bits[0], 10 ) || 0 - config.hashOneBasedIndex,
v = parseInt( bits[1], 10 ) || 0 - config.hashOneBasedIndex,
f;
+
if( config.fragmentInURL ) {
f = parseInt( bits[2], 10 );
if( isNaN( f ) ) {
@@ -3856,7 +3857,7 @@
}
}
-
+
/**
* Updates the page URL (hash) to reflect the current
* state.
--
cgit v1.2.3
From f1133f0e103d6a75f5a8d4e884052c818ea86f3a Mon Sep 17 00:00:00 2001
From: Hakim El Hattab
Date: Tue, 17 Apr 2018 09:46:55 +0200
Subject: support interactive iframe backgrounds in vertical stacks
---
css/reveal.css | 3 ++-
css/reveal.scss | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
(limited to 'css/reveal.scss')
diff --git a/css/reveal.css b/css/reveal.css
index bc96e1e..05c2e8d 100644
--- a/css/reveal.css
+++ b/css/reveal.css
@@ -531,7 +531,8 @@ body {
.reveal .slides > section.stack {
padding-top: 0;
- padding-bottom: 0; }
+ padding-bottom: 0;
+ pointer-events: none; }
.reveal .slides > section.present,
.reveal .slides > section > section.present {
diff --git a/css/reveal.scss b/css/reveal.scss
index 5992250..065a0a1 100644
--- a/css/reveal.scss
+++ b/css/reveal.scss
@@ -640,6 +640,7 @@ $controlsArrowAngleActive: 36deg;
.reveal .slides>section.stack {
padding-top: 0;
padding-bottom: 0;
+ pointer-events: none;
}
.reveal .slides>section.present,
--
cgit v1.2.3
From 4ba0d733458408ee666163792c0dc13ebec41ac4 Mon Sep 17 00:00:00 2001
From: Hakim El Hattab
Date: Fri, 27 Apr 2018 15:53:02 +0200
Subject: add , adds wrapper element around background images/videos/iframes
---
README.md | 26 ++++++++++++++------------
css/reveal.css | 9 +++++++--
css/reveal.scss | 11 +++++++++--
js/reveal.js | 34 +++++++++++++++++++++++-----------
test/test.js | 8 ++++----
5 files changed, 57 insertions(+), 31 deletions(-)
(limited to 'css/reveal.scss')
diff --git a/README.md b/README.md
index b7bbafc..9694d52 100644
--- a/README.md
+++ b/README.md
@@ -624,12 +624,13 @@ All CSS color formats are supported, like rgba() or hsl().
#### Image Backgrounds
By default, background images are resized to cover the full page. Available options:
-| Attribute | Default | Description |
-| :--------------------------- | :--------- | :---------- |
-| data-background-image | | URL of the image to show. GIFs restart when the slide opens. |
-| data-background-size | cover | See [background-size](https://developer.mozilla.org/docs/Web/CSS/background-size) on MDN. |
-| data-background-position | center | See [background-position](https://developer.mozilla.org/docs/Web/CSS/background-position) on MDN. |
-| data-background-repeat | no-repeat | See [background-repeat](https://developer.mozilla.org/docs/Web/CSS/background-repeat) on MDN. |
+| Attribute | Default | Description |
+| :------------------------------- | :--------- | :---------- |
+| data-background-image | | URL of the image to show. GIFs restart when the slide opens. |
+| data-background-size | cover | See [background-size](https://developer.mozilla.org/docs/Web/CSS/background-size) on MDN. |
+| data-background-position | center | See [background-position](https://developer.mozilla.org/docs/Web/CSS/background-position) on MDN. |
+| data-background-repeat | no-repeat | See [background-repeat](https://developer.mozilla.org/docs/Web/CSS/background-repeat) on MDN. |
+| data-background-content-opacity | 1 | Opacity of the background image on a 0-1 scale. 0 is transparent and 1 is fully opaque. |
```html
shrink fade-out fade-up (also down, left and right!) visible only once fades in, then out when we move to the next step fades in, then 50% out when we move to the next step blue only once highlight-red highlight-green grow shrink fade-out fade-up (also down, left and right!) current-visible
+ fade-right,
+ up,
+ down,
+ left
+ fade-in-then-out fade-in-then-half-out Highlight red blue green fade-out fade-up (also down, left and right!) fades in, then out when we move to the next step fades in, then 50% out when we move to the next step fades in, then obfuscate when we move to the next step blue only once highlight-red highlight-greenImage
@@ -642,12 +643,13 @@ By default, background images are resized to cover the full page. Available opti
#### Video Backgrounds
Automatically plays a full size video behind the slide.
-| Attribute | Default | Description |
-| :--------------------------- | :------ | :---------- |
-| data-background-video | | A single video source, or a comma separated list of video sources. |
-| data-background-video-loop | false | Flags if the video should play repeatedly. |
-| data-background-video-muted | false | Flags if the audio should be muted. |
-| data-background-size | cover | Use `cover` for full screen and some cropping or `contain` for letterboxing. |
+| Attribute | Default | Description |
+| :--------------------------- | :------ | :---------- |
+| data-background-video | | A single video source, or a comma separated list of video sources. |
+| data-background-video-loop | false | Flags if the video should play repeatedly. |
+| data-background-video-muted | false | Flags if the audio should be muted. |
+| data-background-size | cover | Use `cover` for full screen and some cropping or `contain` for letterboxing. |
+| data-background-content-opacity | 1 | Opacity of the background video on a 0-1 scale. 0 is transparent and 1 is fully opaque. |
```html
fade-in-then-out
-fade-in-then-half-out
+fade-in-then-semi-out
Highlight red blue green
-- cgit v1.2.3 From fd95c8c266b775227762db62c0cbed3c05955525 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 21 Jun 2018 10:07:38 +0200 Subject: use absolute positioning for slide number --- css/reveal.css | 2 +- css/reveal.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'css/reveal.scss') diff --git a/css/reveal.css b/css/reveal.css index d937704..9f2089e 100644 --- a/css/reveal.css +++ b/css/reveal.css @@ -460,7 +460,7 @@ body { * SLIDE NUMBER *********************************************/ .reveal .slide-number { - position: fixed; + position: absolute; display: block; right: 8px; bottom: 8px; diff --git a/css/reveal.scss b/css/reveal.scss index 80798d3..1fff346 100644 --- a/css/reveal.scss +++ b/css/reveal.scss @@ -556,7 +556,7 @@ $controlsArrowAngleActive: 36deg; *********************************************/ .reveal .slide-number { - position: fixed; + position: absolute; display: block; right: 8px; bottom: 8px; -- cgit v1.2.3 From b9bb353a11bb7bcd1f79a40a80e0d5dfcca05591 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 2 Jul 2018 11:08:45 +0200 Subject: add 'resume presentation' button to pause overlay --- css/reveal.css | 15 +++++++++++++++ css/reveal.scss | 19 +++++++++++++++++++ js/reveal.js | 7 ++++++- 3 files changed, 40 insertions(+), 1 deletion(-) (limited to 'css/reveal.scss') diff --git a/css/reveal.css b/css/reveal.css index 9f2089e..eda311e 100644 --- a/css/reveal.css +++ b/css/reveal.css @@ -964,6 +964,21 @@ body { z-index: 100; transition: all 1s ease; } +.reveal .pause-overlay .resume-button { + position: absolute; + bottom: 20px; + right: 20px; + color: #ccc; + border-radius: 2px; + padding: 6px 14px; + border: 2px solid #ccc; + font-size: 16px; + background: transparent; + cursor: pointer; } + .reveal .pause-overlay .resume-button:hover { + color: #fff; + border-color: #fff; } + .reveal.paused .pause-overlay { visibility: visible; opacity: 1; } diff --git a/css/reveal.scss b/css/reveal.scss index 1fff346..e6608d4 100644 --- a/css/reveal.scss +++ b/css/reveal.scss @@ -1034,6 +1034,25 @@ $controlsArrowAngleActive: 36deg; z-index: 100; transition: all 1s ease; } + +.reveal .pause-overlay .resume-button { + position: absolute; + bottom: 20px; + right: 20px; + color: #ccc; + border-radius: 2px; + padding: 6px 14px; + border: 2px solid #ccc; + font-size: 16px; + background: transparent; + cursor: pointer; + + &:hover { + color: #fff; + border-color: #fff; + } +} + .reveal.paused .pause-overlay { visibility: visible; opacity: 1; diff --git a/js/reveal.js b/js/reveal.js index 93ed446..103fa82 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -593,7 +593,8 @@ dom.speakerNotes.setAttribute( 'tabindex', '0' ); // Overlay graphic which is displayed during the paused mode - createSingletonNode( dom.wrapper, 'div', 'pause-overlay', null ); + dom.pauseOverlay = createSingletonNode( dom.wrapper, 'div', 'pause-overlay', '' ); + dom.resumeButton = dom.pauseOverlay.querySelector( '.resume-button' ); dom.wrapper.setAttribute( 'role', 'application' ); @@ -1298,6 +1299,8 @@ dom.progress.addEventListener( 'click', onProgressClicked, false ); } + dom.resumeButton.addEventListener( 'click', resume, false ); + if( config.focusBodyOnPageVisibilityChange ) { var visibilityChange; @@ -1361,6 +1364,8 @@ dom.wrapper.removeEventListener( 'touchmove', onTouchMove, false ); dom.wrapper.removeEventListener( 'touchend', onTouchEnd, false ); + dom.resumeButton.removeEventListener( 'click', resume, false ); + if ( config.progress && dom.progress ) { dom.progress.removeEventListener( 'click', onProgressClicked, false ); } -- cgit v1.2.3