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
path: root/static
diff options
context:
space:
mode:
authoramazingrise <8315221+AmazingRise@users.noreply.github.com>2020-01-19 19:31:36 +0300
committeramazingrise <8315221+AmazingRise@users.noreply.github.com>2020-01-19 19:31:36 +0300
commit37f5532c8a9ba37dccc18139165f1c5434975314 (patch)
treed70dbe6a643b4028d6ec08a6178b70c2614a1ec2 /static
parent864755871b10363a3cbe38d041e92be25a820084 (diff)
Add scroll spy to ToC and some small adaption for mobile view.
Diffstat (limited to 'static')
-rw-r--r--static/js/journal.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/static/js/journal.js b/static/js/journal.js
index 50927c6..0848409 100644
--- a/static/js/journal.js
+++ b/static/js/journal.js
@@ -44,6 +44,10 @@ app = new Vue({
this.isDrawerOpen = !this.isDrawerOpen;
document.getElementsByTagName('html')[0].style.overflow = this.isDrawerOpen ? 'hidden' : 'unset';
},
+ closeDrawer() {
+ this.isDrawerOpen = false;
+ document.getElementsByTagName('html')[0].style.overflow = this.isDrawerOpen ? 'hidden' : 'unset';
+ },
},
created() {
window.addEventListener('scroll', this.handleScroll);