Feature: display sidebar on mobile for Pisces and Gemini, fix issue #708
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:
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
Thanks so much for opening your first PR here!
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.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
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 | |
|---|---|
| Change from base Build 8716367640: | 0.0% |
| Covered Lines: | 395 |
| Relevant Lines: | 400 |
💛 - Coveralls
Thanks for your contribution! I'm quite busy right now, I'll review & merge it later! 🚀
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~
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!
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
I have made some changes, and I think it is now ready to be merged. If there are any issues, please let me know.
Congrats on merging your first pull request here! :tada: How awesome!