openownership / data-standard-sphinx-theme

Documentation theme for the Beneficial Ownership Data Standard.
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Better control of TOCs in sidebar & content #17

Closed kd-ods closed 6 years ago

kd-ods commented 6 years ago

I'd like to be able to control the TOC appearing in the sidebar without the TOC appearing within a markup page.

Using the 'hidden' option for the TOC directive hides it within the main page as expected -

.. toctree:: :hidden: :maxdepth: 1

credits.md governance.md

But it also hides the TOC contents from the sidebar. According to this Sphinx issue there is a way of pulling in those hidden items to the sidebar. (Calling toctree() with includehidden=True.)

Build this About page to see what I mean.

odscjames commented 6 years ago

So calling toctree() with includehidden=True is an easy change to make to the code and it looks like it does what you want, but there is a problem.

That side menu disappears on narrow screens (mobiles, etc) and there isn't currently a way to get it back. Which means that on mobiles, no-one could navigate to the sub-pages.

One normal UI pattern is a hamburger menu that opens the side menu, but we already have a hamburger menu that opens the top menu, and having 2 hamburger menus would be confusing. Having one hamburger that opened both menus wouldn't really work as I don't think there would be enough screen estate.

Hmm. To discuss ....

odscjames commented 6 years ago

Done after discussion with @kd-ods. However "about" page needs a bit more thought about navigation, and what sections should and shouldn't be there.