Fix navigation bar responsiveness and active tab highlighting #8
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.
This PR fixes two critical issues with the navigation bar (Scrap Mechanic inventory styles):
Issues Fixed
1. Missing Active Tab Highlighting
The navigation tabs were not showing yellow highlighting for the current page. The CSS had the
.activeclass styles defined, but no JavaScript was applying this class dynamically.Before: No visual indication of current page
After: Current tab shows yellow background and border
2. Poor Mobile Responsiveness
On smaller screens, navigation tabs stacked awkwardly with inconsistent spacing, creating an unpleasant user experience.
Before: Tabs wrapped with poor spacing using
space-x-8 md:space-x-12After: Improved responsive design with consistent gaps and smaller padding on mobile
Changes Made
JavaScript Enhancement
DOMContentLoadedevent listener to detect current page path.activeclass to matching navigation links/docsfor/docs/getting-started)CSS Improvements
space-x-*classes with responsivegap-2 sm:gap-4 md:gap-8for better mobile layout0.5rem 1rem), larger on desktop (0.75rem 2rem)0.8rem→0.85rem→0.9remacross breakpointswhite-space: nowrapanddisplay: inline-blockto prevent text wrappingScreenshots
Desktop - Active tab highlighting working:

Mobile - Improved responsive layout:

Home page - Active state works across all pages:

Testing
/,/docs,/wiki, etc.)Fixes #7.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
telemetry.astro.buildnode /home/REDACTED/work/ReDoIngMods.github.io/ReDoIngMods.github.io/node_modules/.bin/astro build(dns block)node /home/REDACTED/work/ReDoIngMods.github.io/ReDoIngMods.github.io/node_modules/.bin/astro dev(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.