reveal.js-appearance 1.1.1 → 1.1.2

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.2] - 2022-06-26
4
+ ### Added
5
+ - Added auto-loading of styles.
6
+
7
+ ### Changed
8
+ - Changed the internal delay mechanism to use CSS animation delay in combination to adding the trigger on the parent, not each animated element. This will improve the performance.
9
+ - ***Breaking change***: Moved to Animate.css version 4, but added a compatibility mode
3
10
 
4
11
  ## [1.1.1] - 2021-11-27
5
12
  ### Added
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021 Martijn De Jongh (Martino)
3
+ Copyright (c) 2022 Martijn De Jongh (Martino)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -6,14 +6,15 @@ A plugin for [Reveal.js](https://revealjs.com) 4 that adds appearance effects to
6
6
 
7
7
  [![Screenshot](https://martinomagnifico.github.io/reveal.js-appearance/screenshot.png)](https://martinomagnifico.github.io/reveal.js-appearance/demo.html)
8
8
 
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 in a separate CSS file to allow for a non-animated state.
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
11
  [Demo](https://martinomagnifico.github.io/reveal.js-appearance/demo.html)
12
12
 
13
- We do not want the animations to start during the slide transition, so we wait for the slide transition to end. Then the animations will start automatically if the HTML is set up to use Appearance.
13
+ The animations will start automatically after or at each slide or fragment change if the HTML is set up to use Appearance.
14
14
 
15
15
  Version 1.1.1 adds an `autoappear` mode for use in cases where adding animation classes is too much of a hassle, like inside Markdown.
16
16
 
17
+ Appearance v1.1.2 brought some **breaking changes**, please refer to the [migration guide](#migration-guide) before updating from v1.1.1 and under. It also changed the internal delay mechanism to use CSS animation delay in combination to adding the trigger on the parent, not each animated element. This will improve the performance.
17
18
 
18
19
 
19
20
  ## Installation
@@ -68,40 +69,33 @@ If you're using ES modules, you can add it like this:
68
69
  ```
69
70
 
70
71
  ### Styling
72
+ Since version 1.1.2, the styling of Appearance is automatically inserted, either loaded through NPM or from the plugin folder. Two files are inserted: The first one is Animate.css by Daniel Eden for the basic animations, we add it through a CDN. The second file adds to the first stylesheet to allow for a non-animated state.
71
73
 
72
- You now need to add TWO stylesheets to your presentation.
73
-
74
- * The first one is Animate.css by Daniel Eden for the basic animations, and we can add it through a CDN.
75
- * The second file is included with Appearance. It adds to the first stylesheet to allow for a non-animated state.
76
-
77
- ```html
78
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
79
- <link rel="stylesheet" href="plugin/appearance/appearance.css">
80
- ```
74
+ If you want to change the Appearance style, you can simply make your own style and use that stylesheet instead. Linking to your custom styles can be managed through the `csspath` option of Appearance.
81
75
 
82
76
 
83
77
 
84
78
  ### HTML
85
79
 
86
- It is easy to set up your HTML structure for Appearance:
80
+ It is easy to set up your HTML structure for Appearance. Each element that you want to animate uses a base class and an animation class. ***You only have to add an animation class*** because the base class is automatically added to any element with an animation class. The names of these animation classes are defined by [Animate.css](https://animate.style). In the example below, you can see that the animation class is `animate__bounceInLeft`:
87
81
 
88
82
  ```html
89
83
  <ul>
90
- <li class="animated bounceInLeft">Add it to any text element</li>
91
- <li class="animated bounceInLeft">Like list items, or headers.</li>
92
- <li class="animated bounceInLeft">It adds some attention.</li>
84
+ <li class="animate__bounceInLeft">Add it to any text element</li>
85
+ <li class="animate__bounceInLeft">Like list items, or headers.</li>
86
+ <li class="animate__bounceInLeft">It adds some attention.</li>
93
87
  </ul>
94
88
  ```
95
89
  When you are working with Markdown, this can be a chore so if you do not want to add all these classes, you can set the option `autoappear` to `true` (see Configuration below) and let Appearance do the heavy work. You do not need to add any markup and it will stay like this:
96
90
 
97
91
  ```html
98
92
  <ul>
99
- <li>Add it to any text element</li>
93
+ <li>Add it to any text element</li>
100
94
  <li>Like list items, or headers.</li>
101
95
  <li>It adds some attention.</li>
102
96
  </ul>
103
97
  ```
104
- or this:
98
+ or like this in Markdown:
105
99
 
106
100
  ```markdown
107
101
  * Add it to any text element
@@ -117,28 +111,34 @@ There are a few options that you can change from the Reveal.js options. The valu
117
111
 
118
112
  ```javascript
119
113
  Reveal.initialize({
120
- // ...
121
- appearance: {
122
- baseclass: 'animated',
123
- visibleclass: 'in',
124
- hideagain: true,
125
- delay: 300,
126
- appearevent: 'slidetransitionend',
127
- autoappear: false,
128
- autoelements: false
129
- },
130
- plugins: [ Appearance ]
114
+ // ...
115
+ appearance: {
116
+ hideagain: true,
117
+ delay: 300,
118
+ appearevent: 'slidetransitionend',
119
+ autoappear: false,
120
+ autoelements: false,
121
+ csspath: '',
122
+ animatecsspath: {
123
+ link : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css',
124
+ compat : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.compat.css',
125
+ },
126
+ compatibility: false,
127
+ compatibilitybaseclass: 'animated'
128
+ },
129
+ plugins: [ Appearance ]
131
130
  });
132
131
  ```
133
132
 
134
- * **`baseclass`**: The baseclass uses the baseclass from Animate.css. Change it if you like.
135
- * **`visibleclass`**: Use a specific class for the visible state.
136
133
  * **`hideagain`**: Change this (true/false) if you want to see the shown elements if you go back.
137
134
  * **`delay`**: Base time in ms between appearances.
138
135
  * **`appearevent`**: Use a specific event at which Appearance starts.
139
136
  * **`autoappear`**: Use this when you do not want to add classes to each item that you want to appear, and just let Appearance add animation classes to (all of) the provided elements in the presentation. See "Using 'autoappear'" mode below.
140
137
  * **`autoelements`**: These are the elements that `autoappear` will target. Each element has a selector and an animation class. If `autoappear` is off, the elements will still get animation if the section contains a `data-autoappear` attribute.
141
-
138
+ * **`csspath`**: Appearance will automatically load the styling of the plugin. If you want to customise the styling, you can link to your own CSS file here.
139
+ * **`animatecsspath`**: Appearance will also automatically load the styling of Animate.css via a CDN. Note that Animeta.css has two links, the first (CDN) one is for version 4, the second (old) one is the version 3 compatibility CDN link.
140
+ * **`compatibility`**: This setting can let you use your current markup. However, because this also uses the Animate.css compatibility CSS, and it is likely that they will not support this in the future, please update your markup as shown above.
141
+ * **`compatibilitybaseclass`**: This is the baseclass to use if you don't change your markup.
142
142
 
143
143
  ### Changing the 'appearevent'
144
144
  When you navigate from slide to slide, you can set transition effects in Reveal. These effects take some time. That's why, by default, Appearance only starts when the slide transition has ended.
@@ -147,7 +147,7 @@ There are cases however, where there is hardly any transition, for example, whe
147
147
 
148
148
  * *slidetransitionend* (default, Appearance will start animating elements after the transition)
149
149
  * *slidechanged* (Appearance will start together with the transition)
150
- * *auto* (Appearance will start together with the transition, but only on autoanimate slides, other slides will use *slidetransitionend*)
150
+ * *auto* (Appearance will start together with the transition, but only on autoanimate slides, other slides will use *slidetransitionend*)
151
151
 
152
152
  These same event triggers can be set through the data-attribute `data-appearevent`.
153
153
 
@@ -155,14 +155,14 @@ When using Appearance inside an autoanimate slide, and changing the appearevent
155
155
 
156
156
 
157
157
  ### Using 'autoappear' mode
158
- Sometimes (for example with Markdown), adding classes to elements is a chore. Appearance can automatically add animation classes to specific elements in the presentation.
158
+ Sometimes (for example with Markdown), adding classes to elements is a chore. Appearance can automatically add animation classes to specific elements, or tags, in the presentation.
159
159
 
160
- With the option `autoappear` set to `true`, ALL elements in the presentation that have a certain selector will get an animation. These selectors and the animations can be set in the configuration options like this:
160
+ With the option `autoappear` set to `true`, ALL elements in the presentation that have a certain selector (and that are not already classed with your base animation class, like 'animated') will subsequently get this class, and thus an animation. These selectors and the animations can be set in the configuration options like this:
161
161
 
162
162
  ```javascript
163
163
  autoelements: {
164
- 'ul li': 'fadeInLeft',
165
- 'ol li': 'fadeInRight'
164
+ 'ul li': 'animate__fadeInLeft',
165
+ 'ol li': 'animate__fadeInRight'
166
166
  }
167
167
  ```
168
168
  You can add any selector and animation class to this object.
@@ -176,19 +176,45 @@ With the option `autoappear` set to `false`, the above still works, but only on
176
176
  It is easy to change the effects for Appearance. Here's how to change the delay per-element:
177
177
 
178
178
  ```html
179
- <img class="animated fadeInDown" data-src="1.jpg" data-delay="200">
180
- <img class="animated fadeInDown" data-src="2.jpg" data-delay="160">
181
- <img class="animated fadeInDown" data-src="3.jpg" data-delay="120">
179
+ <img class="animate__fadeInDown" data-src="1.jpg" data-delay="200">
180
+ <img class="animate__fadeInDown" data-src="2.jpg" data-delay="160">
181
+ <img class="animate__fadeInDown" data-src="3.jpg" data-delay="120">
182
182
  ```
183
183
  or the speed of each animation, using the tempo classes from Animate.css:
184
184
 
185
185
  ```html
186
- <img class="animated fadeInDown slower" data-src="1.jpg">
187
- <img class="animated fadeInDown slow" data-src="2.jpg">
188
- <img class="animated fadeInDown fast" data-src="3.jpg">
189
- <img class="animated fadeInDown faster" data-src="4.jpg">
186
+ <img class="animate__fadeInDown slower" data-src="1.jpg">
187
+ <img class="animate__fadeInDown slow" data-src="2.jpg">
188
+ <img class="animate__fadeInDown fast" data-src="3.jpg">
189
+ <img class="animate__fadeInDown faster" data-src="4.jpg">
190
190
  ```
191
191
 
192
+ ## Migration guide
193
+ Appearance v1.1.2 is an update to stay current with the latest version of Animate.css, which itself brought breaking changes in version 4. Animate.css v4 added a prefix for all of the Animate.css classes, defaulting to `animate__` . Appearance will now automatically add the Animate.css base class (`animate__animated`) to any element with a Animate.css animation class.
194
+
195
+ You have two options to migrate to the new version:
196
+
197
+ ### Adjust your markup
198
+
199
+ If in Appearance v1.1.1 you used this:
200
+
201
+ ```html
202
+ <img class="animated fadeInDown" data-src="1.jpg">
203
+ ```
204
+
205
+ you should now use this:
206
+
207
+ ```html
208
+ <img class="animate__fadeInDown" data-src="1.jpg">
209
+ ```
210
+ which is the only change in the markup.
211
+
212
+ ### Turn on compatibility mode
213
+
214
+ If you turn in compatibility mode in Appearance, you can keep using your current markup. However, because this also uses the Animate.css compatibility CSS, this might break your presentations in the future, so it is not recommended. See the options above for compatibility mode and the compatibility base class.
215
+
216
+
217
+
192
218
  ## Like it?
193
219
  If you like it, please star this repo!
194
220
 
@@ -198,4 +224,4 @@ And if you want to show off what you made with it, please do :-)
198
224
  ## License
199
225
  MIT licensed
200
226
 
201
- Copyright (C) 2021 Martijn De Jongh (Martino)
227
+ Copyright (C) 2022 Martijn De Jongh (Martino)
package/css/demo.css CHANGED
@@ -1,21 +1,85 @@
1
1
  .slides {
2
2
  opacity: 0;
3
- -webkit-transition: opacity .5s ease;
4
- -o-transition: opacity .5s ease;
5
- transition: opacity .5s ease; }
3
+ -webkit-transition: opacity 0.5s ease;
4
+ -o-transition: opacity 0.5s ease;
5
+ transition: opacity 0.5s ease;
6
+ }
6
7
 
7
8
  .reveal.ready .slides {
8
- opacity: 1; }
9
+ opacity: 1;
10
+ }
9
11
 
10
12
  .backgrounds {
11
- background: #1a1626; }
13
+ background: #1a1626;
14
+ }
15
+
16
+ .reveal.overview section {
17
+ background: #1a1626;
18
+ display: -webkit-box;
19
+ display: -ms-flexbox;
20
+ display: flex;
21
+ -webkit-box-orient: vertical;
22
+ -webkit-box-direction: normal;
23
+ -ms-flex-direction: column;
24
+ flex-direction: column;
25
+ }
26
+
27
+ .slides {
28
+ opacity: 0;
29
+ -webkit-transition: opacity 0.5s ease;
30
+ -o-transition: opacity 0.5s ease;
31
+ transition: opacity 0.5s ease;
32
+ }
33
+ .reveal.ready .slides {
34
+ opacity: 1;
35
+ }
36
+
37
+ .reveal .padded img {
38
+ border: none;
39
+ margin: 0;
40
+ max-width: 100%;
41
+ max-height: 100%;
42
+ }
43
+
44
+ .row {
45
+ display: grid;
46
+ width: 100%;
47
+ grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
48
+ grid-gap: 30px;
49
+ }
50
+
51
+ .reveal .slides > section,
52
+ .reveal .slides > section > section {
53
+ -webkit-transform-style: preserve-3d;
54
+ transform-style: preserve-3d;
55
+ -webkit-perspective: 1000px;
56
+ perspective: 1000px;
57
+ }
58
+
59
+ small {
60
+ margin: 1.5rem 0 2rem 0;
61
+ }
62
+
63
+ .small {
64
+ font-size: 75%;
65
+ }
66
+
67
+ small code {
68
+ font-size: 75%;
69
+ background: #222D2F;
70
+ color: #ddd;
71
+ padding: 0.25rem 0.5rem;
72
+ border-radius: 0.5rem;
73
+ }
12
74
 
13
75
  a.github-corner {
14
76
  position: absolute;
15
77
  z-index: 1;
16
78
  width: clamp(50px, 8vmax, 80px);
17
79
  line-height: 0;
18
- color: rgba(255, 255, 255, 0.5); }
80
+ color: rgba(255, 255, 255, 0.5);
81
+ }
19
82
 
20
83
  a.github-corner:hover {
21
- color: white; }
84
+ color: white;
85
+ }
package/demo.html CHANGED
@@ -12,8 +12,6 @@
12
12
  <link rel="stylesheet" href="../dist/reveal.css">
