You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,19 @@
1
1
# Changelog
2
2
3
3
4
+
## [1.3.4] - 2023-07-31
5
+
### Changed
6
+
- Fixed a typo (was srcipt but should be script)
7
+
- Fixed visible appearance items in print view (#13)
8
+
- Dependency fixes
9
+
10
+
### Added
11
+
- Added `cssautoload` option to automatically load the CSS file. Can be switched off if you want to load the CSS file yourself with `import` when using bundlers like Webpack or Parcel.
12
+
- Added `baseline` effect for use with words and letters, to make them appear from the baseline of the text.
Copy file name to clipboardExpand all lines: README.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,10 +77,17 @@ If you're using ES modules, you can add it like this:
77
77
```
78
78
79
79
### Styling
80
-
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.
80
+
The styling of Appearance is automatically inserted**when the appearance folderis manually (or automatically) copied** to the Reveal.js plugin folder.
81
81
82
-
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.
82
+
**BUT**: If you are using a bundler like Webpack or Parcel, that uses **import**, you will also need to **import** the CSS file yourself. Depending on your setup this can be something like this:
In that case, the `cssautoload` option (in the Reveal appearance options) should be set to `false`, to avoid style loading errors.
89
+
90
+
> However, if you actually know the correct full path to the CSS file, then you can still use the `csspath` option and keep `cssautoload` set to `true`.
84
91
85
92
86
93
### HTML
@@ -137,10 +144,12 @@ You can change the speed of each animation, using the tempo classes from Animate
137
144
138
145
For words and letters, the same techniques can be used.
139
146
140
-
Note that the data-delay also gets copied to the smaller elements in it, which means that there is no more 'whole sentence' or 'whole word' to delay. By default, the whole element then gets the delay (depending on if it is following other animations) as defined in the `delay` option in the Configuration, but it can be overriden by an optional `data-container-delay`.
147
+
Note that the data-delay also gets copied to the smaller elements in it, which means that there is no more 'whole sentence' or 'whole word' to delay. By default, the whole element then gets the delay (depending on if it is following other animations) as defined in the `delay` option in the Configuration, but it can be overriden by an optional `data-container-delay`.
148
+
149
+
Also note the (optional) `baseline` class here, which makes the words appear from the baseline of the text.
data-container-delay="600">Let words apear and appear</h3>
@@ -150,7 +159,7 @@ Note that the data-delay also gets copied to the smaller elements in it, which m
150
159
### Changing the 'appearevent'
151
160
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.
152
161
153
-
There are cases however, where there is hardly any transition, for example, when going from an autoanimate slide to another. Reveal then suppresses the user-set transition to a short opacity change. Starting *together with* the transition might then be nicer. You can use any of the following events:
162
+
There are cases however, where there is hardly any transition, for example, when going from an autoanimate slide to another. Reveal then suppresses the user-set transition to a short opacity change. Starting *together with* the transition might then be nicer. You can use any of the following events:
154
163
155
164
**slidetransitionend* (default, Appearance will always start animating elements after the transition)
156
165
**slidechanged* (Appearance will always start together with the transition)
@@ -285,6 +294,7 @@ Reveal.initialize({
285
294
appearevent:'slidetransitionend',
286
295
autoappear:false,
287
296
autoelements:false,
297
+
cssautoload:true,
288
298
csspath:'',
289
299
animatecsspath: {
290
300
link :'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css',
@@ -302,6 +312,7 @@ Reveal.initialize({
302
312
***`appearevent`**: Use a specific event at which Appearance starts.
303
313
***`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 "Autoappear" mode above.
304
314
***`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.
315
+
***`cssautoload`**: Appearance will load the CSS if this is set to `true`. If you import reveal.js-appearance from npm, you will need to import the CSS file yourself. If you use 'import', then csspath should be set to `false`. If you know the path to the CSS file, you can use the `csspath` option and keep cssautoload set to `true`.
305
316
***`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.
306
317
***`animatecsspath`**: Appearance will also automatically load the styling of Animate.css via a CDN. Note that Animate.css has two links, the first (CDN) one is for version 4, the second (old) one is the version 3 compatibility CDN link.
307
318
***`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.
<h3>Change the settings for words or letters</h3><small>For words and letters, just set the speed and delay as described above. The smaller parts will inherit these settings. Set a <code>data-container-delay="*"</code> for a different delay for the container, compared to the standard <code>delay = 300</code> from the options. </small><br><br>
165
-
<h3class="animate__fadeInDown" data-split="words">Split into words</h3>
166
-
<h3class="animate__fadeInDown animate__faster" data-split="letters" data-delay="75" data-container-delay="800">Split into letters</h3><br>
167
-
<pre><codeclass="hljs html" data-line-numbers><h3 class="animate__fadeInDown" data-split="words">Split into words</h3>
168
-
<h3 class="animate__fadeInDown animate__faster" data-split="letters" data-delay="75" data-container-delay="800">Split into letters</h3></code></pre>
164
+
<h3>Change the settings for words or letters</h3><small>For words and letters, just set the speed and delay as described above. The smaller parts will inherit these settings. Set a <code>data-container-delay="*"</code> for a different delay for the container, compared to the standard <code>delay = 300</code> from the options. Add a <code>baseline</code> class for a nice baseline effect.</small><br><br>
165
+
<h3class="animate__fadeInUp baseline" data-split="words">Split into words</h3>
166
+
<h3class="animate__fadeInUp animate__faster" data-split="letters" data-delay="75" data-container-delay="800">Split into letters</h3><br>
167
+
<pre><codeclass="hljs html" data-line-numbers><h3 class="animate__fadeInUp baseline" data-split="words">Split into words</h3>
168
+
<h3 class="animate__fadeInUp animate__faster" data-split="letters" data-delay="75" data-container-delay="800">Split into letters</h3></code></pre>
169
169
</section>
170
170
<sectiondata-auto-animate>
171
171
<h3>Change when Appearance starts</h3>
@@ -244,10 +244,10 @@ <h3>Local auto-appear, specified</h3><small>You can also add a JSON object to th
<h3>Local auto-appear, specified and split</h3><small>And you can do the same for any animations that you would like to have on lines and words.</small>
<pclass="small">The <code>delay</code> option is the base time in ms between appearances. This value governs any elements that do not have an Animate.css speed class assigned to it, or are not inside a slide which includes delay in a data-autoappear attribute.</p>
<pclass="small">You can change when Appearance starts with any of the following events: <code>slidetransitionend</code> (default, after the transition), <code>slidechanged</code> (with the transition) and <code>auto</code> (with transition, on autoanimate slides). This can be overridden per-slide with data-attributes, like this: <code>data-appearevent="auto"</code>.</p>
<pclass="small">The <code>autoappear</code> option works together with the <code>autoelements</code> option. When it is set to <code>true</code>, any elements in the autoelements option will animate with the declared animation when the slide or fragment opens. See <ahref="#/autoappear"><code>autoappear</code></a>.</p>
<pclass="small">These are the elements that <code>autoappear</code> 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.</p>
<pclass="small">If you import reveal.js-appearance from npm, you will need to import the CSS file yourself. If you use 'import', then <code>csspath</code> should be set to <code>false</code>. If you know the path to the CSS file, you can use the <code>csspath</code> option and keep <code>cssautoload</code> set to <code>true</code>.</p>
342
+
</section>
330
343
<section>
331
-
<h4>Option 6: csspath</h4>
344
+
<h4>Option 7: csspath</h4>
332
345
<pclass="small">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.</p>
<pclass="small">Appearance will also automatically load the styling of Animate.css via a CDN. Note that Animate.css has two links, the first (CDN) one is for version 4, the second (old) one is the version 3 compatibility CDN link.</p>
<pclass="small">This setting is about the breaking changes in Animate.css (used by Appearance). See the migration guide in the Readme for more info. </p>
358
371
<pclass="small">Setting <code>'compatibility: true'</code> can let you use your old markup.</p>
<pclass="small">This setting is about the breaking changes in Animate.css (used by Appearance). See the migration guide in the Readme for more info. </p>
370
383
<pclass="small">This is the baseclass to use if you don't change your markup.</p>
0 commit comments