Skip to content

Commit

Permalink
Reorder sidebar animation
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed May 1, 2024
1 parent 3729403 commit f7014d3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions source/js/motion.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion source/js/next-boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion source/js/pjax.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit f7014d3

Please sign in to comment.