13
13
  <link rel="stylesheet" href="../dist/theme/black.css">
14
14
  <link rel="stylesheet" href="css/demo.css">
15
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
16
- <link rel="stylesheet" href="plugin/appearance/appearance.css">
17
15
  </head>
18
16
 
19
17
  <body>
@@ -23,54 +21,69 @@
23
21
  </svg></a>
24
22
  <div class="slides">
25
23
  <section class="center">
26
- <h1 class="animated flipInX slow">Appearance</h1>
27
- <h3 class="animated flipInX slow" data-delay="700">for Reveal.js</h3>
24
+ <h1 class="animate__flipInX animate__slow">Appearance</h1>
25
+ <h3 class="animate__flipInX animate__slow" data-delay="700">for Reveal.js</h3>
28
26
  </section>
29
- <section class="center"><small>In Powerpoint you can make slides with items that appear automatically with effects. Appearance is a plugin for Reveal.js that does the same. </small><small>Appearance is easy to set up. It uses Animate.css by Daniel Eden for the animations, with some changes in a separate CSS file to allow for a non-animated state. </small>
27
+ <section class="center"><small>In Powerpoint you can make slides with items that appear automatically and sequentially with effects. Appearance is a plugin for Reveal.js that does the same. </small><small>Appearance is easy to set up. It uses <a href="https://animate.style" target="_blank">Animate.css</a> by Daniel Eden for the animations, with some changes to allow for a non-animated state. </small>
30
28
  <p>Let's check out what Appearance does:</p>
31
29
  </section>
32
30
  <section class="center">
33
31
  <h3>Let text appear</h3>
34
32
  <ul>
35
- <li class="animated bounceInLeft">Add it to any text element</li>
36
- <li class="animated bounceInLeft">Like list items, or headers.</li>
37
- <li class="animated bounceInLeft">It adds some impact.</li>
33
+ <li class="animate__bounceInLeft">Add it to any text element</li>
34
+ <li class="animate__bounceInLeft">Like list items, or headers.</li>
35
+ <li class="animate__bounceInLeft">It adds some impact.</li>
38
36
  </ul>
39
37
  </section>
40
38
  <section class="center">
41
39
  <h3>Let images appear</h3>
42
- <div class="padded"><img class="animated flipInX" data-src="img/1.jpg"></div>
43
- <div class="padded"><img class="animated flipInX" data-src="img/2.jpg"></div>
44
- <div class="padded"><img class="animated flipInX" data-src="img/3.jpg"></div>
45
- <div class="padded"><img class="animated flipInX" data-src="img/4.jpg"></div>
46
- <div class="padded"><img class="animated flipInX" data-src="img/5.jpg"></div>
40
+ <div class="row">
41
+ <div class="padded"><img class="animate__flipInX" data-src="img/1.jpg"></div>
42
+ <div class="padded"><img class="animate__flipInX" data-src="img/2.jpg"></div>
43
+ <div class="padded"><img class="animate__flipInX" data-src="img/3.jpg"></div>
44
+ <div class="padded"><img class="animate__flipInX" data-src="img/4.jpg"></div>
45
+ <div class="padded"><img class="animate__flipInX" data-src="img/5.jpg"></div>
46
+ </div>
47
47
  </section>
