-
Notifications
You must be signed in to change notification settings - Fork 906
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
Forces sidebar search to hide on desktop but show on mobile, when enabled #297
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
This looks really helpful, I'll take a proper look at how you've implemented it before I comment/merge but it seems like it should really help our mobile users. |
Also should fix #211 |
Thanks!! |
I am using the Docsy theme on a project for work. Our goal was to have search enabled but only have 1 search box displayed at a time. This can be accomplished by hiding the sidebar search in
config.toml
, but this also hides it for mobile users. This creates a problem since the search box on the main menu at the top of the page is hidden on mobile.To fix this, I modified
assets/scss/_sidebar-tree.scss
andlayouts/partials/sidebar-tree.html
. The changes are trivial, but now the sidebar search box is hidden on desktop and shows on mobile - when it's enabled inconfig.toml
.There may be a better or more elegant way to do this so please feel free to implement it in whatever way makes sense for the project.
Thanks!