reveal.js-appearance 1.0.9 → 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 +62 -0
- package/LICENSE +1 -1
- package/README.md +105 -43
- package/css/demo.css +79 -5
- package/demo.html +97 -56
- package/img/1.jpg +0 -0
- package/img/2.jpg +0 -0
- package/img/3.jpg +0 -0
- package/img/4.jpg +0 -0
- package/img/5.jpg +0 -0
- package/package.json +7 -7
- package/plugin/appearance/appearance.css +172 -343
- package/plugin/appearance/appearance.esm.js +253 -100
- package/plugin/appearance/appearance.js +388 -235
- package/plugin/appearance/plugin-src.js +178 -95
- package/screenshot.png +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Changelog
|
|
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
|
|
10
|
+
|
|
11
|
+
## [1.1.1] - 2021-11-27
|
|
12
|
+
### Added
|
|
13
|
+
- Added a new `autoappear` mode, for use in cases where adding animation classes is too much of a hassle, like inside Markdown.
|
|
14
|
+
- Started keeping the changelog.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [1.1.0] - 2021-09-03
|
|
19
|
+
### Added
|
|
20
|
+
- Added Github corner badge
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- Changed readme
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## [1.0.9] - 2021-06-30
|
|
28
|
+
### Changed
|
|
29
|
+
- Fixed a bug where '=' was '=='.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [1.0.8] - 2021-06-27
|
|
34
|
+
### Added
|
|
35
|
+
- Choose an event at which Appearance launches its animations
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
- Appearance now shows the complete slides from the overview
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## [1.0.7] - 2020-06-28
|
|
43
|
+
### Changed
|
|
44
|
+
- Clearing timeouts that are in past slides. This solves 'hanging' Appearance items if you slide back and forth.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
## [1.0.6] - 2020-06-28
|
|
49
|
+
### Changed
|
|
50
|
+
- Fix bug that hid Appearance items in PDF exports.
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## [1.0.5] - 2020-05-20
|
|
55
|
+
### Added
|
|
56
|
+
- Added compatibility with the new Reveal.js 4 that changes the way plugins work.
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
## [1.0.4] - 2020-05-20
|
|
61
|
+
### Added
|
|
62
|
+
- The 1.0.4 release is compatible with Reveal.js 3. Reveal versions lower than 4 have no "slidetransitionend" event, so this release also has the Transit.js plugin included (see https://github.com/Martinomagnifico/reveal.js-transit for more information).
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
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
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
# Appearance
|
|
2
2
|
|
|
3
|
+
[](#) [](https://github.com/Martinomagnifico/reveal.js-appearance/archive/refs/heads/master.zip)
|
|
4
|
+
|
|
3
5
|
A plugin for [Reveal.js](https://revealjs.com) 4 that adds appearance effects to elements.
|
|
4
6
|
|
|
5
|
-
[](https://martinomagnifico.github.io/reveal.js-appearance/demo.html)
|
|
7
|
+
[](https://martinomagnifico.github.io/reveal.js-appearance/demo.html)
|
|
6
8
|
|
|
7
|
-
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
|
|
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.
|
|
8
10
|
|
|
9
11
|
[Demo](https://martinomagnifico.github.io/reveal.js-appearance/demo.html)
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
The animations will start automatically after or at each slide or fragment change if the HTML is set up to use Appearance.
|
|
13
14
|
|
|
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.
|
|
14
16
|
|
|
15
|
-
|
|
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.
|
|
16
18
|
|
|
17
|
-
The Appearance plugin has been rewritten for Reveal.js version 4.
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
## Installation
|
|
20
21
|
|
|
21
22
|
### Regular installation
|
|
22
23
|
|
|
@@ -26,7 +27,7 @@ Copy the appearance folder to the plugins folder of the reveal.js folder, like t
|
|
|
26
27
|
|
|
27
28
|
This plugin is published to, and can be installed from, npm.
|
|
28
29
|
|
|
29
|
-
```
|
|
30
|
+
```console
|
|
30
31
|
npm install reveal.js-appearance
|
|
31
32
|
```
|
|
32
33
|
The Appearance plugin folder can then be referenced from `node_modules/reveal.js-appearance/plugin/appearance`
|
|
@@ -37,8 +38,6 @@ The Appearance plugin folder can then be referenced from `node_modules/reveal.js
|
|
|
37
38
|
|
|
38
39
|
### JavaScript
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
42
41
|
There are two JavaScript files for Appearance, a regular one, `appearance.js`, and a module one, `appearance.esm.js`. You only need one of them:
|
|
43
42
|
|
|
44
43
|
#### Regular
|
|
@@ -70,30 +69,40 @@ If you're using ES modules, you can add it like this:
|
|
|
70
69
|
```
|
|
71
70
|
|
|
72
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.
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
* The first one is Animate.css by Daniel Eden for the basic animations, and we can add it through a CDN.
|
|
77
|
-
* The second file is included with Appearance. It adds to the first stylesheet to allow for a non-animated state.
|
|
78
|
-
|
|
79
|
-
```html
|
|
80
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
|
|
81
|
-
<link rel="stylesheet" href="plugin/appearance/appearance.css">
|
|
82
|
-
```
|
|
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.
|
|
83
75
|
|
|
84
76
|
|
|
85
77
|
|
|
86
78
|
### HTML
|
|
87
79
|
|
|
88
|
-
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`:
|
|
81
|
+
|
|
82
|
+
```html
|
|
83
|
+
<ul>
|
|
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>
|
|
87
|
+
</ul>
|
|
88
|
+
```
|
|
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:
|
|
89
90
|
|
|
90
91
|
```html
|
|
91
92
|
<ul>
|
|
92
|
-
|
|
93
|
-
<li
|
|
94
|
-
<li
|
|
93
|
+
<li>Add it to any text element</li>
|
|
94
|
+
<li>Like list items, or headers.</li>
|
|
95
|
+
<li>It adds some attention.</li>
|
|
95
96
|
</ul>
|
|
96
97
|
```
|
|
98
|
+
or like this in Markdown:
|
|
99
|
+
|
|
100
|
+
```markdown
|
|
101
|
+
* Add it to any text element
|
|
102
|
+
* Like list items, or headers.
|
|
103
|
+
* It adds some attention.
|
|
104
|
+
|
|
105
|
+
```
|
|
97
106
|
|
|
98
107
|
|
|
99
108
|
## Configuration
|
|
@@ -102,23 +111,34 @@ There are a few options that you can change from the Reveal.js options. The valu
|
|
|
102
111
|
|
|
103
112
|
```javascript
|
|
104
113
|
Reveal.initialize({
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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 ]
|
|
114
130
|
});
|
|
115
131
|
```
|
|
116
132
|
|
|
117
|
-
* **`baseclass`**: The baseclass uses the baseclass from Animate.css. Change it if you like.
|
|
118
|
-
* **`visibleclass`**: Use a specific class for the visible state.
|
|
119
133
|
* **`hideagain`**: Change this (true/false) if you want to see the shown elements if you go back.
|
|
120
134
|
* **`delay`**: Base time in ms between appearances.
|
|
121
135
|
* **`appearevent`**: Use a specific event at which Appearance starts.
|
|
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.
|
|
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.
|
|
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.
|
|
122
142
|
|
|
123
143
|
### Changing the 'appearevent'
|
|
124
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.
|
|
@@ -127,31 +147,73 @@ There are cases however, where there is hardly any transition, for example, whe
|
|
|
127
147
|
|
|
128
148
|
* *slidetransitionend* (default, Appearance will start animating elements after the transition)
|
|
129
149
|
* *slidechanged* (Appearance will start together with the transition)
|
|
130
|
-
* *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*)
|
|
131
151
|
|
|
132
152
|
These same event triggers can be set through the data-attribute `data-appearevent`.
|
|
133
153
|
|
|
134
154
|
When using Appearance inside an autoanimate slide, and changing the appearevent to `slidechanged` or `auto`, keep in mind that Reveal transforms opacity for all non-autoanimate items, while Appearance does the same on most of the effects. To avoid strange behaviour, wrap these Appearance items in a parent. For example, a list of animated bullet points works well, because the animated class is on the children, not the parent. Separate headings or other elements do not have that, so should be wrapped.
|
|
135
155
|
|
|
136
156
|
|
|
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, or tags, in the presentation.
|
|
159
|
+
|
|
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
|
+
|
|
162
|
+
```javascript
|
|
163
|
+
autoelements: {
|
|
164
|
+
'ul li': 'animate__fadeInLeft',
|
|
165
|
+
'ol li': 'animate__fadeInRight'
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
You can add any selector and animation class to this object.
|
|
169
|
+
|
|
170
|
+
With the option `autoappear` set to `false`, the above still works, but only on a data-attribute basis. ONLY elements in the presentation that are inside sections or fragments with a data-attribute of `data-autoappear` will be animated automatically.
|
|
171
|
+
|
|
172
|
+
|
|
137
173
|
|
|
138
174
|
## Now change it
|
|
139
175
|
|
|
140
176
|
It is easy to change the effects for Appearance. Here's how to change the delay per-element:
|
|
141
177
|
|
|
142
178
|
```html
|
|
143
|
-
<img class="
|
|
144
|
-
<img class="
|
|
145
|
-
<img class="
|
|
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">
|
|
146
182
|
```
|
|
147
183
|
or the speed of each animation, using the tempo classes from Animate.css:
|
|
148
184
|
|
|
149
185
|
```html
|
|
150
|
-
<img class="
|
|
151
|
-
<img class="
|
|
152
|
-
<img class="
|
|
153
|
-
<img class="
|
|
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
|
+
```
|
|
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">
|
|
154
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
|
+
|
|
155
217
|
|
|
156
218
|
## Like it?
|
|
157
219
|
If you like it, please star this repo!
|
|
@@ -162,4 +224,4 @@ And if you want to show off what you made with it, please do :-)
|
|
|
162
224
|
## License
|
|
163
225
|
MIT licensed
|
|
164
226
|
|
|
165
|
-
Copyright (C)
|
|
227
|
+
Copyright (C) 2022 Martijn De Jongh (Martino)
|
package/css/demo.css
CHANGED
|
@@ -1,11 +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
|
+
}
|
|
74
|
+
|
|
75
|
+
a.github-corner {
|
|
76
|
+
position: absolute;
|
|
77
|
+
z-index: 1;
|
|
78
|
+
width: clamp(50px, 8vmax, 80px);
|
|
79
|
+
line-height: 0;
|
|
80
|
+
color: rgba(255, 255, 255, 0.5);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
a.github-corner:hover {
|
|
84
|
+
color: white;
|
|
85
|
+
}
|
package/demo.html
CHANGED
|
@@ -8,66 +8,82 @@
|
|
|
8
8
|
<meta name="author" content="Martinomagnifico">
|
|
9
9
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
10
10
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
11
|
-
<link rel="stylesheet" href="
|
|
12
|
-
<link rel="stylesheet" href="
|
|
13
|
-
<link rel="stylesheet" href="
|
|
11
|
+
<link rel="stylesheet" href="../dist/reset.css">
|
|
12
|
+
<link rel="stylesheet" href="../dist/reveal.css">
|
|
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>
|
|
20
|
-
<div class="reveal">
|
|
18
|
+
<div class="reveal"><a class="github-corner" href="https://github.com/Martinomagnifico/reveal.js-appearance" target="blank" title="View source on GitHub">
|
|
19
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 55 55">
|
|
20
|
+
<path fill="currentColor" d="M27.5 11.2a16.3 16.3 0 0 0-5.1 31.7c.8.2 1.1-.3 1.1-.7v-2.8c-4.5 1-5.5-2.2-5.5-2.2-.7-1.9-1.8-2.4-1.8-2.4-1.5-1 .1-1 .1-1 1.6.1 2.5 1.7 2.5 1.7 1.5 2.5 3.8 1.8 4.7 1.4.2-1 .6-1.8 1-2.2-3.5-.4-7.3-1.8-7.3-8 0-1.8.6-3.3 1.6-4.4-.1-.5-.7-2.1.2-4.4 0 0 1.4-.4 4.5 1.7a15.6 15.6 0 0 1 8.1 0c3.1-2 4.5-1.7 4.5-1.7.9 2.3.3 4 .2 4.4 1 1 1.6 2.6 1.6 4.3 0 6.3-3.8 7.7-7.4 8 .6.6 1.1 1.6 1.1 3v4.6c0 .4.3.9 1.1.7a16.3 16.3 0 0 0-5.2-31.7"></path>
|
|
21
|
+
</svg></a>
|
|
21
22
|
<div class="slides">
|
|
22
23
|
<section class="center">
|
|
23
|
-
<h1 class="
|
|
24
|
-
<h3 class="
|
|
24
|
+
<h1 class="animate__flipInX animate__slow">Appearance</h1>
|
|
25
|
+
<h3 class="animate__flipInX animate__slow" data-delay="700">for Reveal.js</h3>
|
|
25
26
|
</section>
|
|
26
|
-
<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><
|
|
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>
|
|
27
28
|
<p>Let's check out what Appearance does:</p>
|
|
28
29
|
</section>
|
|
29
30
|
<section class="center">
|
|
30
31
|
<h3>Let text appear</h3>
|
|
31
32
|
<ul>
|
|
32
|
-
<li class="
|
|
33
|
-
<li class="
|
|
34
|
-
<li class="
|
|
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>
|
|
35
36
|
</ul>
|
|
36
37
|
</section>
|
|
37
38
|
<section class="center">
|
|
38
39
|
<h3>Let images appear</h3>
|
|
39
|
-
<div class="
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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>
|
|
44
47
|
</section>
|
|
45
48
|
<section class="center">
|
|
46
|
-
<h3>Change the delay</h3><small>Use data-delay="*" on each element, where the wildcard is the delay in microseconds
|
|
47
|
-
<div class="
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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>
|
|
52
57
|
</section>
|
|
53
58
|
<section>
|
|
54
59
|
<section class="center">
|
|
55
60
|
<h3>Change the animation speed</h3><small>Use the speed classes from Animate.css to change the speed of the animation:</small>
|
|
56
|
-
<div class="
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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>
|
|
61
75
|
</section>
|
|
62
76
|
<section class="center">
|
|
63
77
|
<h3>Inside fragments</h3>
|
|
64
|
-
<p class="
|
|
78
|
+
<p class="animate__fadeInDown">Like this <span class="animate__fadeInDown animate__faster" style="font-size: .8em">(click next)</span>:</p>
|
|
65
79
|
<div class="fragment">
|
|
66
|
-
<div class="
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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>
|
|
71
87
|
</div>
|
|
72
88
|
</section>
|
|
73
89
|
<section class="center" data-auto-animate>
|
|
@@ -79,46 +95,71 @@
|
|
|
79
95
|
<p class="animated fadeInUp">You can use any of the following events:</p>
|
|
80
96
|
</div>
|
|
81
97
|
<ul>
|
|
82
|
-
<li class="
|
|
83
|
-
<li class="
|
|
84
|
-
<li class="
|
|
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>
|
|
85
101
|
</ul>
|
|
86
|
-
<div><br><small class="
|
|
102
|
+
<div><br><small class="animate__fadeInUp">This can also be set per-slide with data-attributes.</small></div>
|
|
87
103
|
</section>
|
|
88
104
|
</section>
|
|
89
|
-
<section class="center" data-
|
|
90
|
-
<h3>
|
|
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>
|
|
107
|
+
<ul>
|
|
108
|
+
<li>This is list item 1</li>
|
|
109
|
+
<li>This is list item 2</li>
|
|
110
|
+
<li>This is list item 3</li>
|
|
111
|
+
</ul>
|
|
112
|
+
</section>
|
|
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">
|
|
127
|
+
<h3>Additional animations</h3>
|
|
91
128
|
<ul>
|
|
92
|
-
<li class="
|
|
93
|
-
<li class="animated
|
|
94
|
-
<li class="animated
|
|
95
|
-
<li class="animated
|
|
96
|
-
<li class="animated
|
|
97
|
-
<li class="animated
|
|
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>
|
|
98
135
|
</ul>
|
|
99
136
|
</section>
|
|
100
137
|
<section class="center" data-transition="fade-in">
|
|
101
|
-
<h3>
|
|
138
|
+
<h3>Credits</h3>
|
|
102
139
|
<ul>
|
|
103
|
-
<li class="
|
|
104
|
-
<li class="
|
|
105
|
-
<li class="
|
|
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 & 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>
|
|
106
144
|
</ul>
|
|
107
145
|
</section>
|
|
108
146
|
</div>
|
|
109
147
|
</div>
|
|
110
|
-
<script src="
|
|
148
|
+
<script src="../dist/reveal.js"></script>
|
|
111
149
|
<script src="plugin/appearance/appearance.js"></script>
|
|
112
150
|
<script>
|
|
113
151
|
Reveal.initialize({
|
|
114
|
-
transition: "
|
|
152
|
+
transition: "slide",
|
|
115
153
|
history: true,
|
|
116
154
|
appearance: {
|
|
117
|
-
baseclass: "animated",
|
|
118
|
-
visibleclass: "in",
|
|
119
155
|
hideagain: true,
|
|
120
|
-
|
|
121
|
-
|
|
156
|
+
appearevent: "auto",
|
|
157
|
+
autoappear: false,
|
|
158
|
+
autoelements: {
|
|
159
|
+
"ul li": "animate__fadeInLeft",
|
|
160
|
+
"ol li": "animate__fadeInLeftRight"
|
|
161
|
+
},
|
|
162
|
+
compatibility: false
|
|
122
163
|
},
|
|
123
164
|
plugins: [
|
|
124
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
|