48
48
  <section class="center">
49
- <h3>Change the delay</h3><small>Use data-delay="*" on each element, where the wildcard is the delay in microseconds</small>
50
- <div class="padded"><img class="animated fadeInDown" data-src="img/1.jpg" data-delay="200"></div>
51
- <div class="padded"><img class="animated fadeInDown" data-src="img/2.jpg" data-delay="160"></div>
52
- <div class="padded"><img class="animated fadeInDown" data-src="img/3.jpg" data-delay="120"></div>
53
- <div class="padded"><img class="animated fadeInDown" data-src="img/4.jpg" data-delay="80"></div>
54
- <div class="padded"><img class="animated fadeInDown" data-src="img/5.jpg" data-delay="40"></div>
49
+ <h3>Change the delay</h3><small>Use <code>data-delay="*"</code> on each element, where the wildcard is the delay in microseconds from the appearance of the previous element.</small>
50
+ <div class="row">
51
+ <div class="padded"><img class="animate__fadeInDown" data-src="img/1.jpg" data-delay="0"></div>
52
+ <div class="padded"><img class="animate__fadeInDown" data-src="img/2.jpg" data-delay="200"></div>
53
+ <div class="padded"><img class="animate__fadeInDown" data-src="img/3.jpg" data-delay="160"></div>
54
+ <div class="padded"><img class="animate__fadeInDown" data-src="img/4.jpg" data-delay="120"></div>
55
+ <div class="padded"><img class="animate__fadeInDown" data-src="img/5.jpg" data-delay="80"></div>
56
+ </div><small><code>data-delay</code> is automatically converted to CSS animation delay.</small>
55
57
  </section>
