Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zzossig/hugo-theme-zdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/head/scripts.html')
-rw-r--r--layouts/partials/head/scripts.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/layouts/partials/head/scripts.html b/layouts/partials/head/scripts.html
index c0b5389..bb8acf3 100644
--- a/layouts/partials/head/scripts.html
+++ b/layouts/partials/head/scripts.html
@@ -101,7 +101,15 @@
return null;
}
+ var parent = elem.parentNode;
+ while (parent.classList.contains('menu__list') && parent.classList.contains('active')) {
+ console.log('parent');
+ parent.style.maxHeight = 100 * parent.children.length + "px";
+ parent = parent.parentNode;
+ }
+
if (content.style.maxHeight) {
+ console.log('null');
content.style.maxHeight = null;
content.classList.remove('active');
menuTitleIcon.classList.add('right');
@@ -112,6 +120,7 @@
menuTitleIcon.classList.remove('down');
}
} else {
+ console.log('scrollHeight');
content.style.maxHeight = content.scrollHeight + "px";
content.classList.add('active');
menuTitleIcon.classList.remove('right');