diff options
author | amazingrise <8315221+AmazingRise@users.noreply.github.com> | 2020-01-19 19:31:36 +0300 |
---|---|---|
committer | amazingrise <8315221+AmazingRise@users.noreply.github.com> | 2020-01-19 19:31:36 +0300 |
commit | 37f5532c8a9ba37dccc18139165f1c5434975314 (patch) | |
tree | d70dbe6a643b4028d6ec08a6178b70c2614a1ec2 /static | |
parent | 864755871b10363a3cbe38d041e92be25a820084 (diff) |
Add scroll spy to ToC and some small adaption for mobile view.
Diffstat (limited to 'static')
-rw-r--r-- | static/js/journal.js | 4 |
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); |