Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dillonzq/LoveIt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2022-05-06 21:22:58 +0300
committerDillon <dillonzq@outlook.com>2022-05-06 21:22:58 +0300
commit7930049e557a6e3d1e6847570271b4d8b879cd37 (patch)
treebc6c0d4c89563ce06eb16d8e3c0f75b863317047 /src
parent09ea77eff137021bbf40762c6668f33e5aba06c9 (diff)
chore(lib): update animate.css 3.7.2 -> 4.1.1
Diffstat (limited to 'src')
-rw-r--r--src/js/theme.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/js/theme.js b/src/js/theme.js
index def5f409..cbbd0023 100644
--- a/src/js/theme.js
+++ b/src/js/theme.js
@@ -18,9 +18,9 @@ class Util {
animateCSS(element, animation, reserved, callback) {
if (!Array.isArray(animation)) animation = [animation];
- element.classList.add('animated', ...animation);
+ element.classList.add('animate__animated', ...animation);
const handler = () => {
- element.classList.remove('animated', ...animation);
+ element.classList.remove('animate__animated', ...animation);
element.removeEventListener('animationend', handler);
if (typeof callback === 'function') callback();
};
@@ -373,7 +373,7 @@ class Theme {
$copy.title = this.config.code.copyTitle;
const clipboard = new ClipboardJS($copy);
clipboard.on('success', _e => {
- this.util.animateCSS($code, 'flash');
+ this.util.animateCSS($code, 'animate__flash');
});
$header.appendChild($copy);
}
@@ -658,26 +658,26 @@ class Theme {
const isMobile = this.util.isMobile();
this.util.forEach($headers, $header => {
if (scroll > ACCURACY) {
- $header.classList.remove('fadeInDown');
- this.util.animateCSS($header, ['fadeOutUp', 'faster'], true);
+ $header.classList.remove('animate__fadeInDown');
+ this.util.animateCSS($header, ['animate__fadeOutUp', 'animate__faster'], true);
} else if (scroll < - ACCURACY) {
- $header.classList.remove('fadeOutUp');
- this.util.animateCSS($header, ['fadeInDown', 'faster'], true);
+ $header.classList.remove('animate__fadeOutUp');
+ this.util.animateCSS($header, ['animate__fadeInDown', 'animate__faster'], true);
}
});
if (this.newScrollTop > MINIMUM) {
if (isMobile && scroll > ACCURACY) {
- $fixedButtons.classList.remove('fadeIn');
- this.util.animateCSS($fixedButtons, ['fadeOut', 'faster'], true);
+ $fixedButtons.classList.remove('animate__fadeIn');
+ this.util.animateCSS($fixedButtons, ['animate__fadeOut', 'animate__faster'], true);
} else if (!isMobile || scroll < - ACCURACY) {
$fixedButtons.style.display = 'block';
- $fixedButtons.classList.remove('fadeOut');
- this.util.animateCSS($fixedButtons, ['fadeIn', 'faster'], true);
+ $fixedButtons.classList.remove('animate__fadeOut');
+ this.util.animateCSS($fixedButtons, ['animate__fadeIn', 'animate__faster'], true);
}
} else {
if (!isMobile) {
- $fixedButtons.classList.remove('fadeIn');
- this.util.animateCSS($fixedButtons, ['fadeOut', 'faster'], true);
+ $fixedButtons.classList.remove('animate__fadeIn');
+ this.util.animateCSS($fixedButtons, ['animate__fadeOut', 'animate__faster'], true);
}
$fixedButtons.style.display = 'none';
}