5
0
mirror of git://git.proxmox.com/git/pve-docs.git synced 2025-10-26 11:33:10 +03:00
Files
pve-docs/asciidoc
Thomas Lamprecht a461de5eba html/css: add toggle menu for TOC on narrow (mobile) screens
This hides the TOC by default on narrower screens (< 1000 px/dp) and
adds a simple toggle menu to make it pop out.

Most is handled purely through CSS, but to hide the menu when clicking
on links or when there is no TOC at all (e.g., for the index or FAQ)
we need a bit of JavaScript. There just monkey patch the asciidoc TOC
JS function to ensure we get called in the correct moment.

Further, add a modal-like "label" over the content if the TOC menu is
open, clicking on that will also close the TOC, again with pure CSS.

This also tries to improve styling and readability for mobile in
general, while I tested on many sizes, virtual devices in Firefox and
Chromiums developer mode, and also some actual smartphone, it
certainly will not yet be perfect everywhere, but it definitively
should be better than the status quo.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-31 03:06:10 +02:00
..