aboutsummaryrefslogtreecommitdiff
path: root/docs/_static/sidebar.js
diff options
context:
space:
mode:
authorNihaal Sangha <[email protected]>2020-09-01 20:24:03 +0100
committerRapptz <[email protected]>2020-12-18 21:18:58 -0500
commit0559d77e5a733f34f8802bf553e28f34bdf4c8b5 (patch)
tree3d2d35e84c952f4ee703e860819aecaded037a32 /docs/_static/sidebar.js
parentThicken admonition borders a little (diff)
downloaddiscord.py-0559d77e5a733f34f8802bf553e28f34bdf4c8b5.tar.xz
discord.py-0559d77e5a733f34f8802bf553e28f34bdf4c8b5.zip
Add sidebar animation when collapsing
Diffstat (limited to 'docs/_static/sidebar.js')
-rw-r--r--docs/_static/sidebar.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/docs/_static/sidebar.js b/docs/_static/sidebar.js
index c44518f5..d9291a26 100644
--- a/docs/_static/sidebar.js
+++ b/docs/_static/sidebar.js
@@ -64,19 +64,17 @@ class Sidebar {
collapseSection(icon) {
icon.classList.remove('expanded');
icon.classList.add('collapsed');
- icon.innerText = 'chevron_right';
let children = icon.nextElementSibling.nextElementSibling;
// <arrow><heading>
// --> <square><children>
- children.style.display = "none";
+ setTimeout(() => children.style.display = "none", 75)
}
expandSection(icon) {
icon.classList.remove('collapse');
icon.classList.add('expanded');
- icon.innerText = 'expand_more';
let children = icon.nextElementSibling.nextElementSibling;
- children.style.display = "block";
+ setTimeout(() => children.style.display = "block", 75)
}
setActiveLink(section) {
@@ -127,4 +125,3 @@ document.addEventListener('DOMContentLoaded', () => {
sidebar.resize();
});
});
-