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

feat(theme): improve navbar alignment #2435

Merged
merged 3 commits into from Nov 22, 2022
Merged

feat(theme): improve navbar alignment #2435

merged 3 commits into from Nov 22, 2022

Conversation

yorunning
Copy link
Contributor

调整navbar对齐方式,确保navbar-center位于页面正中心。

before
before
after
after

@Mister-Hope
Copy link
Member

Mister-Hope commented Nov 21, 2022

Nice catch about the alignment, but I doubt this is a proper solution. Maybe you should try to edit the site title text length to see whether it still align well.

from your edits, you are making the center and right box becomes a horizontal flex one, but I don’t think this means the center is at the center.

So if you do think your fix is valid, please provide a hidden site title screenshots and a pretty lone one. Or you may reorganize the layout through options (e.g. reverse their sorting to see if it works well.)

@yorunning
Copy link
Contributor Author

yorunning commented Nov 21, 2022

please provide a hidden site title screenshots

before:
before

after:
after

and a pretty lone one.

before:
before

after:
after

Or you may reorganize the layout through options (e.g. reverse their sorting to see if it works well.)

尝试改变navbarLayout布局、删减项目、颠倒顺序显示都正常。但是标题过长(宽度超过页面1/3)并不能正真的居中,属于是极端情况。

before:
before

after:
after

@Mister-Hope
Copy link
Member

Mister-Hope commented Nov 21, 2022

Thanks for the detailed reply. Are the extra div really needed? I think it's possible to move styles into the original container.

So my concern is why is a extra div being added?

BTW this reply is not necessary, I will check it myself before merging if you are too busy to reply this.

@yorunning
Copy link
Contributor Author

So my concern is why is a extra div being added?

You are right. This is the simplest repair I know.

@Mister-Hope Mister-Hope enabled auto-merge (squash) November 22, 2022 06:28
@Mister-Hope Mister-Hope merged commit ab2e1d6 into vuepress-theme-hope:main Nov 22, 2022
@Mister-Hope
Copy link
Member

Thanks for contribution

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

Successfully merging this pull request may close these issues.

None yet

2 participants