v2.ocaml.org
v2.ocaml.org copied to clipboard
Fixed sidebar for all TOCs
Issue Description
For all the pages having a Table of Contents section, we can style it as a fixed sidebar for easy navigation and usability. The user wouldn't have to scroll up or down to explore other topics directly go to the desired sub-part.
Fixes #1363
Changes Made
I have done styling changes in the nav-secondary
class.
Before:
After:
- Please check if the PR fulfills these requirements
- [x] PR is descriptively titled and links the original issue above
- [x] Before/after screenshots (if this is a layout change)
- [x] Details of which platforms the change was tested on (if this is a browser-specific change)
- [x] Context for what motivated the change (if this is a change to some content)
This is definitely a good idea in principle, but there is a vertical overflow problem on a larger width. Would you be able to look into that?

Sure, I'll look into it and make the necessary changes.
Thanks @dldisha! Ping this issue when you push a fix, and I'll sync it back to the staging site with your changes after that.
@avsm probably now the overflow problem is resolved. Please review it :)
I'm afraid it's the same for me (see screenshot). If you do push a fix, I'd recommend also posting updated before/after screenshots to indicate how it looks for you.

I noticed that the overflow is happening because of different screen sizes.
https://user-images.githubusercontent.com/26017359/115300435-97851f80-a17d-11eb-8736-801690b414ee.mp4
@avsm can I use javascript to resolve this? The script will make sure that the floating sidebar has stopped when the endpoint has reached. I don't know if it will disturb the OMD or not.