hugo-book
hugo-book copied to clipboard
[Feature] Add a button to hide/expand the page toc
Add a button to hide/expand the page toc on the right.
Hi! Can you please give example for use-case? It is collapsible for mobile users, but I don't see much reason to collapse it for desktop.
On a screen like the 13-inch MacBookPro, because of the menu on the left and the toc on the right, the content in the middle are too narrow. If we can click to hide the toc on the right, the middle content can be wider.
@alex-shpak Like @ikingye says, please add buttons for collapsing the left sidebar and the TOC sidebar on the right on desktop as well. On small 13 and 14 inch screen laptops, the body of the text is a bit narrow for me. Here's an example of how it messes up my table. The row elements wrap which look weird. Obviously, this problem goes away on larger screens with better resolution.
Another reason that I can think of for doing this is enhancing the immersive experience while reading an article, somewhat similar to zen mode in popular text editors. This happens naturally on mobile but doesn't happen on desktop. Most of the time a user spends on a page will be on the body of the article rather than on the sidebar content.
Hi! Will see, right now I don't have a good place for such buttons to nicely put it into layout. I plan some rework of left-top part including moving languadge switch there, so maybe after that change, but can't promise.
I would love a button like this. My site, https://millmint.net, uses Hugo Book as a platform for storytelling. A toggle for menu and toc for better readability would be fantastic.
This would be nice on my sites as tables often do not fit which require me to disable the table of contents.
+1