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

fix: fix the subtitle and site-nav-toggle are overlapping on the mobile case #1501

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jacksgong
Copy link
Contributor

fix the subtitle and site-nav-toggle are overlapping on the mobile case:

Problem

screen shot 2017-03-13 at 1 56 42 am

Fixes

screen shot 2017-03-13 at 1 56 27 am

@ivan-nginx
Copy link
Collaborator

ivan-nginx commented Mar 12, 2017

@Jacksgong and on other resolutions how it will look?

@Jacksgong
Copy link
Contributor Author

Because of the subtitle is horizontal-center, so if the subtitle is short you will can't reproduce such problem, but if the subtitle is a little long you can reproduce such problem on the mobile case very easy.

@Jacksgong
Copy link
Contributor Author

Jacksgong commented Mar 12, 2017

I have fixed such problem on my blog.

@ivan-nginx
Copy link
Collaborator

Tested it. 35% from the top - it's not right for alignment. site-nav-toggle on other resolutions will in other vertical alignment from main header label.
But, yes, need to fix this bug by another way.

@ivan-nginx
Copy link
Collaborator

@Jacksgong see, i have 4 screens in different resolutions:

image
image
image
image
Need to fix this bug, but not by this metod.

@Jacksgong
Copy link
Contributor Author

Jacksgong commented Mar 12, 2017

@ivan-nginx I think this way is good enough to fix most resolution cases on the mobile, If you care about all cases there is no solution because tons of problem will occur, such as:

image

@Jacksgong
Copy link
Contributor Author

Jacksgong commented Mar 12, 2017

@ivan-nginx And I think you are misunderstanding with this solution.

This solution just effect for mobile case, what is if the browser width less than or equal to 767px

mobile() {
  @media (max-width: 767px) {
    {block}
  }
}

So the problem of below is another problem, not on the mobile case:

.

@ivan-nginx
Copy link
Collaborator

@Jacksgong upper your screen - it's not right resolution on any mobile devices. =)
Need to test it on special services, like http://www.responsinator.com/
Yep. Problem with subtitle.

@Jacksgong
Copy link
Contributor Author

Jacksgong commented Mar 12, 2017

@ivan-nginx it has been tested on my phone, and you can test it on chrome development tools with any resolution you want easily. Also thanks for the test website you provided.

image

@iissnan
Copy link
Owner

iissnan commented Mar 13, 2017

This might be the quick fix based on current implementation of mobile menu toggle, and I think it is acceptable for now.

Another solution is to use a flex or fluid layout to separate the header section into 3 pieces:

  • Menu toggle
  • Title and description
  • Resolved area (for search for example)

This should be the better one. What do you think? @Jacksgong @ivan-nginx

@ivan-nginx
Copy link
Collaborator

ivan-nginx commented Mar 13, 2017

flex

That's right.
Menu (if is mobile) + Tilte & Desc — into flex.

See, i was made flex style on social fb & vk like buttons there: https://github.com/iissnan/hexo-theme-next/pull/1381/files#diff-a27b6018d8564ec7bbd5895a07822ec6R46
And this is right alignment on any devices and resolutions, with any one or both buttons. Need to do like this, i think.

@Jacksgong
Copy link
Contributor Author

Thanks, you are right, flex or fluid layout would be better choise.

@stevenjoezhang
Copy link
Contributor

Fixed in theme-next/hexo-theme-next#1387 using flex layout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants