-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
144 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
import { Fragment } from 'react' | ||
import { Disclosure, Menu, Transition } from '@headlessui/react' | ||
import { Bars3Icon, BellIcon, XMarkIcon } from '@heroicons/react/24/outline' | ||
import Logo from './../../assets/maimai.png' | ||
|
||
const navigation = [ | ||
{ name: 'Home', href: '/', current: true }, | ||
{ name: 'Charts', href: '/charts', current: false }, | ||
] | ||
|
||
function classNames(...classes) { | ||
return classes.filter(Boolean).join(' ') | ||
} | ||
|
||
function Navbar() { | ||
return ( | ||
<Disclosure as="nav" className="bg-gray-800"> | ||
{({ open }) => ( | ||
<> | ||
<div className="mx-auto max-w-7xl px-2 sm:px-6 lg:px-8"> | ||
<div className="relative flex h-16 items-center justify-between"> | ||
<div className="absolute inset-y-0 left-0 flex items-center sm:hidden"> | ||
{/* Mobile menu button*/} | ||
<Disclosure.Button className="inline-flex items-center justify-center rounded-md p-2 text-gray-400 hover:bg-gray-700 hover:text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white"> | ||
<span className="sr-only">Open main menu</span> | ||
{open ? ( | ||
<XMarkIcon className="block h-6 w-6" aria-hidden="true" /> | ||
) : ( | ||
<Bars3Icon className="block h-6 w-6" aria-hidden="true" /> | ||
)} | ||
</Disclosure.Button> | ||
</div> | ||
<div className="flex flex-1 items-center justify-center sm:items-stretch sm:justify-start"> | ||
<div className="flex flex-shrink-0 items-center"> | ||
<img | ||
className="block h-8 w-auto lg:hidden" | ||
src={Logo} | ||
alt="Your Company" | ||
/> | ||
<img | ||
className="hidden h-8 w-auto lg:block" | ||
src={Logo} | ||
alt="Your Company" | ||
/> | ||
</div> | ||
<div className="hidden sm:ml-6 sm:block"> | ||
<div className="flex space-x-4"> | ||
{navigation.map((item) => ( | ||
<a | ||
key={item.name} | ||
href={item.href} | ||
className={classNames( | ||
item.current ? 'bg-gray-900 text-white' : 'text-gray-300 hover:bg-gray-700 hover:text-white', | ||
'rounded-md px-3 py-2 text-sm font-medium' | ||
)} | ||
aria-current={item.current ? 'page' : undefined} | ||
> | ||
{item.name} | ||
</a> | ||
))} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<Disclosure.Panel className="sm:hidden"> | ||
<div className="space-y-1 px-2 pt-2 pb-3"> | ||
{navigation.map((item) => ( | ||
<Disclosure.Button | ||
key={item.name} | ||
as="a" | ||
href={item.href} | ||
className={classNames( | ||
item.current ? 'bg-gray-900 text-white' : 'text-gray-300 hover:bg-gray-700 hover:text-white', | ||
'block rounded-md px-3 py-2 text-base font-medium' | ||
)} | ||
aria-current={item.current ? 'page' : undefined} | ||
> | ||
{item.name} | ||
</Disclosure.Button> | ||
))} | ||
</div> | ||
</Disclosure.Panel> | ||
</> | ||
)} | ||
</Disclosure> | ||
) | ||
} | ||
|
||
export default Navbar |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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