mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-20 19:02:33 +00:00
Optimize sidebar-dimmer (#130)
This commit is contained in:
parent
0530d8802e
commit
4581626dc3
@ -2,7 +2,7 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
+mobile() {
|
+tablet-mobile() {
|
||||||
.sidebar-dimmer {
|
.sidebar-dimmer {
|
||||||
background: black;
|
background: black;
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
@ -318,7 +318,7 @@ NexT.utils = {
|
|||||||
|
|
||||||
updateSidebarPosition: function() {
|
updateSidebarPosition: function() {
|
||||||
NexT.utils.initSidebarDimension();
|
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.
|
// Expand sidebar on post detail page by default, when post has a toc.
|
||||||
const hasTOC = document.querySelector('.post-toc');
|
const hasTOC = document.querySelector('.post-toc');
|
||||||
let display = CONFIG.page.sidebar;
|
let display = CONFIG.page.sidebar;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user