alex-shpak / hugo-book

Hugo documentation theme as simple as plain book
https://hugo-book-demo.netlify.app
MIT License
3.39k stars 1.17k forks source link

The table of contents in the Hugo book theme use to much space #635

Open jonasstein opened 2 months ago

jonasstein commented 2 months ago

Users reported, that the TOC of my website cuts the content off. By scaling the browser window, I can reproduce this: The burger menu appears too late and the TOC menu cuts the main window.

How can I fix this? Is there a useful parameter to set? Do I have to adjust the .css?

The website: https://trolug.de/de/docs/termine/ The source: https://github.com/TroLUG/trolug-hugo Formerly asked in https://discourse.gohugo.io/t/the-table-of-contents-in-the-hugo-book-theme-use-to-much-space/50802/1

alex-shpak commented 1 month ago

Hi! for that that specific page I would suggest to disable ToC in page params: bookToC = false alternatively you can adjust media queries here: https://github.com/alex-shpak/hugo-book/blob/master/assets/_variables.scss

using this value: https://github.com/alex-shpak/hugo-book/blob/master/assets/_defaults.scss#L23

stockphrase commented 1 month ago

Is this possibly related to this behavior on my site with the newest version of the theme?

When I minimize the window to make the hamburger appear, I see this odd behavior with clickable boxes: Screenshot from 2024-08-22 11-22-29

With a maximized window, the icon for the sight is jammed up tight to the top of the screen:

Screenshot from 2024-08-22 11-22-58

Perhaps I've done something here to cause this issue. But it looks fine with an older version of the theme. I'm not sure where to look to diagnose this, Alex.

alex-shpak commented 9 hours ago

Hi! These are checkboxes that are used to keep open/closed state of side menu, likely something is wrong with CSS styles