Skip to content

Commit 52710a5

Browse files
committed
Fix sidebar asymmetry in Pisces | Gemini schemes. Issue #1916.
1 parent eabf6f6 commit 52710a5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

source/js/src/utils.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -318,12 +318,15 @@ $(document).ready(function () {
318318
}, 0);
319319
});
320320

321-
// Initialize Sidebar & TOC Height.
322-
updateSidebarHeight(document.body.clientHeight - NexT.utils.getSidebarSchemePadding());
323-
324321
// Initialize Sidebar & TOC Width.
325322
var scrollbarWidth = NexT.utils.getScrollbarWidth();
326-
$('.site-overview, .post-toc').css('width', 'calc(100% + ' + scrollbarWidth + 'px)');
323+
if ($('.sidebar-panel').height() > (document.body.clientHeight - NexT.utils.getSidebarSchemePadding())) {
324+
$('.site-overview').css('width', 'calc(100% + ' + scrollbarWidth + 'px)');
325+
}
326+
$('.post-toc').css('width', 'calc(100% + ' + scrollbarWidth + 'px)');
327+
328+
// Initialize Sidebar & TOC Height.
329+
updateSidebarHeight(document.body.clientHeight - NexT.utils.getSidebarSchemePadding());
327330
}
328331

329332
function updateSidebarHeight (height) {

0 commit comments

Comments
 (0)