56
58
  <section>
57
59
  <section class="center">
58
60
  <h3>Change the animation speed</h3><small>Use the speed classes from Animate.css to change the speed of the animation:</small>
59
- <div class="padded"><img class="animated bounceIn slower" data-src="img/1.jpg"><br><small>slower</small></div>
60
- <div class="padded"><img class="animated bounceIn slow" data-src="img/2.jpg"><br><small>slow</small></div>
61
- <div class="padded"><img class="animated bounceIn" data-src="img/3.jpg"><br><small></small></div>
62
- <div class="padded"><img class="animated bounceIn fast" data-src="img/4.jpg"><br><small>fast</small></div>
63
- <div class="padded"><img class="animated bounceIn faster" data-src="img/5.jpg"><br><small>faster</small></div>
61
+ <div class="row">
62
+ <div class="padded"><small class="animate__fadeIn" style="font-size: 1rem" data-delay="50"><code>.animate__slower</code></small></div>
63
+ <div class="padded"><small class="animate__fadeIn" style="font-size: 1rem" data-delay="50"><code>.animate__slow</code></small></div>
64
+ <div class="padded"><small class="animate__fadeIn" style="font-size: 1rem" data-delay="50"></small></div>
65
+ <div class="padded"><small class="animate__fadeIn" style="font-size: 1rem" data-delay="50"><code>.animate__fast</code></small></div>
66
+ <div class="padded"><small class="animate__fadeIn" style="font-size: 1rem" data-delay="50"><code>.animate__faster</code></small></div>
67
+ </div>
68
+ <div class="row">
69
+ <div class="padded"><img class="animate__bounceIn animate__slower" data-src="img/1.jpg"></div>
70
+ <div class="padded"><img class="animate__bounceIn animate__slow" data-src="img/2.jpg"></div>
71
+ <div class="padded"><img class="animate__bounceIn" data-src="img/3.jpg"></div>
72
+ <div class="padded"><img class="animate__bounceIn animate__fast" data-src="img/4.jpg"></div>
73
+ <div class="padded"><img class="animate__bounceIn animate__faster" data-src="img/5.jpg"></div>
74
+ </div>
64
75
  </section>
