|
| 1 | +import { Fragment } from 'react'; |
| 2 | +import { Popover, Transition } from '@headlessui/react'; |
| 3 | +import { Bars3Icon, XMarkIcon } from '@heroicons/react/24/outline'; |
| 4 | +import { ChevronRightIcon } from '@heroicons/react/20/solid'; |
| 5 | +import { SiGithubsponsors } from 'react-icons/si'; |
| 6 | +const navigation = [ |
| 7 | + { name: 'Blog', href: '/blog' }, |
| 8 | + { name: 'Projects', href: '/projects' }, |
| 9 | + { name: 'Community Partners', href: '/partners' }, |
| 10 | + { name: 'WebX Team', href: '/team' }, |
| 11 | +]; |
| 12 | + |
1 | 13 | const Navbar = () => { |
2 | 14 | return ( |
3 | | - <header className="bg-cover bg-white bg-opacity-10 min-h-16 h-16 text-white"> |
4 | | - <div className="justify-center items-center flex h-full"> |
5 | | - WebXDAO Navbar |
| 15 | + // <header className="bg-cover bg-white bg-opacity-10 min-h-16 h-16 text-white"> |
| 16 | + // <div className="justify-center items-center flex h-full"> |
| 17 | + // WebXDAO Navbar |
| 18 | + // </div> |
| 19 | + // {/* <div className=" flex h-full"> |
| 20 | + // <div className="flex justify-between items-center"> |
| 21 | + // <div className="bg-red-500">1</div> |
| 22 | + // <div className="bg-lime-500">2</div> |
| 23 | + // <div className="bg-sky-500">3</div> |
| 24 | + // </div> |
| 25 | + // </div> */} |
| 26 | + // </header> |
| 27 | + <Popover as="header" className="relative"> |
| 28 | + <div className="bg-transparent pt-6"> |
| 29 | + {/* NAVIGATION BAR */} |
| 30 | + <nav |
| 31 | + className="relative mx-auto flex max-w-7xl items-center justify-between px-4 sm:px-6" |
| 32 | + aria-label="Global" |
| 33 | + > |
| 34 | + <div className="flex flex-1 items-center"> |
| 35 | + <div className="flex w-full items-center justify-between md:w-auto"> |
| 36 | + <a href="#"> |
| 37 | + <span className="sr-only">WebX DAO</span> |
| 38 | + <img |
| 39 | + className="h-8 w-auto sm:h-10" |
| 40 | + src="/images/logo/webxdao_logo.png" |
| 41 | + alt="" |
| 42 | + /> |
| 43 | + </a> |
| 44 | + <div className="-mr-2 flex items-center md:hidden"> |
| 45 | + <Popover.Button className="focus-ring-inset inline-flex items-center justify-center rounded-md bg-transparent p-2 text-gray-400 hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-white"> |
| 46 | + <span className="sr-only">Open main menu</span> |
| 47 | + <Bars3Icon className="h-6 w-6" aria-hidden="true" /> |
| 48 | + </Popover.Button> |
| 49 | + </div> |
| 50 | + </div> |
| 51 | + {/* Add content here to get menu next to icon */} |
| 52 | + </div> |
| 53 | + <div className="hidden md:flex md:items-center md:space-x-6"> |
| 54 | + <div className="hidden space-x-8 md:ml-10 md:flex"> |
| 55 | + {navigation.map((item) => ( |
| 56 | + <a |
| 57 | + key={item.name} |
| 58 | + href={item.href} |
| 59 | + className="text-base font-medium text-white hover:text-gray-300" |
| 60 | + > |
| 61 | + {item.name} |
| 62 | + </a> |
| 63 | + ))} |
| 64 | + </div> |
| 65 | + |
| 66 | + <a |
| 67 | + href="#" |
| 68 | + className="inline-flex items-center rounded-md border border-transparent bg-gray-100 px-4 py-2 text-base font-medium text-gray-600 hover:text-white/80 hover:bg-gray-700" |
| 69 | + > |
| 70 | + GitHub |
| 71 | + <SiGithubsponsors |
| 72 | + className="ml-3 h-5 w-5 text-pink-600" |
| 73 | + aria-hidden="true" |
| 74 | + /> |
| 75 | + </a> |
| 76 | + </div> |
| 77 | + </nav> |
6 | 78 | </div> |
7 | | - </header> |
| 79 | + |
| 80 | + <Transition |
| 81 | + as={Fragment} |
| 82 | + enter="duration-150 ease-out" |
| 83 | + enterFrom="opacity-0 scale-95" |
| 84 | + enterTo="opacity-100 scale-100" |
| 85 | + leave="duration-100 ease-in" |
| 86 | + leaveFrom="opacity-100 scale-100" |
| 87 | + leaveTo="opacity-0 scale-95" |
| 88 | + > |
| 89 | + <Popover.Panel |
| 90 | + focus |
| 91 | + className="absolute inset-x-0 top-0 z-10 origin-top transform p-2 transition md:hidden" |
| 92 | + > |
| 93 | + <div className="overflow-hidden rounded-lg bg-white shadow-md ring-1 ring-black ring-opacity-5"> |
| 94 | + <div className="flex items-center justify-between px-5 pt-4"> |
| 95 | + <div> |
| 96 | + <img |
| 97 | + className="h-8 w-auto" |
| 98 | + src="https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=600" |
| 99 | + alt="" |
| 100 | + /> |
| 101 | + </div> |
| 102 | + <div className="-mr-2"> |
| 103 | + <Popover.Button className="inline-flex items-center justify-center rounded-md bg-white p-2 text-gray-400 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-600"> |
| 104 | + <span className="sr-only">Close menu</span> |
| 105 | + <XMarkIcon className="h-6 w-6" aria-hidden="true" /> |
| 106 | + </Popover.Button> |
| 107 | + </div> |
| 108 | + </div> |
| 109 | + <div className="pt-5 pb-6"> |
| 110 | + <div className="space-y-1 px-2"> |
| 111 | + {navigation.map((item) => ( |
| 112 | + <a |
| 113 | + key={item.name} |
| 114 | + href={item.href} |
| 115 | + className="block rounded-md px-3 py-2 text-base font-medium text-gray-900 hover:bg-gray-50" |
| 116 | + > |
| 117 | + {item.name} |
| 118 | + </a> |
| 119 | + ))} |
| 120 | + </div> |
| 121 | + <div className="mt-6 px-5"> |
| 122 | + <a |
| 123 | + href="#" |
| 124 | + className="block w-full rounded-md bg-indigo-600 py-3 px-4 text-center font-medium text-white shadow hover:bg-indigo-700" |
| 125 | + > |
| 126 | + Start free trial |
| 127 | + </a> |
| 128 | + </div> |
| 129 | + <div className="mt-6 px-5"> |
| 130 | + <p className="text-center text-base font-medium text-gray-500"> |
| 131 | + Existing customer?{' '} |
| 132 | + <a href="#" className="text-gray-900 hover:underline"> |
| 133 | + Login |
| 134 | + </a> |
| 135 | + </p> |
| 136 | + </div> |
| 137 | + </div> |
| 138 | + </div> |
| 139 | + </Popover.Panel> |
| 140 | + </Transition> |
| 141 | + </Popover> |
8 | 142 | ); |
9 | 143 | }; |
10 | 144 |
|
|
0 commit comments