8000 Made the project name collapse main menu when clicked by BillyTheSquid21 · Pull Request #58 · hdoc/hdoc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Made the project name collapse main menu when clicked #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BillyTheSquid21
Copy link
@BillyTheSquid21 BillyTheSquid21 commented Sep 3, 2024

The default generated documentation looks great on desktop, but the navigation bar covers the top of the page on mobile. Changed the project name and version element to close the navigation panel when clicked so can hide the navigation bar when on a mobile device.

Before example on desktop (hosted at https://docs.hdoc.io/billythesquid/WIMP/index.html):
image

After example on desktop (hosted at https://billythesquid21.github.io/wimp/):
image

Before example on mobile:
Screenshot_20240903_143709_Firefox Focus

After example (open) on mobile:
Screenshot_20240903_143719_Firefox Focus

After example (closed) on mobile:
Screenshot_20240903_143723_Firefox Focus

As can be seen, this barely changes the look of the pages, but stops the navigation bar for more pages from blocking the start of the body text. On the line auto details = CTML::Node("details").SetAttr("open", ""); in the code, the SetAttr open means the navigation panel is open by default, I added this to keep the feel almost identical to previously but this could be removed for a default closed look. These changes worked on firefox on Linux Mint 21, Windows 11 and android version 14 when I tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0