Skip to content

Commit dd69e07

Browse files
authored
Merge pull request iissnan#1988 from geekrainy/issue/1923
Fix issue iissnan#1923.
2 parents f143038 + 6d02a72 commit dd69e07

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

source/css/_common/components/sidebar/sidebar-toc.styl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
.post-toc .nav-item {
3434
overflow: hidden;
3535
text-overflow: ellipsis;
36+
text-align: justify;
3637
white-space: nowrap if !hexo-config('toc.wrap');
3738
line-height: 1.8;
3839
}

source/js/src/utils.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,12 @@ $(document).ready(function () {
320320

321321
// Initialize Sidebar & TOC Width.
322322
var scrollbarWidth = NexT.utils.getScrollbarWidth();
323-
if ($('.sidebar-panel').height() > (document.body.clientHeight - NexT.utils.getSidebarSchemePadding())) {
323+
if ($('.site-overview-wrap').height() > (document.body.clientHeight - NexT.utils.getSidebarSchemePadding())) {
324324
$('.site-overview').css('width', 'calc(100% + ' + scrollbarWidth + 'px)');
325325
}
326-
$('.post-toc').css('width', 'calc(100% + ' + scrollbarWidth + 'px)');
326+
if ($('.post-toc-wrap').height() > (document.body.clientHeight - NexT.utils.getSidebarSchemePadding())) {
327+
$('.post-toc').css('width', 'calc(100% + ' + scrollbarWidth + 'px)');
328+
}
327329

328330
// Initialize Sidebar & TOC Height.
329331
updateSidebarHeight(document.body.clientHeight - NexT.utils.getSidebarSchemePadding());

0 commit comments

Comments
 (0)