diff --git a/source/css/_schemes/Gemini/index.styl b/source/css/_schemes/Gemini/index.styl index 748d11c..7077ed7 100644 --- a/source/css/_schemes/Gemini/index.styl +++ b/source/css/_schemes/Gemini/index.styl @@ -25,7 +25,7 @@ // ================================================== // Post blocks. .main-inner { - .sub-menu, .post-block, .tabs-comment, :not(.tab-pane) > .comments, .pagination { + .sub-menu, .post-block, .tabs-comment, & > .comments, .comment-position .comments, .pagination { gemini-block(); } @@ -35,7 +35,7 @@ } } - .tabs-comment, :not(.tab-pane) > .comments, .pagination { + .tabs-comment, & > .comments, .comment-position .comments, .pagination { gemini-block-not-first(); } } diff --git a/source/js/third-party/comments/disqus.js b/source/js/third-party/comments/disqus.js index 381c26f..4d1ca9e 100644 --- a/source/js/third-party/comments/disqus.js +++ b/source/js/third-party/comments/disqus.js @@ -3,14 +3,14 @@ document.addEventListener('page:loaded', () => { if (CONFIG.disqus.count) { - const loadCount = () => { + if (window.DISQUSWIDGETS) { + window.DISQUSWIDGETS.getCount({ reset: true }); + } else { + // Defer loading until the whole page loading is completed NexT.utils.getScript(`https://${CONFIG.disqus.shortname}.disqus.com/count.js`, { - attributes: { id: 'dsq-count-scr' } + attributes: { id: 'dsq-count-scr', defer: true } }); - }; - - // defer loading until the whole page loading is completed - window.addEventListener('load', loadCount, false); + } } if (CONFIG.page.comments) {