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

Modify Navbar #362

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
14 changes: 7 additions & 7 deletions site/components/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const NavBar = () => {

return (
<>
<nav className="bg-white border-gray-200 dark:bg-gray-900">
<nav className="bg-white border-gray-200 dark:bg-gray-900 sticky top-0 z-50">
<div className="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4">
<Link href="/" className="flex items-center">
<img src="/images/favicon.ico" className="h-8 mr-3" alt="Company Logo" />
Expand All @@ -37,24 +37,24 @@ const NavBar = () => {
<div className={`${mobileMenuOpen ? "" : "hidden"} w-full md:block md:w-auto focus:outline-none`} id="navbar-default">
<ul className="font-medium flex flex-col p-4 md:p-0 mt-4 border border-gray-100 rounded-lg bg-gray-50 md:flex-row md:space-x-8 md:mt-0 md:border-0 md:bg-white dark:bg-gray-800 md:dark:bg-gray-900 dark:border-gray-700">
<li>
<Link href="/" className={`w-[70px] justify-center text-center rounded-full hover:text-pink-400 hover:bg-green-400 block py-2 pl-3 pr-4 ${currentRoute === '/' ? 'text-red-500' : 'text-green-500 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700 transition-all transform hover:scale-105 hover:shadow-2xl duration-300 ease-in-out cursor-default'}`}>Home</Link>
<Link href="/" className={`justify-center text-center rounded-full hover:text-pink-400 hover:bg-green-400 block py-2 pl-3 pr-4 ${currentRoute === '/' ? 'text-white' : 'text-green-500 hover:bg-gray-100 dark:text-white dark:hover:bg-green-400 transition-all transform hover:scale-105 hover:shadow-2xl duration-300 ease-in-out cursor-default'}`}>Home</Link>
</li>
<li>
<Link href="/apply" className={`block py-2 w-[70px] justify-center text-center rounded-full hover:text-pink-400 hover:bg-green-400 pl-3 pr-4 ${currentRoute === '/apply' ? 'text-red-500 bg-blue-700 md:bg-transparent dark:text-blue-500' : 'text-gray-900 transition-all transform hover:scale-105 hover:shadow-2xl duration-300 ease-in-out text-green-500 cursor-default dark:text-white'}`}>Apply</Link>
<Link href="/apply" className={`block py-2 justify-center text-center rounded-full hover:text-pink-400 hover:bg-green-400 pl-3 pr-4 ${currentRoute === '/apply' ? 'text-red-500 bg-blue-700 md:bg-transparent dark:text-blue-500' : 'text-gray-900 transition-all transform hover:scale-105 hover:shadow-2xl duration-300 ease-in-out text-green-500 cursor-default dark:text-white'}`}>Apply</Link>
</li>
<li>
<Link href="/apply" className={`block py-2 w-fit justify-center text-center rounded-full hover:text-pink-400 hover:bg-green-400 pl-3 pr-4 ${currentRoute === '/apply' ? 'text-red-500 bg-blue-700 md:bg-transparent dark:text-blue-500' : 'text-gray-900 transition-all transform hover:scale-105 hover:shadow-2xl duration-300 ease-in-out text-green-500 cursor-default dark:text-white'}`}>Contributors</Link>
<Link href="/apply" className={`block py-2 justify-center text-center rounded-full hover:text-pink-400 hover:bg-green-400 pl-3 pr-4 ${currentRoute === '/apply' ? 'text-red-500 bg-blue-700 md:bg-transparent dark:text-blue-500' : 'text-gray-900 transition-all transform hover:scale-105 hover:shadow-2xl duration-300 ease-in-out text-green-500 cursor-default dark:text-white'}`}>Contributors</Link>
</li>
<li>
<Link href="/login" className={`block py-2 pl-3 pr-4 w-[70px] justify-center text-center rounded-full hover:text-pink-400 hover:bg-green-400 ${currentRoute === '/login' ? 'text-red-500 bg-blue-700 md:bg-transparent dark:text-blue-500' : 'text-gray-900 transition-all transform hover:scale-105 hover:shadow-2xl duration-300 ease-in-out cursor-default text-green-500'}`}>Login</Link>
<Link href="/login" className={`block py-2 pl-3 pr-4 justify-center text-center rounded-full hover:text-pink-400 hover:bg-green-400 ${currentRoute === '/login' ? 'text-red-500 bg-blue-700 md:bg-transparent dark:text-blue-500' : 'text-gray-900 transition-all transform hover:scale-105 hover:shadow-2xl duration-300 ease-in-out cursor-default text-white'}`}>Login</Link>
</li>
{isLoggedIn && (
<li>
<Link href="/dashboard" className={`block py-2 pl-3 pr-4 rounded md:p-0 ${currentRoute === '/dashboard' ? 'text-blue-700 bg-blue-700 md:bg-transparent dark:text-blue-500' : 'text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700'}`}>Dashboard</Link>
<Link href="/dashboard" className={`block py-2 pl-3 pr-4 justify-center text-center rounded-full hover:text-pink-400 hover:bg-green-400 ${currentRoute === '/dashboard' ? 'text-red-500 md:bg-transparent dark:text-blue-500' : 'w-full transition-all transform hover:scale-105 hover:shadow-2xl duration-300 ease-in-out cursor-default justify-center text-center rounded-full hover:text-pink-400 hover:bg-green-400 text-white'}`}>Dashboard</Link>
</li>
)}
<li>
<Link href="/contact" className={`block py-2 pl-3 pr-4 ${currentRoute === '/contact' ? 'text-red-500 md:bg-transparent dark:text-blue-500' : 'w-full transition-all transform hover:scale-105 hover:shadow-2xl duration-300 ease-in-out cursor-default justify-center text-center rounded-full hover:text-pink-400 hover:bg-green-400 text-green-500'}`}>Contact Us</Link>
<Link href="/contact" className={`block py-2 pl-3 pr-4 justify-center text-center rounded-full hover:text-pink-400 hover:bg-green-400 ${currentRoute === '/contact' ? 'text-red-500 md:bg-transparent dark:text-blue-500' : 'w-full transition-all transform hover:scale-105 hover:shadow-2xl duration-300 ease-in-out cursor-default justify-center text-center rounded-full hover:text-pink-400 hover:bg-green-400 text-white'}`}>Contact Us</Link>
</li>
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion site/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
html,
body {
max-width: 100vw;
overflow-x: hidden;
/* overflow-x: hidden; */
font-family: Montserrat, Verdana, Geneva, Tahoma, sans-serif;
}

Expand Down