Skip to content

Commit 028c503

Browse files
Version 1.2.1
- Fix for hidden items in print and speaker view
1 parent aeaa390 commit 028c503

File tree

6 files changed

+49
-6
lines changed

6 files changed

+49
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## [1.2.1] - 2023-07-22
4+
### Added
5+
- Fix for hidden items in print and speaker view
6+
7+
38
## [1.2.0] - 2023-05-05
49
### Added
510
- Added local, specified, auto-appear

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "reveal.js-appearance",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"main": "plugin/appearance/appearance.js",
55
"module": "plugin/appearance/appearance.esm.js",
66
"description": "An animation plugin for Reveal.js that animates elements sequentially like in Powerpoint. Perfect for online portfolios or other presentations with images.",
@@ -14,5 +14,8 @@
1414
"license": "MIT, Copyright (C) 2023 Martijn De Jongh",
1515
"peerDependencies": {
1616
"reveal.js": "^4.2"
17+
},
18+
"dependencies": {
19+
"animate.css": "^4.1.1"
1720
}
1821
}

plugin/appearance/appearance.css

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,22 @@ span.animate__animated, span.animated {
304304
animation-duration: calc(var(--animate-duration) * 3);
305305
}
306306

307-
.print-pdf {
308-
color: black;
307+
.print-pdf .animated, .print-pdf .animate__animated,
308+
.print-pdf section:not(.stack):not([data-appearance-can-start]) .animated,
309+
.print-pdf section:not(.stack):not([data-appearance-can-start]) .animate__animated {
310+
opacity: 1;
311+
visibility: visible;
312+
-webkit-animation: none;
313+
animation: none;
309314
}
310-
.print-pdf .animated, .print-pdf .animate__animated {
315+
.print-pdf .reveal .fragment {
316+
opacity: 1;
317+
}
318+
319+
.reveal.sv .animated, .reveal.sv .animate__animated,
320+
.reveal.sv section:not(.stack):not([data-appearance-can-start]) .animated,
321+
.reveal.sv section:not(.stack):not([data-appearance-can-start]) .animate__animated {
322+
opacity: 1;
311323
visibility: visible;
312324
-webkit-animation: none;
313325
animation: none;

plugin/appearance/appearance.esm.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* https://github.com/Martinomagnifico
55
*
66
* Appearance.js for Reveal.js
7-
* Version 1.2.0
7+
* Version 1.2.1
88
*
99
* @license
1010
* MIT licensed
@@ -141,6 +141,14 @@ const Plugin = () => {
141141
if (options.debug) console.log(text);
142142
};
143143

144+
let url = new URL(window.location);
145+
let urlparams = new URLSearchParams(url.search);
146+
147+
if (urlparams.has('receiver')) {
148+
viewport.classList.add('sv');
149+
console.log(viewport);
150+
}
151+
144152
const assignAutoClass = (section, str, kind) => {
145153
let index = [...section.parentElement.children].filter(s => s.tagName == "SECTION").indexOf(section) + 1;
146154
let warning = kind == 'global' ? `JSON Parse error, please try to correct the global "autoelements" option.` : `JSON Parse error, please try to correct the "data-autoappear" attribute on section ${index}`;

plugin/appearance/appearance.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* https://github.com/Martinomagnifico
55
*
66
* Appearance.js for Reveal.js
7-
* Version 1.2.0
7+
* Version 1.2.1
88
*
99
* @license
1010
* MIT licensed
@@ -147,6 +147,14 @@
147147
if (options.debug) console.log(text);
148148
};
149149

150+
let url = new URL(window.location);
151+
let urlparams = new URLSearchParams(url.search);
152+
153+
if (urlparams.has('receiver')) {
154+
viewport.classList.add('sv');
155+
console.log(viewport);
156+
}
157+
150158
const assignAutoClass = (section, str, kind) => {
151159
let index = [...section.parentElement.children].filter(s => s.tagName == "SECTION").indexOf(section) + 1;
152160
let warning = kind == 'global' ? `JSON Parse error, please try to correct the global "autoelements" option.` : `JSON Parse error, please try to correct the "data-autoappear" attribute on section ${index}`;

plugin/appearance/plugin-src.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@ const Plugin = () => {
9191
if (options.debug) console.log(text);
9292
}
9393

94+
let url = new URL(window.location);
95+
let urlparams = new URLSearchParams(url.search);
96+
if (urlparams.has('receiver')) {
97+
viewport.classList.add('sv')
98+
console.log(viewport)
99+
}
100+
94101
const assignAutoClass = (section, str, kind) => {
95102

96103
let index = [...section.parentElement.children].filter(s => s.tagName=="SECTION").indexOf(section) + 1;

0 commit comments

Comments
 (0)