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

Feature: Close sidebar when click any blank part (#606) #607

Merged
merged 3 commits into from
Feb 23, 2019
Merged

Feature: Close sidebar when click any blank part (#606) #607

merged 3 commits into from
Feb 23, 2019

Conversation

stevenjoezhang
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines.
  • Tests for the changes was maked (for bug fixes / features).
    • Muse | Mist have been tested.
    • Pisces | Gemini have been tested.
  • Docs in NexT website have been added / updated (for new 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?

Issue resolved #606

What is the new behavior?

Description about this pull, in several words...

  • Screens with this changes: N/A
  • Link to demo site with this changes: N/A

How to use?

In NexT _config.yml:

...

Does this PR introduce a breaking change?

  • Yes.
  • No.

Copy link
Member

@ivan-nginx ivan-nginx left a comment

Choose a reason for hiding this comment

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

  1. It seems only for Muse | Mist this feature can work. Or not?
  2. This must be an option, i think. Because some peoples want to open sidebar and continue reading.

@stevenjoezhang
Copy link
Contributor Author

Yes, only for Muse | Mist. And I think an extra option in _config.yml is not necessary. The new behavior is that:

  • On desktop platform, if the sidebar is opened, you can continue reading by scroll down the page; and you can close it by click any blank part
  • On mobile platform, it's the same as current behavior, sidebar-dimmer was first introduced in iissnan/hexo-theme-next@3a3b864

@ivan-nginx
Copy link
Member

  • On desktop platform, if the sidebar is opened, you can continue reading by scroll down the page; and you can close it by click any blank part

Some peoples like to read and allocate text. So, sidebar will also closed out and TOC will not have weight.

@stevenjoezhang
Copy link
Contributor Author

Ahh, that's right, I'll add an option to let users decide how the sidebar works

@stevenjoezhang stevenjoezhang merged commit f4b967e into theme-next:master Feb 23, 2019
@stevenjoezhang stevenjoezhang deleted the sidebar branch February 23, 2019 06:22
@ivan-nginx
Copy link
Member

Also, can u add docs in NexT website how to use this feature?

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.

Close sidebar when click any blank part
2 participants