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:
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