🔧 Chore(update-libs): update animate.css 3.7.2 -> 4.1.1 (#74)

This commit is contained in:
Cell
2022-03-06 19:25:24 +08:00
parent 14df985a2d
commit 3c45f9914d
13 changed files with 33 additions and 34 deletions
+3 -1
View File
@@ -28,7 +28,9 @@ All notable changes to this project will be documented in this file.
- :fire: Feat: remove shortcode cardlink ([#42](https://github.com/Lruihao/FixIt/issues/42))
- :lipstick: Style: add radius of the scrollbar
- :pencil2: Style: fix typo *discription* should be **description** ([#60](https://github.com/Lruihao/FixIt/issues/60))
- :wrench: Chore: update cell-watermark 1.0.3 and CDN support (fontFamily supported)
- :wrench: Chore(update-libs):
- Update cell-watermark 1.0.3 and CDN support (fontFamily supported)
- Update animate.css 3.7.2 -> 4.1.1 ([#74](https://github.com/Lruihao/FixIt/issues/74))
- :wrench: Chore: add atomic-algolia for exampleSite ([#70](https://github.com/Lruihao/FixIt/issues/70))
- **Full Changelog:** [`v0.2.12...v0.2.13`](https://github.com/Lruihao/FixIt/compare/v0.2.12...v0.2.13)
+1 -1
View File
@@ -55,7 +55,7 @@
padding-right: 1rem;
@include overflow-wrap(break-word);
box-sizing: border-box;
visibility: hidden; // TODO use animateCSS instead
visibility: hidden;
@include blur;
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+5 -9
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -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" -}}
&nbsp;<sup>{{- len .Pages -}}</sup>
</h2>
+1 -1
View File
@@ -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>
+1 -1
View File
@@ -4,7 +4,7 @@
{{- $params := .Scratch.Get "params" -}}
<div class="page single special friends">
{{- /* Title */ -}}
<h1 class="single-title animated pulse faster">
<h1 class="single-title animate__animated animate__pulse animate__faster">
{{- .Title -}}
</h1>
+1 -1
View File
@@ -4,7 +4,7 @@
{{- define "content" -}}
<div class="page" id="content-offline">
<h1 class="offline-title animated pulse faster">{{- T "offlineTitle" -}}</h1>
<h1 class="offline-title animate__animated animate__pulse animate__faster">{{- T "offlineTitle" -}}</h1>
<h2 class="offline-subtitle">
<i class="fa-stack fa-xs">
<i class="fas fa-wifi fa-stack-1x"></i>
+1 -1
View File
@@ -19,7 +19,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 -}}
+1 -1
View File
@@ -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"></i>&nbsp;{{ .Title }}
+1 -1
View File
@@ -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>
+15 -14
View File
@@ -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();
};
@@ -457,7 +457,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);
}
@@ -503,7 +503,8 @@ class Theme {
$tocContentAuto.appendChild($tocCore);
}
const $toc = document.getElementById('toc-auto');
$toc.style.visibility = 'visible'; // TODO use animateCSS instead
$toc.style.visibility = 'visible';
this.util.animateCSS($toc, ['animate__fadeIn', 'animate__faster'], true);
$toc.style.marginTop = document.querySelector('.single-title').clientHeight + document.querySelector('.post-meta').clientHeight + 'px';
$toc.style.marginBottom = document.getElementById('post-footer').clientHeight + 'px';
const $tocLinkElements = $tocCore.querySelectorAll('a:first-child');
@@ -881,27 +882,27 @@ 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);
}
});
// whether to show b2t button
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';
}