Skip to content

Commit

Permalink
Optimize sidebar-dimmer (theme-next#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
tusooa authored Nov 19, 2020
1 parent 0530d88 commit 4581626
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/css/_common/outline/sidebar/sidebar-dimmer.styl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
display: none;
}

+mobile() {
+tablet-mobile() {
.sidebar-dimmer {
background: black;
display: block;
Expand Down
2 changes: 1 addition & 1 deletion source/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4581626

Please sign in to comment.