65
76
  <section class="center">
66
77
  <h3>Inside fragments</h3>
67
- <p class="animated fadeIn">Like this <span class="animated fadeInDown faster" style="font-size: .8em">(click next)</span>:</p>
78
+ <p class="animate__fadeInDown">Like this <span class="animate__fadeInDown animate__faster" style="font-size: .8em">(click next)</span>:</p>
68
79
  <div class="fragment">
69
- <div class="padded"><img class="animated fadeInDown" data-src="img/1.jpg"></div>
70
- <div class="padded"><img class="animated fadeInDown" data-src="img/2.jpg"></div>
71
- <div class="padded"><img class="animated fadeInDown" data-src="img/3.jpg"></div>
72
- <div class="padded"><img class="animated fadeInDown" data-src="img/4.jpg"></div>
73
- <div class="padded"><img class="animated fadeInDown" data-src="img/5.jpg"></div>
80
+ <div class="row">
81
+ <div class="padded"><img class="animate__fadeInDown" data-src="img/1.jpg"></div>
82
+ <div class="padded"><img class="animate__fadeInDown" data-src="img/2.jpg"></div>
83
+ <div class="padded"><img class="animate__fadeInDown" data-src="img/3.jpg"></div>
84
+ <div class="padded"><img class="animate__fadeInDown" data-src="img/4.jpg"></div>
85
+ <div class="padded"><img class="animate__fadeInDown" data-src="img/5.jpg"></div>
86
+ </div>
74
87
  </div>
75
88
  </section>
76
89
  <section class="center" data-auto-animate>
@@ -82,38 +95,52 @@
82
95
  <p class="animated fadeInUp">You can use any of the following events:</p>
83
96
  </div>
84
97
  <ul>
