-
Notifications
You must be signed in to change notification settings - Fork 156
navbar repetition fix #187
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,7 +57,7 @@ const Navbar = () => { | |
| > | ||
| <div className="flex items-center gap-3"> | ||
| <button | ||
| className="md:hidden text-white" | ||
| className="min-[1115px]:hidden text-white" | ||
| onClick={() => setIsOpen(!isOpen)} | ||
| aria-label="Toggle navigation menu" | ||
| aria-expanded={isOpen} | ||
|
|
@@ -76,7 +76,9 @@ const Navbar = () => { | |
| <span>Opensox AI</span> | ||
| </div> | ||
| </div> | ||
| <div className="hidden md:flex items-center gap-5 tracking-tight text-lg font-light text-text-tertiary"> | ||
| <div | ||
| className="hidden min-[1115px]:flex items-center gap-5 max-[1270px]:gap-4 max-[1173px]:gap-3 tracking-tight text-lg max-[1270px]:text-base max-[1173px]:text-sm font-light max-[1173px]:font-normal text-[#d1d1d1]" | ||
| > | ||
| {links.map((link, index) => { | ||
| const isActive = pathname === link.href; | ||
| return ( | ||
|
|
@@ -98,7 +100,7 @@ const Navbar = () => { | |
| href="https://github.com/apsinghdev/opensox" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="hidden lg:flex items-center gap-2 px-4 py-2.5 bg-[#0d1117] hover:bg-[#161b22] transition-colors rounded-lg border border-[#30363d] text-white" | ||
| className="hidden min-[1115px]:flex items-center gap-2 px-4 py-2.5 bg-[#0d1117] hover:bg-[#161b22] transition-colors rounded-lg border border-[#30363d] text-white" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace hardcoded GitHub colors with design tokens. Multiple hardcoded hex values ( If these colors need to match GitHub's branding, define them in your design token system (e.g., in // in design-tokens.ts
github: {
bg: '#0d1117',
bgHover: '#161b22',
border: '#30363d'
}Then update the component: <Link
href="https://github.com/apsinghdev/opensox"
target="_blank"
rel="noopener noreferrer"
- className="hidden min-[1115px]:flex items-center gap-2 px-4 py-2.5 bg-[#0d1117] hover:bg-[#161b22] transition-colors rounded-lg border border-[#30363d] text-white"
+ className="hidden min-[1115px]:flex items-center gap-2 px-4 py-2.5 bg-github-bg hover:bg-github-bgHover transition-colors rounded-lg border border-github-border text-white"
>Note: The same issue exists on line 137 in the mobile menu version of this button. As per coding guidelines, always reference colors from the design token system using Tailwind classes. 🤖 Prompt for AI Agents |
||
| > | ||
| <Github className="w-5 h-5" /> | ||
| <span className="text-sm font-medium">Contribute</span> | ||
|
|
@@ -115,7 +117,7 @@ const Navbar = () => { | |
| initial={{ opacity: 0, y: -10 }} | ||
| animate={{ opacity: 1, y: 0 }} | ||
| transition={{ duration: 0.25 }} | ||
| className="absolute top-full mt-2 left-0 w-full bg-neutral-900/90 backdrop-blur-xl border border-white/10 md:hidden flex flex-col items-center py-5 space-y-4 z-50 rounded-3xl" | ||
| className="absolute top-full mt-2 left-0 w-full bg-neutral-900/90 backdrop-blur-xl border border-white/10 min-[1115px]:hidden flex flex-col items-center py-5 space-y-4 z-50 rounded-3xl" | ||
| > | ||
| {links.map((link, index) => ( | ||
| <Link | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace hardcoded hex color with design token.
The
text-[#d1d1d1]uses a hardcoded hex value, which violates the coding guideline: "Never use hardcoded hex values directly in components; always reference colors from the design token system using Tailwind classes."Apply this diff to use a semantic color from the design token system:
Note: Replace
text-text-secondarywith the appropriate semantic color name from your design token system (e.g.,text-neutral-300or similar).As per coding guidelines, always use semantic color names from the design token system.
📝 Committable suggestion
🤖 Prompt for AI Agents