reveal.js-appearance 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +2 -1
- package/css/demo.css +1 -1
- package/demo.html +1 -1
- package/package.json +4 -1
- package/plugin/appearance/appearance.css +15 -3
- package/plugin/appearance/appearance.esm.js +9 -1
- package/plugin/appearance/appearance.js +9 -1
- package/plugin/appearance/plugin-src.js +7 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -8,7 +8,8 @@ An animation plugin for [Reveal.js](https://revealjs.com) that animates elements
|
|
|
8
8
|
|
|
9
9
|
In Powerpoint you can make slides with items that appear automatically with effects. This plugin for Reveal.js tries to achieve the same result. It's easy to set up. It uses Animate.css by Daniel Eden for the animations, with some changes to allow for a non-animated state.
|
|
10
10
|
|
|
11
|
-
[Demo](https://martinomagnifico.github.io/reveal.js-appearance/demo.html)
|
|
11
|
+
* [Demo](https://martinomagnifico.github.io/reveal.js-appearance/demo.html)
|
|
12
|
+
* [Markdown demo](https://martinomagnifico.github.io/reveal.js-appearance/demo-markdown.html)
|
|
12
13
|
|
|
13
14
|
The animations will start automatically after or at each slide or fragment change if the HTML is set up to use Appearance.
|
|
14
15
|
|
package/css/demo.css
CHANGED
package/demo.html
CHANGED
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
<pre><code class="hljs html" data-line-numbers><img class="animate__fadeInDown" src="img/1.jpg">
|
|
116
116
|
<img class="animate__fadeInDown" src="img/2.jpg">
|
|
117
117
|
</code></pre>
|
|
118
|
-
<p class="small">Check the <a href="demo-markdown.html">Markdown demo</a> to see how you do this in Markdown. A Quarto extension can be found here
|
|
118
|
+
<p class="small">Check the <a href="demo-markdown.html">Markdown demo</a> to see how you do this in Markdown. A Quarto extension can be found <a href="https://github.com/Martinomagnifico/quarto-appearance">here</a>. </p>
|
|
119
119
|
<p class="small">To simplify it <em>in any markup</em>, you can use the <a href="#/autoappear"><code>autoappear</code></a> option.</p>
|
|
120
120
|
</section>
|
|
121
121
|
</section>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reveal.js-appearance",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"main": "plugin/appearance/appearance.js",
|
|
5
5
|
"module": "plugin/appearance/appearance.esm.js",
|
|
6
6
|
"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 @@
|
|
|
14
14
|
"license": "MIT, Copyright (C) 2023 Martijn De Jongh",
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"reveal.js": "^4.2"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"animate.css": "^4.1.1"
|
|
17
20
|
}
|
|
18
21
|
}
|
|
@@ -304,10 +304,22 @@ span.animate__animated, span.animated {
|
|
|
304
304
|
animation-duration: calc(var(--animate-duration) * 3);
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
.print-pdf
|
|
308
|
-
|
|
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;
|
|
309
314
|
}
|
|
310
|
-
.print-pdf .
|
|
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;
|
|
311
323
|
visibility: visible;
|
|
312
324
|
-webkit-animation: none;
|
|
313
325
|
animation: none;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* https://github.com/Martinomagnifico
|
|
5
5
|
*
|
|
6
6
|
* Appearance.js for Reveal.js
|
|
7
|
-
* Version 1.2.
|
|
7
|
+
* Version 1.2.1
|
|
8
8
|
*
|
|
9
9
|
* @license
|
|
10
10
|
* MIT licensed
|
|
@@ -141,6 +141,14 @@ const Plugin = () => {
|
|
|
141
141
|
if (options.debug) console.log(text);
|
|
142
142
|
};
|
|
143
143
|
|
|
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
|
+
|
|
144
152
|
const assignAutoClass = (section, str, kind) => {
|
|
145
153
|
let index = [...section.parentElement.children].filter(s => s.tagName == "SECTION").indexOf(section) + 1;
|
|
146
154
|
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}`;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* https://github.com/Martinomagnifico
|
|
5
5
|
*
|
|
6
6
|
* Appearance.js for Reveal.js
|
|
7
|
-
* Version 1.2.
|
|
7
|
+
* Version 1.2.1
|
|
8
8
|
*
|
|
9
9
|
* @license
|
|
10
10
|
* MIT licensed
|
|
@@ -147,6 +147,14 @@
|
|
|
147
147
|
if (options.debug) console.log(text);
|
|
148
148
|
};
|
|
149
149
|
|
|
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
|
+
|
|
150
158
|
const assignAutoClass = (section, str, kind) => {
|
|
151
159
|
let index = [...section.parentElement.children].filter(s => s.tagName == "SECTION").indexOf(section) + 1;
|
|
152
160
|
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}`;
|
|
@@ -91,6 +91,13 @@ const Plugin = () => {
|
|
|
91
91
|
if (options.debug) console.log(text);
|
|
92
92
|
}
|
|
93
93
|
|
|
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
|
+
|
|
94
101
|
const assignAutoClass = (section, str, kind) => {
|
|
95
102
|
|
|
96
103
|
let index = [...section.parentElement.children].filter(s => s.tagName=="SECTION").indexOf(section) + 1;
|