hexo-theme-next icon indicating copy to clipboard operation
hexo-theme-next copied to clipboard

Feature: display sidebar on mobile for Pisces and Gemini, fix issue #708

Open triccsr opened this issue 2 years ago • 4 comments

PR Checklist

  • [x] The commit message follows guidelines for NexT.
  • [x] The changes have been tested (for bug fixes / features).
  • [ ] Docs in NexT website have been added / updated (for features).

PR Type

  • [ ] Bugfix.
  • [x] Feature.
  • [ ] Improvement.
  • [ ] Code style update (formatting, linting).
  • [ ] Refactoring (no functional changes).
  • [ ] Documentation.
  • [ ] Translation.
  • [ ] Other... Please describe:

What is the current behavior?

Sidebar does not display on tablet or mobile for scheme Pisces and Gemini.

Issue resolved: #708

What is the new behavior?

new option on_mobile: Only for Pisces and Gemini. If enabled, a sidebar toggle button will appear on mobile website, just like the way that scheme Muse&Mist work.

new option button_reverse: For all schemes. If enabled, the position of back2top button and sidebar toggle button will be reversed (left to right, right to left).

  • Link to demo site with this changes: https://triccsr.github.io/ (on_mobile is enabled, but button_reverse is disabled)
  • Screenshots with this changes: image

How to use?

In NexT _config.yml:

sidebar:
  # Sidebar display on mobile, default value is false (only for Pisces | Gemini)
  on_mobile: true
  # Reverse position of sidebar toggle and back2top button (left to right, right to left), default value is false
  button_reverse: true

triccsr avatar Oct 19 '23 04:10 triccsr

Thanks so much for opening your first PR here!

welcome[bot] avatar Oct 19 '23 04:10 welcome[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 19 '23 04:10 CLAassistant

Pull Request Test Coverage Report for Build 8849477699

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.421%

Totals Coverage Status
Change from base Build 8716367640: 0.0%
Covered Lines: 395
Relevant Lines: 400

💛 - Coveralls

coveralls avatar Oct 19 '23 16:10 coveralls

Thanks for your contribution! I'm quite busy right now, I'll review & merge it later! 🚀

stevenjoezhang avatar Nov 01 '23 10:11 stevenjoezhang

Thank you for your patience. I will conduct the test & merge as soon as possible! This feature is very nice and important to the theme~

stevenjoezhang avatar Mar 04 '24 09:03 stevenjoezhang

Thank you for your patience. I will conduct the test & merge as soon as possible! This feature is very nice and important to the theme~

My pleasure!

triccsr avatar Mar 05 '24 12:03 triccsr

This pull request contains changes to the configuration file. Please make sure the documentation in NexT website is changed or added. Please edit relevant source files here: https://github.com/next-theme/theme-next-docs/tree/master/source/docs and create a pull request with the changes here: https://github.com/next-theme/theme-next-docs/pulls

github-actions[bot] avatar Apr 26 '24 14:04 github-actions[bot]

I have made some changes, and I think it is now ready to be merged. If there are any issues, please let me know.

stevenjoezhang avatar Apr 26 '24 14:04 stevenjoezhang

Congrats on merging your first pull request here! :tada: How awesome!

welcome[bot] avatar Apr 26 '24 14:04 welcome[bot]