-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor motion
& sidebar affix global fix.
#1829
Changes from all commits
5ccc451
613ec44
9438b61
8fdfa90
2083746
bf931dc
f7c3907
4334841
14846e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
.use-motion { | ||
.post { opacity: 0; } | ||
} | ||
|
||
.page-archive { | ||
|
||
.archive-page-counter { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -234,6 +234,10 @@ $(document).ready(function () { | |
o: {duration: 200} | ||
}); | ||
|
||
if (CONFIG.motion.async) { | ||
integrator.next(); | ||
} | ||
|
||
if (sequence.length > 0) { | ||
sequence[sequence.length - 1].o.complete = function () { | ||
integrator.next(); | ||
|
@@ -269,6 +273,11 @@ $(document).ready(function () { | |
}, | ||
|
||
menu: function (integrator) { | ||
|
||
if (CONFIG.motion.async) { | ||
integrator.next(); | ||
} | ||
|
||
$('.menu-item').velocity('transition.slideDownIn', { | ||
display: null, | ||
duration: 200, | ||
|
@@ -279,11 +288,23 @@ $(document).ready(function () { | |
}, | ||
|
||
postList: function (integrator) { | ||
var $post = $('.post'); | ||
var hasPost = $post.size() > 0; | ||
//var $post = $('.post'); | ||
var $postBlock = $('.post-block'); | ||
var $postBlockTransition = CONFIG.motion.transition.post_block; | ||
var $postHeader = $('.post-header'); | ||
var $postHeaderTransition = CONFIG.motion.transition.post_header; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Identifier 'post_header' is not in camel case. |
||
var $postBody = $('.post-body'); | ||
var $postBodyTransition = CONFIG.motion.transition.post_body; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Identifier 'post_body' is not in camel case. |
||
var $collHeader = $('.collection-title, .archive-year'); | ||
var $collHeaderTransition = CONFIG.motion.transition.coll_header; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Identifier 'coll_header' is not in camel case. |
||
var hasPost = $postBlock.size() > 0; | ||
|
||
hasPost ? postMotion() : integrator.next(); | ||
|
||
if (CONFIG.motion.async) { | ||
integrator.next(); | ||
} | ||
|
||
function postMotion () { | ||
var postMotionOptions = window.postMotionOptions || { | ||
stagger: 100, | ||
|
@@ -293,7 +314,19 @@ $(document).ready(function () { | |
integrator.next(); | ||
}; | ||
|
||
$post.velocity('transition.slideDownIn', postMotionOptions); | ||
//$post.velocity('transition.slideDownIn', postMotionOptions); | ||
if (CONFIG.motion.transition.post_block) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Identifier 'post_block' is not in camel case. |
||
$postBlock.velocity('transition.' + $postBlockTransition, postMotionOptions); | ||
} | ||
if (CONFIG.motion.transition.post_header) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Identifier 'post_header' is not in camel case. |
||
$postHeader.velocity('transition.' + $postHeaderTransition, postMotionOptions); | ||
} | ||
if (CONFIG.motion.transition.post_body) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Identifier 'post_body' is not in camel case. |
||
$postBody.velocity('transition.' + $postBodyTransition, postMotionOptions); | ||
} | ||
if (CONFIG.motion.transition.coll_header) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Identifier 'coll_header' is not in camel case. |
||
$collHeader.velocity('transition.' + $collHeaderTransition, postMotionOptions); | ||
} | ||
} | ||
}, | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identifier 'post_block' is not in camel case.