diff options
author | amazingrise <8315221+AmazingRise@users.noreply.github.com> | 2020-03-22 18:39:15 +0300 |
---|---|---|
committer | amazingrise <8315221+AmazingRise@users.noreply.github.com> | 2020-03-22 18:39:15 +0300 |
commit | 3f4ee025012785f484a9eee1d0b4ebd43846e749 (patch) | |
tree | b3fdcf4f1b794d048be81b76e2ade23c36b35361 /static | |
parent | ff8eff48a9f6aff289ff7ff493723013f95b404f (diff) |
Add support for nested menu.
Diffstat (limited to 'static')
-rw-r--r-- | static/js/journal.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/static/js/journal.js b/static/js/journal.js index 0848409..eaa68d2 100644 --- a/static/js/journal.js +++ b/static/js/journal.js @@ -71,4 +71,21 @@ app = new Vue({ } }); -new SmoothScroll('a#globalBackToTop');
\ No newline at end of file +new SmoothScroll('a#globalBackToTop'); + +Vue.component('parent',{ + props:['name','type'], + data: function () { + return { + isHidden: true + } + }, + template: ` + <div class="a-block" :class="type" v-on:click="isHidden = !isHidden"> + {{ name }} + <div class="nav-link-subitem" v-if="!isHidden"> + <slot></slot> + </div> + </div> + ` +});
\ No newline at end of file |