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

Feature: Option to put current page's table of contents in sidebar/mobile menu #231

Open
egad13 opened this issue Aug 8, 2023 · 2 comments

Comments

@egad13
Copy link

egad13 commented Aug 8, 2023

Is your feature request related to a problem? Please describe.

Navigating any one page of docs with this theme on mobile, or on desktop with a window not wide enough for the widest layout to apply, can be tedious because the table of contents becomes completely inaccessible.

The search function is absolutely excellent, but for navigation within a page, it isn't very useful. Especially if you aren't very familiar with the code base already.

--

Describe the solution you'd like

I'd love to see a theme option that allows you to put the table of contents in the appropriate section of the sidebar/mobile menu all the time. Or, alternatively, to move it between it's default location, the sidebar, and the mobile menu according to the current layout. I think this would really improve the experience of using docs with this theme.

--

Describe alternatives you've considered

I've managed to tack this functionality onto one of my existing projects with custom css and js files. But it would be very convenient if it was a theme option.

--

Additional context

Relevant commit from one of my current projects that shows the custom css/js that produced the following screenshots. (Not a live demo; that's on a development branch)

Screenshots of the behaviour I'm looking for:

Thin Desktop Layout Mobile Layout
@github-actions
Copy link

github-actions bot commented Aug 8, 2023

Wonderful, you have created your first issue for clean-jsdoc-theme. Someone will talk to you soon!

@ankitskvmdam
Copy link
Owner

I have received a few more requests for this feature.

It would be wonderful If you could create a PR for this feature, else I will try to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants