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 sequence = [];
|
||||||
const sidebar = document.querySelectorAll('.sidebar-inner');
|
const sidebar = document.querySelectorAll('.sidebar-inner');
|
||||||
const sidebarTransition = CONFIG.motion.transition.sidebar;
|
const sidebarTransition = CONFIG.motion.transition.sidebar;
|
||||||
// Only for Pisces | Gemini.
|
// Only for desktop of Pisces | Gemini.
|
||||||
if (sidebarTransition && (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini')) {
|
if (sidebarTransition && (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') && window.innerWidth >= 992) {
|
||||||
sidebar.forEach(targets => {
|
sidebar.forEach(targets => {
|
||||||
sequence.push({
|
sequence.push({
|
||||||
targets,
|
targets,
|
||||||
|
|||||||
@ -65,8 +65,8 @@ NexT.boot.motion = function() {
|
|||||||
if (CONFIG.motion.enable) {
|
if (CONFIG.motion.enable) {
|
||||||
NexT.motion.integrator
|
NexT.motion.integrator
|
||||||
.add(NexT.motion.middleWares.header)
|
.add(NexT.motion.middleWares.header)
|
||||||
.add(NexT.motion.middleWares.postList)
|
|
||||||
.add(NexT.motion.middleWares.sidebar)
|
.add(NexT.motion.middleWares.sidebar)
|
||||||
|
.add(NexT.motion.middleWares.postList)
|
||||||
.add(NexT.motion.middleWares.footer)
|
.add(NexT.motion.middleWares.footer)
|
||||||
.bootstrap();
|
.bootstrap();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,9 +37,9 @@ document.addEventListener('pjax:success', () => {
|
|||||||
NexT.motion.integrator
|
NexT.motion.integrator
|
||||||
.init()
|
.init()
|
||||||
.add(NexT.motion.middleWares.subMenu)
|
.add(NexT.motion.middleWares.subMenu)
|
||||||
.add(NexT.motion.middleWares.postList)
|
|
||||||
// Add sidebar-post-related transition.
|
// Add sidebar-post-related transition.
|
||||||
.add(NexT.motion.middleWares.sidebar)
|
.add(NexT.motion.middleWares.sidebar)
|
||||||
|
.add(NexT.motion.middleWares.postList)
|
||||||
.bootstrap();
|
.bootstrap();
|
||||||
}
|
}
|
||||||
if (CONFIG.sidebar.display !== 'remove') {
|
if (CONFIG.sidebar.display !== 'remove') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user