feat: replace smooth scroll js with css scroll-behavior

This commit is contained in:
Dillon
2022-05-12 04:03:44 +08:00
parent 0960a266c7
commit 5e9c5f6417
14 changed files with 9 additions and 48 deletions

View File

@@ -636,15 +636,6 @@ class Theme {
}
}
initSmoothScroll() {
if (SmoothScroll) new SmoothScroll('[href^="#"]', {
speed: 300,
speedAsDuration: true,
header: '#header-desktop',
offset: 10,
});
}
initCookieconsent() {
if (this.config.cookieconsent) cookieconsent.initialise(this.config.cookieconsent);
}
@@ -728,7 +719,6 @@ class Theme {
this.initHighlight();
this.initTable();
this.initHeaderLink();
this.initSmoothScroll();
this.initMath();
this.initMermaid();
this.initEcharts();