Skip to content
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

Added icons on the navbar #62

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 25 additions & 22 deletions src/components/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,31 @@ const Navbar = () => {

return (
<nav className="z-50 h-16 flex justify-center sticky top-0 w-screen backdrop-filter backdrop-blur-lg bg-opacity-40 p-4">
<div className="flex items-center">
<button onClick={toggleMenu} className="hover:underline block md:hidden">
<span className={`fa ${isOpen ? 'fa-times' : 'fa-bars'}`}></span>
</button>
<ul className={`flex flex-col md:flex-row justify-center items-center list-none m-0 p-4 gap-x-0 md:gap-x-10 text-sm md:text-base lg:text-lg xl:text-xl 2xl:text-3xl ${isOpen ? 'block' : 'hidden'} md:flex`}>
<li className="hover:underline" onClick={closeMenu}>
<NavLink to="/" className={isActive('/')}>Home</NavLink>
</li>
<li className="hover:underline" onClick={closeMenu}>
<NavLink to="/AboutUs" className={isActive('/AboutUs')}>About Us</NavLink>
</li>
<li className="hover:underline" onClick={closeMenu}>
<NavLink to="/DemoSection" className={isActive('/DemoSection')}>Demo Section</NavLink>
</li>
<li className="hover:underline" onClick={closeMenu}>
<NavLink to="/Models" className={isActive('/Models')}>Models</NavLink>
</li>
<li className="hover:underline" onClick={closeMenu}>
<NavLink to="/ContactUs" className={isActive('/ContactUs')}>Contact Us</NavLink>
</li>
</ul>
</div>

<style>
@import url('https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css');
</style>
<ul className="flex flex-col md:flex-row justify-center items-center list-none m-0 p-4 gap-x-0 md:gap-x-10 text-sm md:text-base lg:text-lg xl:text-xl 2xl:text-3xl">
<li className="hover:underline block md:hidden">
<span className="fa fa-bars"></span>
</li>
<li className="hover:underline hidden md:block">
<NavLink to="/" className={isActive('/')}><i class="ri-home-fill"></i> Home</NavLink>
</li>
<li className="hover:underline hidden md:block">
<NavLink to="/AboutUs" className={isActive('/AboutUs')}><i class="ri-building-fill"></i> About Us</NavLink>
</li>
<li className="hover:underline hidden md:block">
<NavLink to="/DemoSection" className={isActive('/DemoSection')}><i class="ri-service-fill"></i> Demo Section</NavLink>
</li>
<li className="hover:underline hidden md:block">
<NavLink to="/Models" className={isActive('/Models')}><i class="ri-layout-2-fill"></i> Models</NavLink>
</li>
<li className="hover:underline hidden md:block">
<NavLink to="/ContactUs" className={isActive('/ContactUs')}><i class="ri-customer-service-2-fill"></i> Contact Us</NavLink>
</li>
</ul>

</nav>
);
};
Expand Down