aboutsummaryrefslogtreecommitdiff
path: root/app/components
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2023-10-07 00:01:57 -0400
committerAndrew Lee <alee14498@protonmail.com>2023-10-07 00:01:57 -0400
commit940ebb6c71bd39e87f5b565587406beabefddaad (patch)
treed45b7391e9a2bd83785eb3004cd14928017275d5 /app/components
parent95280d67a415b31d99ac7e0ebe35c8440847fd90 (diff)
downloadminepot-bnbmc-940ebb6c71bd39e87f5b565587406beabefddaad.tar.gz
minepot-bnbmc-940ebb6c71bd39e87f5b565587406beabefddaad.tar.bz2
minepot-bnbmc-940ebb6c71bd39e87f5b565587406beabefddaad.zip
Initial website
Diffstat (limited to 'app/components')
-rw-r--r--app/components/Navbar.js46
1 files changed, 46 insertions, 0 deletions
diff --git a/app/components/Navbar.js b/app/components/Navbar.js
new file mode 100644
index 0000000..52172fb
--- /dev/null
+++ b/app/components/Navbar.js
@@ -0,0 +1,46 @@
+"use client";
+import Image from "next/image";
+import Link from "next/link";
+import { useState } from "react";
+
+const Navbar = () => {
+ const [navbar, setNavbar] = useState(false);
+ return (
+ <nav className="border-gray-200">
+ <div className="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4">
+ <div className="flex items-center">
+ <Image src="/minepot-logo.svg" alt="MinePot" width={150} height={150}/>
+ </div>
+ <button data-collapse-toggle="navbar-default" type="button"
+ className="transition duration-150 ease-out hover:ease-in inline-flex items-center p-2 w-10 h-10 justify-center text-sm text-gray-500 rounded-lg md:hidden hover:bg-zinc-600 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600"
+ aria-controls="navbar-default" aria-expanded="false" onClick={() => setNavbar(!navbar)}>
+ <span className="sr-only">Open main menu</span>
+ <svg className="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none"
+ viewBox="0 0 17 14">
+ <path stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"
+ d="M1 1h15M1 7h15M1 13h15"/>
+ </svg>
+ </button>
+ <div className={`w-full md:block md:w-auto ${navbar ? 'block' : 'hidden' }`}>
+ <ul className="font-light text-lg flex flex-col p-4 md:p-0 mt-4 rounded-lg md:flex-row md:space-x-8 md:mt-0">
+ {[
+ ['Home', '/'],
+ ['Menu', '/menu'],
+ ['Locations', '/locations'],
+ ['Corporate', '/corporate'],
+ ['Review', '/review']
+ ].map(([title, url]) => (
+ <li key="links">
+ <Link href={url} className="transition duration-150 ease-out hover:ease-in block py-2 pl-3 pr-4 rounded md:border-0 md:p-0 text-white md:hover:text-blue-500 hover:bg-gray-700 hover:text-white md:hover:bg-transparent" onClick={() => setNavbar(!navbar)}>
+ {title}
+ </Link>
+ </li>
+ ))}
+ </ul>
+ </div>
+ </div>
+ </nav>
+ )
+}
+
+export default Navbar;