8000 Add option to hide navlinks on mobile by ThomasSingleton · Pull Request #204 · lorenzolewis/starlight-utils · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add option to hide navlinks on mobile #204

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 4 commits into
base: main
Choose a base branch
from

Conversation

ThomasSingleton
Copy link

This is a very crude, band-aid "fix" for #72.

Adds optional navLinksMobileDisplay config option.

Allows control over whether main navlinks are shown flex or hidden none on mobile breakpoints.

Defaults to flex, retaining the previous behavior where nav links were visible (sometimes, sort-of) on mobile.

Copy link
changeset-bot bot commented Apr 26, 2025

🦋 Changeset detected

Latest commit: 6158cea

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@lorenzo_lewis/starlight-utils Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@lorenzolewis
Copy link
Owner

Thank you for submitting this @ThomasSingleton I really appreciate it!

This is a good first draft but my concern with this implementation is that it doesn't really give the developer an option for if they DO want to have the nav links for their mobile users.

Perhaps instead of not rendering it at all we could instead nest it in the mobile navigation menu above the "sidebar" links (screenshot attached with some annotations to give an example). It could be a separate option completely for how the developer wants it rendered (if they want to keep it along the top for mobile, don't render anything at all, or instead render it inline like in the screenshot).

What do you think of that? Would that still achieve your use case and would that be something you'd be interested in implementing?
Screenshot 2025-04-27 at 12 01 47

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.

2 participants
0