Skip to content
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

[docs] Add global table of contents #9614

Draft
wants to merge 3 commits into
base: docs/guide
Choose a base branch
from

Conversation

oliver-ni
Copy link
Contributor

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

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

@oliver-ni oliver-ni changed the base branch from master to docs/guide October 18, 2023 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Create a (mobile friendly) double TOC layout
1 participant