Skip to content

Commit

Permalink
Small bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Martino committed Jun 26, 2022
1 parent 9d9825b commit 76e5650
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 28 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,10 @@ Reveal.initialize({
appearevent: 'slidetransitionend',
autoappear: false,
autoelements: false,
csspath: {
appearance: '',
animatecss: {
link : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css',
compat : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.compat.css',
}
csspath: '',
animatecsspath: {
link : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css',
compat : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.compat.css',
},
compatibility: false,
compatibilitybaseclass: 'animated'
Expand All @@ -137,7 +135,8 @@ Reveal.initialize({
* **`appearevent`**: Use a specific event at which Appearance starts.
* **`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.
* **`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.
* **`csspath`**: Appearance will automatically load the Animate.css styling and the styling of the plugin itself. If you want to customise the styling, you can link to your own CSS files here for each of the styles. 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.
* **`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.
* **`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.
* **`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.
* **`compatibilitybaseclass`**: This is the baseclass to use if you don't change your markup.

Expand Down
12 changes: 5 additions & 7 deletions plugin/appearance/appearance.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,10 @@ var Plugin = function Plugin() {
appearevent: 'slidetransitionend',
autoappear: false,
autoelements: false,
csspath: {
appearance: '',
animatecss: {
link: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css',
compat: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.compat.css'
}
csspath: '',
animatecsspath: {
link: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css',
compat: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.compat.css'
},
compatibility: false,
compatibilitybaseclass: 'animated'
Expand Down Expand Up @@ -375,7 +373,7 @@ var Plugin = function Plugin() {
}

var AppearanceStylePath = options.csspath.appearance ? options.csspath.appearance : "".concat(pluginPath(), "appearance.css") || 'plugin/appearance/appearance.css';
var AnimateCSSPath = !options.compatibility ? options.csspath.animatecss.link : options.csspath.animatecss.compat;
var AnimateCSSPath = !options.compatibility ? options.animatecsspath.link : options.animatecsspath.compat;

if (options.debug) {
console.log("Plugin path = ".concat(pluginPath()));
Expand Down
12 changes: 5 additions & 7 deletions plugin/appearance/appearance.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,10 @@
appearevent: 'slidetransitionend',
autoappear: false,
autoelements: false,
csspath: {
appearance: '',
animatecss: {
link: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css',
compat: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.compat.css'
}
csspath: '',
animatecsspath: {
link: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css',
compat: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.compat.css'
},
compatibility: false,
compatibilitybaseclass: 'animated'
Expand Down Expand Up @@ -381,7 +379,7 @@
}

var AppearanceStylePath = options.csspath.appearance ? options.csspath.appearance : "".concat(pluginPath(), "appearance.css") || 'plugin/appearance/appearance.css';
var AnimateCSSPath = !options.compatibility ? options.csspath.animatecss.link : options.csspath.animatecss.compat;
var AnimateCSSPath = !options.compatibility ? options.animatecsspath.link : options.animatecsspath.compat;

if (options.debug) {
console.log("Plugin path = ".concat(pluginPath()));
Expand Down
12 changes: 5 additions & 7 deletions plugin/appearance/plugin-src.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,10 @@ const Plugin = () => {
appearevent: 'slidetransitionend',
autoappear: false,
autoelements: false,
csspath: {
appearance: '',
animatecss: {
link : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css',
compat : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.compat.css',
}
csspath: '',
animatecsspath: {
link : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css',
compat : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.compat.css',
},
compatibility: false,
compatibilitybaseclass: 'animated'
Expand Down Expand Up @@ -238,7 +236,7 @@ const Plugin = () => {
}

let AppearanceStylePath = options.csspath.appearance ? options.csspath.appearance : null || `${pluginPath()}appearance.css` || 'plugin/appearance/appearance.css'
let AnimateCSSPath = !options.compatibility ? options.csspath.animatecss.link :options.csspath.animatecss.compat;
let AnimateCSSPath = !options.compatibility ? options.animatecsspath.link : options.animatecsspath.compat;

if (options.debug) {
console.log(`Plugin path = ${pluginPath()}`);
Expand Down

0 comments on commit 76e5650

Please sign in to comment.