-
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
Conversation
Update from original.
1. Remove `use_motion` condition [block script extra]. 2. Remove `post-details.swig` [block script extra] (for sidebar affix global fix). 3. Remove `motion-element` from swig because was added to external js (disable motion state fix). 4. Add `seo` condition on archive header.
1. Refactor motion effect option. 2. Global fix sidebar affix on all posts and pages [block script_extra].
if (CONFIG.motion.transition.post_body) { | ||
$postBody.velocity('transition.' + $postBodyTransition, postMotionOptions); | ||
} | ||
if (CONFIG.motion.transition.coll_header) { |
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 'coll_header' is not in camel case.
if (CONFIG.motion.transition.post_header) { | ||
$postHeader.velocity('transition.' + $postHeaderTransition, postMotionOptions); | ||
} | ||
if (CONFIG.motion.transition.post_body) { |
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_body' is not in camel case.
if (CONFIG.motion.transition.post_block) { | ||
$postBlock.velocity('transition.' + $postBlockTransition, postMotionOptions); | ||
} | ||
if (CONFIG.motion.transition.post_header) { |
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_header' is not in camel case.
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Identifier 'post_block' is not in camel case.
var $postBody = $('.post-body'); | ||
var $postBodyTransition = CONFIG.motion.transition.post_body; | ||
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Identifier 'coll_header' is not in camel case.
var $postHeader = $('.post-header'); | ||
var $postHeaderTransition = CONFIG.motion.transition.post_header; | ||
var $postBody = $('.post-body'); | ||
var $postBodyTransition = CONFIG.motion.transition.post_body; |
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_body' is not in camel case.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Identifier 'post_header' is not in camel case.
var hasPost = $post.size() > 0; | ||
//var $post = $('.post'); | ||
var $postBlock = $('.post-block'); | ||
var $postBlockTransition = CONFIG.motion.transition.post_block; |
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.
As affix & sidebar autoopenning for now use in global , need to remove `post-details.swig` from post and any other pages instead of `_layout.swig`.
* source.master: (1260 commits) [skip ci] Update PULL_REQUEST_TEMPLATE.md Update PULL_REQUEST_TEMPLATE.md Fix font-size only for mobile MOD: caution for Safari bug in `font` settings. Fix to iissnan#1881. Update pagination.styl Remove line-height declaration FIX: to iissnan#1829 global affix fix. Fix Mist font-size for Posts on mobile Update PULL_REQUEST_TEMPLATE.md Improve font configurations for global and headings Revert "FIX: Better way to adjust footer position in Pisces." Fix caption position Add Italian translation Fix fancybox style Uncomment `archives` after new option `override`. Update _config.yml Fix HoundCI issues Allow the user to override the whole configuration ... # Conflicts: # _config.yml
As affix & sidebar autoopenning for now use in global , need to remove `post-details.swig` from post and any other pages instead of `_layout.swig`.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
motion
option have more options:use_motion
tomotion
in main NexT config.async
loading. That's mean effects on logo, menu, post will load in same time iftrue
; iffalse
— this items will load after each other.In NexT
_config.yml
:P.S. U can comment any of 4 elements if u don't want to use effects on they.
E.g. comment
post_block: fadeIn
— will not add motion effects to blocks on all posts.Does this PR introduce a breaking change?