Skip to content

Commit

Permalink
Version 1.2.1
Browse files Browse the repository at this point in the history
- Fix for hidden items in print and speaker view
  • Loading branch information
Martinomagnifico committed Jul 22, 2023
1 parent aeaa390 commit 028c503
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [1.2.1] - 2023-07-22
### Added
- Fix for hidden items in print and speaker view


## [1.2.0] - 2023-05-05
### Added
- Added local, specified, auto-appear
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reveal.js-appearance",
"version": "1.2.0",
"version": "1.2.1",
"main": "plugin/appearance/appearance.js",
"module": "plugin/appearance/appearance.esm.js",
"description": "An animation plugin for Reveal.js that animates elements sequentially like in Powerpoint. Perfect for online portfolios or other presentations with images.",
Expand All @@ -14,5 +14,8 @@
"license": "MIT, Copyright (C) 2023 Martijn De Jongh",
"peerDependencies": {
"reveal.js": "^4.2"
},
"dependencies": {
"animate.css": "^4.1.1"
}
}
18 changes: 15 additions & 3 deletions plugin/appearance/appearance.css
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,22 @@ span.animate__animated, span.animated {
animation-duration: calc(var(--animate-duration) * 3);
}

.print-pdf {
color: black;
.print-pdf .animated, .print-pdf .animate__animated,
.print-pdf section:not(.stack):not([data-appearance-can-start]) .animated,
.print-pdf section:not(.stack):not([data-appearance-can-start]) .animate__animated {
opacity: 1;
visibility: visible;
-webkit-animation: none;
animation: none;
}
.print-pdf .animated, .print-pdf .animate__animated {
.print-pdf .reveal .fragment {
opacity: 1;
}

.reveal.sv .animated, .reveal.sv .animate__animated,
.reveal.sv section:not(.stack):not([data-appearance-can-start]) .animated,
.reveal.sv section:not(.stack):not([data-appearance-can-start]) .animate__animated {
opacity: 1;
visibility: visible;
-webkit-animation: none;
animation: none;
Expand Down
10 changes: 9 additions & 1 deletion plugin/appearance/appearance.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* https://github.com/Martinomagnifico
*
* Appearance.js for Reveal.js
* Version 1.2.0
* Version 1.2.1
*
* @license
* MIT licensed
Expand Down Expand Up @@ -141,6 +141,14 @@ const Plugin = () => {
if (options.debug) console.log(text);
};

let url = new URL(window.location);
let urlparams = new URLSearchParams(url.search);

if (urlparams.has('receiver')) {
viewport.classList.add('sv');
console.log(viewport);
}

const assignAutoClass = (section, str, kind) => {
let index = [...section.parentElement.children].filter(s => s.tagName == "SECTION").indexOf(section) + 1;
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}`;
Expand Down
10 changes: 9 additions & 1 deletion plugin/appearance/appearance.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* https://github.com/Martinomagnifico
*
* Appearance.js for Reveal.js
* Version 1.2.0
* Version 1.2.1
*
* @license
* MIT licensed
Expand Down Expand Up @@ -147,6 +147,14 @@
if (options.debug) console.log(text);
};

let url = new URL(window.location);
let urlparams = new URLSearchParams(url.search);

if (urlparams.has('receiver')) {
viewport.classList.add('sv');
console.log(viewport);
}

const assignAutoClass = (section, str, kind) => {
let index = [...section.parentElement.children].filter(s => s.tagName == "SECTION").indexOf(section) + 1;
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}`;
Expand Down
7 changes: 7 additions & 0 deletions plugin/appearance/plugin-src.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ const Plugin = () => {
if (options.debug) console.log(text);
}

let url = new URL(window.location);
let urlparams = new URLSearchParams(url.search);
if (urlparams.has('receiver')) {
viewport.classList.add('sv')
console.log(viewport)
}

const assignAutoClass = (section, str, kind) => {

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

0 comments on commit 028c503

Please sign in to comment.