pref: aside toc toggle
This commit is contained in:
parent
8cb7861da3
commit
af4d3562e3
|
@ -59,6 +59,10 @@ $li-margin-bottom = 12px;
|
|||
display: none;
|
||||
}
|
||||
|
||||
&.page-aside-toggle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@ $header-progress-height = 3px;
|
|||
$page-aside-width = 248px;
|
||||
|
||||
.page-container {
|
||||
|
||||
transition();
|
||||
|
||||
position: relative;
|
||||
padding-top: $header-progress-height;
|
||||
|
||||
|
@ -12,8 +15,6 @@ $page-aside-width = 248px;
|
|||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
transition();
|
||||
|
||||
.page-header {
|
||||
.header-progress {
|
||||
display: none;
|
||||
|
@ -104,13 +105,7 @@ $page-aside-width = 248px;
|
|||
height: $header-shrink-height;
|
||||
}
|
||||
|
||||
.sidebar-tools {
|
||||
top: $header-shrink-height + $component-interspace !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -142,50 +137,10 @@ $page-aside-width = 248px;
|
|||
the-transition-ease-out();
|
||||
}
|
||||
|
||||
|
||||
.sidebar-tools {
|
||||
position: fixed;
|
||||
top: $header-height + $component-interspace;
|
||||
right: $component-interspace;
|
||||
transition();
|
||||
}
|
||||
|
||||
|
||||
/*.scroll-to-top {
|
||||
display: none;
|
||||
position: fixed;
|
||||
|
||||
if (hexo-config('back2top.position') == left) {
|
||||
left: ((100% - $main-content-width) / 4);
|
||||
} else {
|
||||
right: ((100% - $main-content-width) / 4);
|
||||
}
|
||||
bottom: $component-interspace;
|
||||
|
||||
li {
|
||||
cursor: pointer;
|
||||
width: $tool-button-width;
|
||||
height: $tool-button-width;
|
||||
border-radius: 5px;
|
||||
font-size: 1em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--background-color);
|
||||
|
||||
if (hexo-config('magic.enable') == true) {
|
||||
magic-style(1.1, 1.1);
|
||||
} else {
|
||||
border: 1px solid var(--third-text-color);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
transition();
|
||||
color: var(--background-color);
|
||||
background: var(--primary-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
window.addEventListener('DOMContentLoaded', () => {
|
||||
const navItems = document.querySelectorAll('.post-toc-wrap .post-toc li');
|
||||
navItems.length > 0 && window.utils.openToggle();
|
||||
const toggleDom = document.querySelector('.page-aside-toggle');
|
||||
|
||||
if (navItems.length) {
|
||||
toggleDom.style.display = 'flex';
|
||||
window.utils.openToggle();
|
||||
}
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue