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-03-22 18:39:15 +0300
committeramazingrise <8315221+AmazingRise@users.noreply.github.com>2020-03-22 18:39:15 +0300
commit3f4ee025012785f484a9eee1d0b4ebd43846e749 (patch)
treeb3fdcf4f1b794d048be81b76e2ade23c36b35361 /static
parentff8eff48a9f6aff289ff7ff493723013f95b404f (diff)
Add support for nested menu.
Diffstat (limited to 'static')
-rw-r--r--static/js/journal.js19
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