[docs] Add global table of contents #9614
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #9613.
This PR adds the Sphinx global TOC (site navigation) on the left side of the screen, moving the local TOC (table of contents for the current page) to the right. Of course, it also works on mobile.
This is a fairly low-effort implementation in that I tried to simply work around the CSS that was already there instead of making a lot of big changes. At a high level, I split the styles for
aside
into#local-toc
and#global-toc
, and since we now have multiple TOCs displayed, renamed#sidebar
to.toc
. There is also a bit of duplicate CSS with this since the two TOCs collapse at different breakpoints.There seems to be some amount of cruft with the workings of the templates/styles in general, and I'd be happy to do a little bit of a cleanup, or a bigger rework, depending on what's wanted. I also just need to make the global TOC look a little nicer. Regardless, I'm pushing these changes for now so people can have a look and give thoughts.
Preview: https://oliver.ni/dpy-docs-preview/
Checklist