mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-13 02:16:19 +01:00
chore(lib): update animate.css 3.7.2 -> 4.1.1
This commit is contained in:
parent
09ea77eff1
commit
7930049e55
10 changed files with 39 additions and 43 deletions
|
@ -7,8 +7,8 @@ libFiles:
|
|||
normalizeCSS: normalize.css@8.0.1/normalize.min.css
|
||||
# fontawesome-free@6.1.1 https://fontawesome.com/
|
||||
fontawesomeFreeCSS: '@fortawesome/fontawesome-free@6.1.1/css/all.min.css'
|
||||
# animate.css@3.7.2 https://github.com/daneden/animate.css
|
||||
animateCSS: animate.css@3.7.2/animate.min.css
|
||||
# animate.css@4.1.1 https://github.com/daneden/animate.css
|
||||
animateCSS: animate.css@4.1.1/animate.min.css
|
||||
# smooth-scroll@16.1.3 https://github.com/cferdinandi/smooth-scroll
|
||||
smoothScrollJS: smooth-scroll@16.1.3/dist/smooth-scroll.min.js
|
||||
# autocomplete.js@0.37.1 https://github.com/algolia/autocomplete.js
|
||||
|
|
|
@ -58,12 +58,12 @@ var Util = /*#__PURE__*/function () {
|
|||
|
||||
if (!Array.isArray(animation)) animation = [animation];
|
||||
|
||||
(_element$classList = element.classList).add.apply(_element$classList, ['animated'].concat(_toConsumableArray(animation)));
|
||||
(_element$classList = element.classList).add.apply(_element$classList, ['animate__animated'].concat(_toConsumableArray(animation)));
|
||||
|
||||
var handler = function handler() {
|
||||
var _element$classList2;
|
||||
|
||||
(_element$classList2 = element.classList).remove.apply(_element$classList2, ['animated'].concat(_toConsumableArray(animation)));
|
||||
(_element$classList2 = element.classList).remove.apply(_element$classList2, ['animate__animated'].concat(_toConsumableArray(animation)));
|
||||
|
||||
element.removeEventListener('animationend', handler);
|
||||
if (typeof callback === 'function') callback();
|
||||
|
@ -507,7 +507,7 @@ var Theme = /*#__PURE__*/function () {
|
|||
$copy.title = _this5.config.code.copyTitle;
|
||||
var clipboard = new ClipboardJS($copy);
|
||||
clipboard.on('success', function (_e) {
|
||||
_this5.util.animateCSS($code, 'flash');
|
||||
_this5.util.animateCSS($code, 'animate__flash');
|
||||
});
|
||||
$header.appendChild($copy);
|
||||
}
|
||||
|
@ -883,32 +883,32 @@ var Theme = /*#__PURE__*/function () {
|
|||
|
||||
_this12.util.forEach($headers, function ($header) {
|
||||
if (scroll > ACCURACY) {
|
||||
$header.classList.remove('fadeInDown');
|
||||
$header.classList.remove('animate__fadeInDown');
|
||||
|
||||
_this12.util.animateCSS($header, ['fadeOutUp', 'faster'], true);
|
||||
_this12.util.animateCSS($header, ['animate__fadeOutUp', 'animate__faster'], true);
|
||||
} else if (scroll < -ACCURACY) {
|
||||
$header.classList.remove('fadeOutUp');
|
||||
$header.classList.remove('animate__fadeOutUp');
|
||||
|
||||
_this12.util.animateCSS($header, ['fadeInDown', 'faster'], true);
|
||||
_this12.util.animateCSS($header, ['animate__fadeInDown', 'animate__faster'], true);
|
||||
}
|
||||
});
|
||||
|
||||
if (_this12.newScrollTop > MINIMUM) {
|
||||
if (isMobile && scroll > ACCURACY) {
|
||||
$fixedButtons.classList.remove('fadeIn');
|
||||
$fixedButtons.classList.remove('animate__fadeIn');
|
||||
|
||||
_this12.util.animateCSS($fixedButtons, ['fadeOut', 'faster'], true);
|
||||
_this12.util.animateCSS($fixedButtons, ['animate__fadeOut', 'animate__faster'], true);
|
||||
} else if (!isMobile || scroll < -ACCURACY) {
|
||||
$fixedButtons.style.display = 'block';
|
||||
$fixedButtons.classList.remove('fadeOut');
|
||||
$fixedButtons.classList.remove('animate__fadeOut');
|
||||
|
||||
_this12.util.animateCSS($fixedButtons, ['fadeIn', 'faster'], true);
|
||||
_this12.util.animateCSS($fixedButtons, ['animate__fadeIn', 'animate__faster'], true);
|
||||
}
|
||||
} else {
|
||||
if (!isMobile) {
|
||||
$fixedButtons.classList.remove('fadeIn');
|
||||
$fixedButtons.classList.remove('animate__fadeIn');
|
||||
|
||||
_this12.util.animateCSS($fixedButtons, ['fadeOut', 'faster'], true);
|
||||
_this12.util.animateCSS($fixedButtons, ['animate__fadeOut', 'animate__faster'], true);
|
||||
}
|
||||
|
||||
$fixedButtons.style.display = 'none';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
normalize.css@8.0.1 https://github.com/necolas/normalize.css
|
||||
fontawesome-free@6.1.1 https://fontawesome.com/
|
||||
simple-icons@6.20.0 https://github.com/simple-icons/simple-icons
|
||||
animate.css@3.7.2 https://github.com/daneden/animate.css
|
||||
animate.css@4.1.1 https://github.com/daneden/animate.css
|
||||
smooth-scroll@16.1.3 https://github.com/cferdinandi/smooth-scroll
|
||||
autocomplete.js@0.37.1 https://github.com/algolia/autocomplete.js
|
||||
lunr.js@2.3.8 https://lunrjs.com/
|
||||
|
|
14
assets/lib/animate/animate.min.css
vendored
Normal file → Executable file
14
assets/lib/animate/animate.min.css
vendored
Normal file → Executable file
File diff suppressed because one or more lines are too long
|
@ -5,7 +5,7 @@
|
|||
{{- define "content" -}}
|
||||
<div class="page archive">
|
||||
{{- /* Title */ -}}
|
||||
<h2 class="single-title animated pulse faster">
|
||||
<h2 class="single-title animate__animated animate__pulse animate__faster">
|
||||
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" -}}
|
||||
</h2>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{{- $params := .Scratch.Get "params" -}}
|
||||
<div class="page single special">
|
||||
{{- /* Title */ -}}
|
||||
<h1 class="single-title animated pulse faster">
|
||||
<h1 class="single-title animate__animated animate__pulse animate__faster">
|
||||
{{- .Title -}}
|
||||
</h1>
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<article class="page single">
|
||||
{{- /* Title */ -}}
|
||||
<h1 class="single-title animated flipInX">{{ .Title }}</h1>
|
||||
<h1 class="single-title animate__animated animate__flipInX">{{ .Title }}</h1>
|
||||
|
||||
{{- /* Subtitle */ -}}
|
||||
{{- with $params.subtitle -}}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{{- define "content" -}}
|
||||
<div class="page archive">
|
||||
{{- /* Title */ -}}
|
||||
<h2 class="single-title animated pulse faster">
|
||||
<h2 class="single-title animate__animated animate__pulse animate__faster">
|
||||
{{- $taxonomy := .Data.Singular -}}
|
||||
{{- if eq $taxonomy "category" -}}
|
||||
<i class="far fa-folder-open fa-fw" aria-hidden="true"></i> {{ .Title }}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<div class="page archive">
|
||||
{{- /* Title */ -}}
|
||||
<h2 class="single-title animated pulse faster">
|
||||
<h2 class="single-title animate__animated animate__pulse animate__faster">
|
||||
{{- .Params.Title | default (T $taxonomies) | default $taxonomies | dict "Some" | T "allSome" -}}
|
||||
</h2>
|
||||
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue