mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-21 19:32:34 +00:00
Reorder sidebar animation
This commit is contained in:
parent
372940305c
commit
f7014d3f16
@ -118,8 +118,8 @@ NexT.motion.middleWares = {
|
||||
const sequence = [];
|
||||
const sidebar = document.querySelectorAll('.sidebar-inner');
|
||||
const sidebarTransition = CONFIG.motion.transition.sidebar;
|
||||
// Only for Pisces | Gemini.
|
||||
if (sidebarTransition && (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini')) {
|
||||
// Only for desktop of Pisces | Gemini.
|
||||
if (sidebarTransition && (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') && window.innerWidth >= 992) {
|
||||
sidebar.forEach(targets => {
|
||||
sequence.push({
|
||||
targets,
|
||||
|
||||
@ -65,8 +65,8 @@ NexT.boot.motion = function() {
|
||||
if (CONFIG.motion.enable) {
|
||||
NexT.motion.integrator
|
||||
.add(NexT.motion.middleWares.header)
|
||||
.add(NexT.motion.middleWares.postList)
|
||||
.add(NexT.motion.middleWares.sidebar)
|
||||
.add(NexT.motion.middleWares.postList)
|
||||
.add(NexT.motion.middleWares.footer)
|
||||
.bootstrap();
|
||||
}
|
||||
|
||||
@ -37,9 +37,9 @@ document.addEventListener('pjax:success', () => {
|
||||
NexT.motion.integrator
|
||||
.init()
|
||||
.add(NexT.motion.middleWares.subMenu)
|
||||
.add(NexT.motion.middleWares.postList)
|
||||
// Add sidebar-post-related transition.
|
||||
.add(NexT.motion.middleWares.sidebar)
|
||||
.add(NexT.motion.middleWares.postList)
|
||||
.bootstrap();
|
||||
}
|
||||
if (CONFIG.sidebar.display !== 'remove') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user