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

Support to manual configure the content max width for Gemini Scheme. #103

Merged
merged 7 commits into from
Feb 2, 2018

Conversation

tsanie
Copy link
Contributor

@tsanie tsanie commented Feb 1, 2018

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines.
  • Tests for the changes have been added (for bug fixes / features).
    • Muse | Mist have been tested.
    • Pisces | Gemini have been tested.
  • Docs have been added / updated (for bug fixes / features).

PR Type

What kind of change does this PR introduce?

  • Bugfix.
  • Feature.
  • Code style update (formatting, local variables).
  • Refactoring (no functional changes, no api changes).
  • Build related changes.
  • CI related changes.
  • Documentation content changes.
  • Other... Please describe:

What is the current behavior?

The content width is growing along with the screen width in the Gemini Scheme, some people want to give a max-width of it.

Issue Number(s): #102

What is the new behavior?

The user could set the content max-width by changing the settings in _config.yml, only available for Gemini Scheme and don't affect the other schemes.

  • Screens with this changes: N/A
  • Link to demo site with this changes: https://tsanie.us/ (with a max-width of 1000px)

How to use?

In NexT _config.yml:

# Manual define the max content width
# !!Only available for Gemini Scheme currently
# Leave it empty for the default 75% (suggest not less than 1000px)
max_content_width: 1000px # or 90% for more wide, etc.

Does this PR introduce a breaking change?

  • Yes.
  • No.

@@ -1,7 +1,15 @@
get_max_content_width() {
if (hexo-config('scheme') == 'Gemini') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If for Gemini only, need to add this in Gemini scheme file maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, maybe like the below?

@tsanie tsanie merged commit 0fb3a41 into theme-next:master Feb 2, 2018
@tsanie tsanie added this to the v6.0.4 milestone Feb 2, 2018
@tsanie tsanie deleted the support-gemini-max-width branch February 2, 2018 11:58
@ivan-nginx ivan-nginx mentioned this pull request Feb 2, 2018
72 tasks
tongluyang pushed a commit to tongluyang/hexo-theme-next that referenced this pull request Nov 19, 2019
Support to manual configure the content max width for Gemini Scheme.
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.

3 participants