Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Title : Enhance Navbar
Issue No. : 511
Close #<511>
Changes Made
This pull request includes several enhancements to the Navbar component, aiming to improve the overall user experience and visual consistency. The key changes are as follows:
Positioning and Alignment:
Adjusted the position of "ShopNex" in the navbar for better alignment and visibility.
Hover Effect for Light Theme:
Modified the hover effect for menu items to a lighter color (#e1e1e1) for better contrast in light theme.
Theme Toggle Improvements:
Refined theme toggle logic and styling to ensure smooth transitions between dark and light modes.
General Layout and Spacing:
Improved the layout and spacing of navbar elements for a cleaner, more professional look.
These changes enhance the visual appeal and usability of the navbar, providing a more polished and professional user experience.
Attaching the Screenshots :
Code Snippets Highlighting Key Changes:
Navbar.jsx
`useEffect(() => {
if (theme === "dark") {
setIcon(cart_icon_dark);
document.getElementById("nav").classList.add("dark");
} else {
setIcon(cart_icon);
document.getElementById("nav").classList.remove("dark");
}
}, [theme]);
const toggleTheme = () => {
setTheme(theme === "dark" ? "light" : "dark");
};
// Position adjustment for "ShopNex"
ShopNex
` **Navbar.css**`/* Improved Navbar Layout */
.navbar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 32px;
box-shadow: 0 1px 3px -2px rgba(0, 0, 0, 0.2);
transition: background 0.3s ease;
}
/* Improved "ShopNex" Positioning /
.nav-title {
font-size: 24px;
font-weight: bold;
transition: color 0.3s ease;
margin-left: 8px; / Adjusted for better positioning */
}
/* Hover Effect for Light Theme /
.nav-item a:hover {
color: #e1e1e1; / Light color for hover effect */
}
/* Toggle Theme Button Refinements */
.toggle-theme {
width: 40px;
height: 40px;
border: none;
border-radius: 50%;
background: #515151;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
transition: background 0.3s ease;
}
`
Checklist