85
- <li class="animated fadeInLeft"><em>slidetransitionend</em> (default, after the transition)</li>
86
- <li class="animated fadeInLeft"><em>slidechanged</em> (with the transition)</li>
87
- <li class="animated fadeInLeft"><em>auto</em> (with transition, on autoanimate slides)</li>
98
+ <li class="animate__fadeInLeft"><em>slidetransitionend</em> (default, after the transition)</li>
99
+ <li class="animate__fadeInLeft"><em>slidechanged</em> (with the transition)</li>
100
+ <li class="animate__fadeInLeft"><em>auto</em> (with transition, on autoanimate slides)</li>
88
101
  </ul>
89
- <div><br><small class="animated fadeInUp">This can also be set per-slide with data-attributes.</small></div>
102
+ <div><br><small class="animate__fadeInUp">This can also be set per-slide with data-attributes.</small></div>
90
103
  </section>
91
104
  </section>
92
- <section class="center" data-transition="convex-in fade-out" data-autoappear>
93
- <h3>Autoappear mode</h3><small>Sometimes (for example with Markdown), adding classes to elements is a chore. Appearance can automatically add animation classes to specific elements in the presentation (with the option <code>autoappear</code>) or per slide (with <code>data-autoappear</code>).</small>
105
+ <section class="center" data-autoappear>
106
+ <h3>Autoappear mode</h3><small>Sometimes (for example with Markdown), adding classes to elements is a chore. Appearance can automatically add animation classes to specific elements (tags or other selectors) in the presentation (with the option <code>autoappear</code>) or per slide (with <code>data-autoappear</code>), like this slide.</small>
94
107
  <ul>
95
108
  <li>This is list item 1</li>
96
109
  <li>This is list item 2</li>
97
110
  <li>This is list item 3</li>
98
111
  </ul>
99
112
  </section>
100
- <section class="center" data-transition="convex-in fade-out">
113
+ <section class="center">
114
+ <h3>Animate.css animations</h3>
115
+ <p>Appearance supports the standard entrance/in animations that Animate.css offers. Some examples:</p>
116
+ <ul>
117
+ <li class="small animate__backInDown" data-delay="0">.animate__backInDown</li>
118
+ <li class="small animate__bounceInDown" data-delay="1000">.animate__bounceInDown</li>
119
+ <li class="small animate__fadeInLeft" data-delay="1000">.animate__fadeInLeft</li>
120
+ <li class="small animate__flipInX" data-delay="1000">.animate__flipInX</li>
121
+ <li class="small animate__rotateIn" data-delay="1000">.animate__rotateIn</li>
122
+ <li class="small animate__zoomInDown" data-delay="1000">.animate__zoomInDown</li>
123
+ <li class="small animate__jackInTheBox" data-delay="1000">.animate__jackInTheBox</li>
124
+ </ul>
125
+ </section>
126
+ <section class="center">
101
127
  <h3>Additional animations</h3>
102
128
  <ul>
103
- <li class="animated skidLeft" data-delay="300">Appear with .skidLeft</li>
104
- <li class="animated skidLeftBig" data-delay="1000">Appear with .skidLeftBig</li>
105
- <li class="animated skidRight" data-delay="1000">Appear with .skidRight</li>
106
- <li class="animated skidRightBig" data-delay="1000">Appear with .skidRightBig</li>
107
- <li class="animated shrinkIn" data-delay="1000">Appear with .shrinkIn</li>
108
- <li class="animated shrinkInBlur" data-delay="1000">Appear with .shrinkInBlur</li>
129
+ <li class="animate__skidLeft" data-delay="300">Appear with .animate__skidLeft</li>
130
+ <li class="animated animate__skidLeftBig" data-delay="1000">Appear with .animate__skidLeftBig</li>
131
+ <li class="animated animate__skidRight" data-delay="1000">Appear with .animate__skidRight</li>
132
+ <li class="animated animate__skidRightBig" data-delay="1000">Appear with .animate__skidRightBig</li>
133
+ <li class="animated animate__shrinkIn" data-delay="1000">Appear with .animate__shrinkIn</li>
134
+ <li class="animated animate__shrinkInBlur" data-delay="1000">Appear with .animate__shrinkInBlur</li>
109
135
  </ul>
110
136
  </section>
