mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
🔥 Feat: remove lib smooth-scroll (#1)
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
- :bug: Fix: add scroll-margin to headerlink
|
- :bug: Fix: add scroll-margin to headerlink
|
||||||
- :arrow_up: Chore: update all third-party libraries
|
- :arrow_up: Chore: update all third-party libraries
|
||||||
- :wrench: Chore(i18n): change some translations
|
- :wrench: Chore(i18n): change some translations
|
||||||
|
- :fire: Feat: remove lib smooth-scroll (#1)
|
||||||
|
|
||||||
## v0.2.11
|
## v0.2.11
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,13 @@ html {
|
|||||||
font-size: $global-font-size;
|
font-size: $global-font-size;
|
||||||
line-height: $global-line-height;
|
line-height: $global-line-height;
|
||||||
width:100%;
|
width:100%;
|
||||||
|
scroll-behavior: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (prefers-reduced-motion: reduce) {
|
||||||
|
html {
|
||||||
|
scroll-behavior: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* scrollbar, only support webkit */
|
/* scrollbar, only support webkit */
|
||||||
|
|||||||
@@ -56,8 +56,6 @@ libFiles:
|
|||||||
objectFitImagesJS: object-fit-images@3.2.4/dist/ofi.min.js
|
objectFitImagesJS: object-fit-images@3.2.4/dist/ofi.min.js
|
||||||
# sharer.js@0.4.2 https://github.com/ellisonleao/sharer.js
|
# sharer.js@0.4.2 https://github.com/ellisonleao/sharer.js
|
||||||
sharerJS: sharer.js@0.4.2/sharer.min.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
|
# twemoji@13.1.0 https://github.com/twitter/twemoji
|
||||||
twemojiJS: twemoji@13.0.0/dist/twemoji.min.js
|
twemojiJS: twemoji@13.0.0/dist/twemoji.min.js
|
||||||
# typeit@7.0.4 https://github.com/alexmacarthur/typeit
|
# typeit@7.0.4 https://github.com/alexmacarthur/typeit
|
||||||
|
|||||||
@@ -4,10 +4,6 @@ theme:
|
|||||||
- Promise
|
- Promise
|
||||||
- fetch
|
- fetch
|
||||||
- Element.prototype.after
|
- Element.prototype.after
|
||||||
smooth-scroll:
|
|
||||||
- Element.prototype.closest
|
|
||||||
- requestAnimationFrame
|
|
||||||
- CustomEvent
|
|
||||||
algoliasearch:
|
algoliasearch:
|
||||||
- Promise
|
- Promise
|
||||||
- Object.entries
|
- Object.entries
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -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
|
object-fit-images@3.2.4 https://github.com/fregante/object-fit-images
|
||||||
sharer.js@0.4.2 https://github.com/ellisonleao/sharer.js
|
sharer.js@0.4.2 https://github.com/ellisonleao/sharer.js
|
||||||
simple-icons@5.21.1 https://github.com/simple-icons/simple-icons
|
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
|
twemoji@13.1.0 https://github.com/twitter/twemoji
|
||||||
typeit@7.0.4 https://github.com/alexmacarthur/typeit
|
typeit@7.0.4 https://github.com/alexmacarthur/typeit
|
||||||
valine@1.4.16 https://github.com/xCss/Valine
|
valine@1.4.16 https://github.com/xCss/Valine
|
||||||
File diff suppressed because one or more lines are too long
@@ -3,10 +3,6 @@
|
|||||||
{{- $fingerprint := .Scratch.Get "fingerprint" -}}
|
{{- $fingerprint := .Scratch.Get "fingerprint" -}}
|
||||||
{{- $config := (.Scratch.Get "this").config -}}
|
{{- $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 */ -}}
|
{{- /* Search */ -}}
|
||||||
{{- if .Site.Params.search | and .Site.Params.search.enable -}}
|
{{- if .Site.Params.search | and .Site.Params.search.enable -}}
|
||||||
{{- $search := .Site.Params.search -}}
|
{{- $search := .Site.Params.search -}}
|
||||||
|
|||||||
@@ -622,10 +622,6 @@ class Theme {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
initSmoothScroll() {
|
|
||||||
if (SmoothScroll) new SmoothScroll('[href^="#"]', { speed: 300, speedAsDuration: true, header: '#header-desktop' });
|
|
||||||
}
|
|
||||||
|
|
||||||
initCookieconsent() {
|
initCookieconsent() {
|
||||||
if (this.config.cookieconsent) cookieconsent.initialise(this.config.cookieconsent);
|
if (this.config.cookieconsent) cookieconsent.initialise(this.config.cookieconsent);
|
||||||
}
|
}
|
||||||
@@ -708,7 +704,6 @@ class Theme {
|
|||||||
this.initHighlight();
|
this.initHighlight();
|
||||||
this.initTable();
|
this.initTable();
|
||||||
this.initHeaderLink();
|
this.initHeaderLink();
|
||||||
this.initSmoothScroll();
|
|
||||||
this.initMath();
|
this.initMath();
|
||||||
this.initMermaid();
|
this.initMermaid();
|
||||||
this.initEcharts();
|
this.initEcharts();
|
||||||
|
|||||||
Reference in New Issue
Block a user