🔥 Feat: remove lib smooth-scroll (#1)

This commit is contained in:
Cell
2021-12-23 20:47:55 +08:00
parent 225c12f6eb
commit 36d38599c6
10 changed files with 10 additions and 20 deletions
+1
View File
@@ -5,6 +5,7 @@
- :bug: Fix: add scroll-margin to headerlink
- :arrow_up: Chore: update all third-party libraries
- :wrench: Chore(i18n): change some translations
- :fire: Feat: remove lib smooth-scroll (#1)
## v0.2.11
+7
View File
@@ -5,6 +5,13 @@ html {
font-size: $global-font-size;
line-height: $global-line-height;
width:100%;
scroll-behavior: auto;
}
@media screen and (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
}
/* scrollbar, only support webkit */
-2
View File
@@ -56,8 +56,6 @@ libFiles:
objectFitImagesJS: object-fit-images@3.2.4/dist/ofi.min.js
# sharer.js@0.4.2 https://github.com/ellisonleao/sharer.js
sharerJS: sharer.js@0.4.2/sharer.min.js
# smooth-scroll@16.1.3 https://github.com/cferdinandi/smooth-scroll
smoothScrollJS: smooth-scroll@16.1.3/dist/smooth-scroll.min.js
# twemoji@13.1.0 https://github.com/twitter/twemoji
twemojiJS: twemoji@13.0.0/dist/twemoji.min.js
# typeit@7.0.4 https://github.com/alexmacarthur/typeit
-4
View File
@@ -4,10 +4,6 @@ theme:
- Promise
- fetch
- Element.prototype.after
smooth-scroll:
- Element.prototype.closest
- requestAnimationFrame
- CustomEvent
algoliasearch:
- Promise
- Object.entries
+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
-1
View File
@@ -20,7 +20,6 @@ normalize.css@8.0.1 https://github.com/necolas/normalize.css
object-fit-images@3.2.4 https://github.com/fregante/object-fit-images
sharer.js@0.4.2 https://github.com/ellisonleao/sharer.js
simple-icons@5.21.1 https://github.com/simple-icons/simple-icons
smooth-scroll@16.1.3 https://github.com/cferdinandi/smooth-scroll
twemoji@13.1.0 https://github.com/twitter/twemoji
typeit@7.0.4 https://github.com/alexmacarthur/typeit
valine@1.4.16 https://github.com/xCss/Valine
File diff suppressed because one or more lines are too long
-4
View File
@@ -3,10 +3,6 @@
{{- $fingerprint := .Scratch.Get "fingerprint" -}}
{{- $config := (.Scratch.Get "this").config -}}
{{- /* Smooth Scroll */ -}}
{{- $source := $cdn.smoothScrollJS | default "lib/smooth-scroll/smooth-scroll.min.js" -}}
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- /* Search */ -}}
{{- if .Site.Params.search | and .Site.Params.search.enable -}}
{{- $search := .Site.Params.search -}}
-5
View File
@@ -622,10 +622,6 @@ class Theme {
}
}
initSmoothScroll() {
if (SmoothScroll) new SmoothScroll('[href^="#"]', { speed: 300, speedAsDuration: true, header: '#header-desktop' });
}
initCookieconsent() {
if (this.config.cookieconsent) cookieconsent.initialise(this.config.cookieconsent);
}
@@ -708,7 +704,6 @@ class Theme {
this.initHighlight();
this.initTable();
this.initHeaderLink();
this.initSmoothScroll();
this.initMath();
this.initMermaid();
this.initEcharts();