Skip to content

Commit 4e77d47

Browse files
gabalafouivanov
authored andcommitted
Fix "More" links in mobile sidebar (pydata#1604)
Fix pydata#1603
1 parent a960b9e commit 4e77d47

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,16 @@ if (hasVersionsJSON && (hasSwitcherMenu || wantsWarningBanner)) {
562562
}
563563
}
564564

565+
/**
566+
* Fix bug #1603
567+
*/
568+
function fixMoreLinksInMobileSidebar() {
569+
const dropdown = document.querySelector(
570+
".bd-sidebar-primary [id^=pst-nav-more-links]"
571+
);
572+
dropdown.classList.add("show");
573+
}
574+
565575
/*******************************************************************************
566576
* Call functions after document loading.
567577
*/
@@ -571,3 +581,4 @@ documentReady(scrollToActive);
571581
documentReady(addTOCInteractivity);
572582
documentReady(setupSearchButtons);
573583
documentReady(initRTDObserver);
584+
documentReady(fixMoreLinksInMobileSidebar);

0 commit comments

Comments
 (0)