Proposal: page width control button
Feature Description
I would like to suggest a page width control button as an option in hugo.yaml, which allows users to toggle different page width in the navbar in whatever page they want.
Problem/Solution
-
#733
-
#852
Users report that some time they want to make full use of the screen space.
Alternatives Considered
Additional Context
We have implemented a similar feature in our site, I don't know if we should have this built-in as a hextra extension (if so, I would like to open a PR for this).
Preview link: https://width-control.hitsz-open-auto-github-io.pages.dev/docs/fresh-autumn/comp1011/
Initial implementation: https://github.com/HITSZ-OpenAuto/hoa-moe/pull/386
https://github.com/user-attachments/assets/a0bcd389-9414-4741-810e-f945e2dcf08c
P.S: as #778 has supported hide sidebar, maybe we can hide sidebar as well?
I think #852 might actually be a bug, since the max width gets overridden by the mobile view behavior.
As for the button idea, I’d like to give it some more thought, maybe something similar to the dark mode toggle could be a clean approach. In the meantime, adding an option to hide the sidebar sounds like some improvement we could tackle first.