111
137
  <section class="center" data-transition="fade-in">
112
- <h3>Thanks</h3>
138
+ <h3>Credits</h3>
113
139
  <ul>
114
- <li class="animated fadeInLeft">Hakim El Hattab for <a href="https://revealjs.com" target="_blank">Reveal.js</a></li>
115
- <li class="animated fadeInLeft">Daniel Eden for <a href="https://daneden.github.io/animate.css/" target="_blank">Animate.css</a></li>
116
- <li class="animated fadeInLeft">David Marby &amp; Nijiko Yonskai for <a href="https://picsum.photos" target="_blank">picsum.photos</a></li>
140
+ <li class="animate__fadeInLeft">Hakim El Hattab for <a href="https://revealjs.com" target="_blank">Reveal.js</a></li>
141
+ <li class="animate__fadeInLeft">Daniel Eden for <a href="https://animate.style" target="_blank">Animate.css</a></li>
142
+ <li class="animate__fadeInLeft">David Marby &amp; Nijiko Yonskai for <a href="https://picsum.photos" target="_blank">picsum.photos</a></li>
143
+ <li class="animate__fadeInLeft">Photography by <a href="https://unsplash.com/photos/6WLGMivmV00" target="_blank">Michael Baird</a>, <a href="https://unsplash.com/photos/scwYrU5hCSM" target="_blank">Michael Quinn</a>, <a href="https://unsplash.com/photos/YoadQb46v6k" target="_blank">Craig Garner</a>, <a href="https://unsplash.com/photos/RlYsCMbF6EI" target="_blank">Grzegorz Mleczek</a> and <a href="https://unsplash.com/photos/9RqA6tnT0gA" target="_blank">Samuel Zeller</a>.</li>
117
144
  </ul>
118
145
  </section>
119
146
  </div>
@@ -122,20 +149,17 @@
122
149
  <script src="plugin/appearance/appearance.js"></script>
123
150
  <script>
124
151
  Reveal.initialize({
125
- transition: "convex",
152
+ transition: "slide",
126
153
  history: true,
127
154
  appearance: {
128
- baseclass: "animated",
129
- visibleclass: "in",
130
155
  hideagain: true,
131
- delay: 300,
132
- appearevent: "slidetransitionend",
133
- debug: true,
156
+ appearevent: "auto",
134
157
  autoappear: false,
135
158
  autoelements: {
136
- "ul li": "fadeInLeft",
137
- "ol li": "fadeInLeftRight"
138
- }
159
+ "ul li": "animate__fadeInLeft",
160
+ "ol li": "animate__fadeInLeftRight"
161
+ },
162
+ compatibility: false
139
163
  },
140
164
  plugins: [
141
165
  Appearance
package/img/1.jpg CHANGED
Binary file
package/img/2.jpg CHANGED
Binary file
package/img/3.jpg CHANGED
Binary file
package/img/4.jpg CHANGED
Binary file
package/img/5.jpg CHANGED
Binary file
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "reveal.js-appearance",
3
- "version": "1.1.1",
4
- "description": "A plugin for Reveal.js that adds appearance effects to elements",
5
- "keywords": "reveal, reveal.js, reveal-plugin, plugin, text effects",
3
+ "version": "1.1.2",
4
+ "description": "A plugin for Reveal.js that sequentially adds appearance effects to elements like in Powerpoint",
5
+ "keywords": "reveal, reveal.js, reveal-plugin, plugin, text effects, powerpoint",
6
6
  "homepage": "https://github.com/Martinomagnifico/reveal.js-appearance",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "https://github.com/Martinomagnifico/reveal.js-appearance.git"
10
10
  },
11
- "peerDependencies": {
12
- "reveal.js": "^4.0"
13
- },
14
11
  "author": "Martijn De Jongh",
15
- "license": "MIT, Copyright (C) 2021 Martijn De Jongh"
12
+ "license": "MIT, Copyright (C) 2022 Martijn De Jongh",
13
+ "peerDependencies": {
14
+ "reveal.js": "^4.2"
15
+ }
16
16
  }