Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/AmazingRise/hugo-theme-diary.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramazingrise <8315221+AmazingRise@users.noreply.github.com>2021-05-14 11:28:12 +0300
committeramazingrise <8315221+AmazingRise@users.noreply.github.com>2021-05-14 11:28:12 +0300
commita7921db8468668c981d89e1f5ea8991e94e67187 (patch)
treea3c7e3c72e8ba78fa049e9a8fc8891dc0d49dd00
parent755df67fc2aae5d27691cce9b572d704afa8b3a3 (diff)
Fix navClick.
-rw-r--r--layouts/partials/journal.html2
-rw-r--r--static/js/toc-collapse.js3
2 files changed, 4 insertions, 1 deletions
diff --git a/layouts/partials/journal.html b/layouts/partials/journal.html
index 83b8041..32d917b 100644
--- a/layouts/partials/journal.html
+++ b/layouts/partials/journal.html
@@ -279,7 +279,7 @@ app = new Vue({
{{ if and (not (.Params.disableToC) ) (.IsPage) }}
spy();
- window.addEventListener('wheel', this.debounce(spy, 250, { 'maxWait': 1000 }), false);
+ window.addEventListener('scroll', this.debounce(spy, 250, { 'maxWait': 250 }), false);
{{ end }}
},
diff --git a/static/js/toc-collapse.js b/static/js/toc-collapse.js
index e215a97..d9ffe1e 100644
--- a/static/js/toc-collapse.js
+++ b/static/js/toc-collapse.js
@@ -31,6 +31,9 @@ var spy = function () {
collapseOthers(currentIndex);
}
+var onNavClick = function () {
+ spy()
+}
var collapseOthers = function (currentIndex) {
if (currentIndex == -1) {