ankitskvmdam / clean-jsdoc-theme

A beautifully crafted theme / template for JSDoc 3. https://ankdev.me/clean-jsdoc-theme/v4
https://www.npmjs.com/package/clean-jsdoc-theme
MIT License
168 stars 41 forks source link

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

Open egad13 opened 1 year ago

egad13 commented 1 year ago

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[bot] commented 1 year ago

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

ankitskvmdam commented 1 year ago

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.