LuxDL / DocumenterVitepress.jl

Documentation with Documenter.jl and VitePress
https://luxdl.github.io/DocumenterVitepress.jl/
MIT License
64 stars 9 forks source link

Top navigation bar #61

Open LilithHafner opened 4 months ago

LilithHafner commented 4 months ago

[^1]: Screenshot from 2024-03-04 11-25-59

[^2]: Screenshot from 2024-03-04 11-26-51

I propose that

If the screen is wide enough to fit a navigation bar on the left, then put it there, include in that menu bar the search (at the top, below the logo) and dark/light mode switch and source code link (at the bottom), and do not display the current top navigation bar.

If the screen is too narrow to fit the navigation bar beside the primary content, then hide that menu with the existing "menu" button and keep the navigation bar that is only visible at the top present, but with neither a navigation bar nor secondary menu button (i.e. only package name and search)

This would remove one UI scale branch point, reduce redundancy and increase uniformity, increase screen-space for primary content, and eliminate horizontal scrolling. The only case where it would increase the number of clicks required to get to any element in any UI scale is the very particular case of accessing a toplevel page header when the screen width is wide enough to accommodate a top navigation bar to too narrow to accommodate a side navigation bar, a case that, at least for Chairmarks, currently includes horizontal scrolling.


(aside: it's lovely to get this working and have nice search, site stability, and UI!)

asinghvi17 commented 4 months ago

I'll have to look into this a bit more, since I'm not 100% sure how to do this in Vitepress. Still, one option may be https://github.com/vuejs/vitepress/issues/1227 - just placing it here for my reference in the future.