-
Notifications
You must be signed in to change notification settings - Fork 319
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
Design: shrink or hide the top navbar when not at top of the page? #43
Comments
In documentation pages, I believe the content is often "reusable", in the sense that you often move back up and down to check the documentation, without directly wanting to go to a different page. For this reason, I would vote against a scroll-up navigation bar (except maybe for mobile devices with really smaller screen size). By shrinking down the size of the header when not at the top of the page, there is no unwanted screen estate lost when scrolling up, while still saving space. |
FWIW, here's my code for handling the scrollbar in Jupyter Book: It's not too many lines - basically you just add an eventlistener for "scroll" and check if the new screen location has passed some delta. If so, add a class to the top navbar to hide it, and if not, do nothing. If the scroll is ever up then remove the "hidden" class. That said, I think a lot of folks prefer a static topbar /shrug |
@choldgraf do you have an example of where it is in action? |
@jorisvandenbossche shrink the page to a narrower width. Feedback I got was that on a laptop or desktop, having the navbar show/hide was a distraction, but that it would be useful if on a tablet or something. So for Jupyter Book the navbar hiding is dependent on the screen size |
In case somebody is interested: I have created an auto-hiding topbar in my Sphinx theme: https://insipid-sphinx-theme.readthedocs.io/ |
Is it still a wanted feature ? IMO As we are using the navbar to display the first level toctree I think this should be always visible to allow the user to jump from one page to another without being forced to scroll up. |
From @kvanderwijst at pandas-dev/pandas#28952 (comment)
Vertical screen estate is certainly important!
There are several options how to deal with the top navbar:
The text was updated successfully, but these errors were encountered: