Skip to content
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

The positions of full-image pics seemed to be shifted #1911

Closed
3 tasks done
jcf94 opened this issue Sep 29, 2017 · 8 comments
Closed
3 tasks done

The positions of full-image pics seemed to be shifted #1911

jcf94 opened this issue Sep 29, 2017 · 8 comments

Comments

@jcf94
Copy link

jcf94 commented Sep 29, 2017

I agree and want to create new issue


Expected behavior

full-image style pics align centered in the page

Actual behavior

full-image style pics shift from the center

Steps to reproduce the behavior

  1. Add <img src="xxxx" class="full-image"/> above the <!--more--> tag
  2. Pics are shifted in the index as well as in the post page
  3. But the full-image pic in my about page present to be right
  • Link to demo site with this issue: http://jcf94.com/
  • Link(s) to source code or any usefull link(s): N/A

NexT Information

NexT Version:

[x] Latest Master branch.
[] Latest Release version.
[] Old version - 

NexT Scheme:

[] All schemes
[] Muse
[] Mist
[] Pisces
[x] Gemini

Other Information

This error shows in the latest Chrome & Edge Browser.

The shifted pic:

The right pic in my about page:

Maybe this error is caused by the position of fancybox? I just notice that the right pic in my about page is actually a js div, and the shifted pic in my index page and post page is inside a fancybox.

@ivan-nginx
Copy link
Collaborator

Please, try to follow next steps:

  1. Backup your source of themes/next directory.
  2. Switch to latest release version (see Download latest master branch. section in main readme).
  3. Try to catch same error by refreshing browser with CTRL + SHIFT + R.

@jcf94
Copy link
Author

jcf94 commented Oct 7, 2017

I've done these steps & my blog is using the latest master branch now.
Chrome did not catch any error.

See this pic:
http://7xnyi3.dl1.z0.glb.clouddn.com/error3.png

The left side of a "full-image" styled picture is aligned the same as a normal picture. That's why the "full-image" pic seemed not to be in the center.

@ivan-nginx ivan-nginx added the Bug label Oct 7, 2017
@jcf94
Copy link
Author

jcf94 commented Oct 24, 2017

Hi, I guess I find out where the problem is.

See this:
http://7xnyi3.dl1.z0.glb.clouddn.com/error4.png
And this:
http://7xnyi3.dl1.z0.glb.clouddn.com/error5.png

It's caused by the margin of the posts-expand.
The last line of \themes\next\source\css\_common\components\post\post-expand.styl:

.posts-expand .post-body .fancybox img { margin: 0 auto 25px; }

I annotate the margin: 0 auto 25px; and it seems the picture's position is right.

But I don't know whether this will impact on other style of themes, you'd better have some check.

@ivan-nginx
Copy link
Collaborator

ivan-nginx commented Oct 24, 2017

I agree what this must be fixed, but i think need to fix full-image totally. Originally, it was like on your right (last) screen, +125% width and centered. On other schemes as i remember this looks same. A main feature of this was do full-image style like «convert» style. Like this picture scrolled-in whole post. I think need to do it like this or do it simple, wrapped in post like simple image (but mb on all width).

@ivan-nginx
Copy link
Collaborator

I think best live demo of image «convert» style on Jekyll docs site. See on red and yellow info tips: they like convert out of main content wrap.

@geekrainy
Copy link
Contributor

Fixed #2043

@ivan-nginx
Copy link
Collaborator

Merged.
If solved, close it please.

@jcf94
Copy link
Author

jcf94 commented Jan 2, 2018

Closed, and I'm going to try your 6.0 version.

@jcf94 jcf94 closed this as completed Jan 2, 2018
ivan-nginx added a commit to theme-next/hexo-theme-next that referenced this issue Jan 20, 2018
In fact many users not like this increasing style, especially on Pisces/Gemini schemes it looks ugly.

So, for now i just comment this to produce smooth braking changes for users who use this feature (they can add this styles in their custom styles). And some time later it will be removed totally.

Issues: #52.
Possible relevant issues: iissnan/hexo-theme-next#1911
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants