Implement inline horizontal scroll navigation for mobile viewports#56
Merged
Sparkier merged 2 commits intoJul 16, 2026
Conversation
Contributor
Author
|
[CI/CD Fix Attempt 1] Fixed the CI |
Sparkier
deleted the
jules/inline-horizontal-scroll-nav-js0-f89d345d-dc04-4991-a91b-940af546fd1d
branch
July 16, 2026 08:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
On screens narrower than
640px, the global navigation links were previously hidden, trapping mobile visitors on their entry pages unless they manually edited subpage URLs. This layout gap created friction, limited content discovery, and negatively impacted mobile bounce rates.To resolve this without introducing the overhead of complex state engines, mobile hamburger menus, or JavaScript resize listeners, we have introduced a persistent, swipeable horizontal menu directly beneath the logo for mobile viewports.
Key Decisions & Rationale
Navigation.svelteto leverage Svelte 5's#snippetsyntax. This allows us to declare the navigation links once and reuse them in both desktop and mobile views, preventing link maintenance drift and ensuring that active link styling remains perfectly consistent.-mx-6 px-6) are used to let the scrollable area bleed beautifully to the edge of the screen.style="margin-top: 80px;"inline style to dynamic Tailwind margin classes (mt-[110px] sm:mt-[80px]).Detailed Changes
1. Navigation Refactoring (
Navigation.svelte)#snippet links()containing all navigation links (Home,Papers,Projects,Writing,CV) with their active styling triggers.sm:hidden) horizontal scroll row below the brand logo.48pxto preserve critical vertical screen real estate.2. Layout Integration (
+layout.svelte)mt-[110px] sm:mt-[80px].