Optimize sidebar-dimmer (#130)

This commit is contained in:
tusooa 2020-11-19 07:30:46 -05:00 committed by GitHub
parent 0530d8802e
commit 4581626dc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
display: none;
}
+mobile() {
+tablet-mobile() {
.sidebar-dimmer {
background: black;
display: block;

View File

@ -318,7 +318,7 @@ NexT.utils = {
updateSidebarPosition: function() {
NexT.utils.initSidebarDimension();
if (window.screen.width < 992 || CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') return;
if (window.innerWidth < 992 || CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') return;
// Expand sidebar on post detail page by default, when post has a toc.
const hasTOC = document.querySelector('.post-toc');
let display = CONFIG.page.sidebar;