[update] migrate the project formatter from prettier and eslint to biome
This commit is contained in:
@@ -32,16 +32,16 @@ export const NavBar = () => {
|
||||
|
||||
return (
|
||||
<Sheet onOpenChange={(open) => setIsSideNavOpen(open)} open={isSideNavOpen}>
|
||||
<div className="sticky top-0 z-50 border-black-200 dark:border-gray-700 border-b bg-white dark:bg-gray-950 flex flex-wrap justify-between py-3 px-5 md:px-10 lg:px-20 xl:px-32 2xl:px-52">
|
||||
<Link className="cursor-pointer my-auto text-2xl font-bold" href="/">
|
||||
<h1 className={`website-title-font my-auto`} title="Click to jump to home page.">
|
||||
<div className="sticky top-0 z-50 flex flex-wrap justify-between border-black-200 border-b bg-white px-5 py-3 md:px-10 lg:px-20 xl:px-32 2xl:px-52 dark:border-gray-700 dark:bg-gray-950">
|
||||
<Link className="my-auto cursor-pointer font-bold text-2xl" href="/">
|
||||
<h1 className={"website-title-font my-auto"} title="Click to jump to home page.">
|
||||
{Config.SiteTitle}
|
||||
</h1>
|
||||
</Link>
|
||||
<div className="my-auto hidden sm:flex">
|
||||
{MenuItems.map((menuItem) => (
|
||||
<Link
|
||||
className="font-bold hover:text-sky-700 dark:hover:text-sky-500 mx-2 my-auto px-2"
|
||||
className="mx-2 my-auto px-2 font-bold hover:text-sky-700 dark:hover:text-sky-500"
|
||||
href={menuItem.href}
|
||||
key={nanoid()}
|
||||
onClick={() => setIsSideNavOpen(false)}
|
||||
@@ -50,23 +50,23 @@ export const NavBar = () => {
|
||||
</Link>
|
||||
))}
|
||||
<Link
|
||||
className="cursor-pointer mx-2 rounded-full p-1 text-3xl text-black hover:bg-gray-200 dark:text-gray-50 dark:hover:bg-gray-800"
|
||||
className="mx-2 cursor-pointer rounded-full p-1 text-3xl text-black hover:bg-gray-200 dark:text-gray-50 dark:hover:bg-gray-800"
|
||||
href={"/search"}
|
||||
title="Search posts by keywords"
|
||||
>
|
||||
<MdSearch />
|
||||
</Link>
|
||||
<div
|
||||
className="cursor-pointer mx-1 rounded-full p-1 text-3xl text-black hover:bg-gray-200 dark:text-gray-50 dark:hover:bg-gray-800"
|
||||
className="mx-1 cursor-pointer rounded-full p-1 text-3xl text-black hover:bg-gray-200 dark:text-gray-50 dark:hover:bg-gray-800"
|
||||
onClick={handleSwitchTheme}
|
||||
title={theme === "light" ? "Switch to dark mode" : "Switch to light mode"}
|
||||
>
|
||||
{theme === "light" ? <MdOutlineDarkMode /> : <MdOutlineLightMode />}
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-3xl sm:hidden my-auto">
|
||||
<div className="my-auto text-3xl sm:hidden">
|
||||
<SheetTrigger
|
||||
className="text-black rounded-full p-1 hover:bg-gray-200 dark:text-gray-50 dark:hover:bg-gray-800"
|
||||
className="rounded-full p-1 text-black hover:bg-gray-200 dark:text-gray-50 dark:hover:bg-gray-800"
|
||||
title="Spread the navigation menu"
|
||||
>
|
||||
<MdMenu
|
||||
@@ -77,7 +77,7 @@ export const NavBar = () => {
|
||||
</SheetTrigger>
|
||||
</div>
|
||||
</div>
|
||||
<SheetContent className="bg:white border-none py-16 shadow-md dark:bg-black flex flex-col text-end">
|
||||
<SheetContent className="bg:white flex flex-col border-none py-16 text-end shadow-md dark:bg-black">
|
||||
{MenuItems.map((menuItem) => (
|
||||
<Link
|
||||
className="border-b border-dashed p-3 text-xl hover:text-sky-500"
|
||||
@@ -97,11 +97,11 @@ export const NavBar = () => {
|
||||
{"SEARCH"}
|
||||
</Link>
|
||||
<div
|
||||
className="flex text-xl p-3 cursor-pointer border-b border-dashed justify-end hover:text-sky-500"
|
||||
className="flex cursor-pointer justify-end border-b border-dashed p-3 text-xl hover:text-sky-500"
|
||||
onClick={handleSwitchTheme}
|
||||
>
|
||||
<div
|
||||
className="cursor-pointer mx-1 my-auto rounded-full text-2xl"
|
||||
className="mx-1 my-auto cursor-pointer rounded-full text-2xl"
|
||||
title={theme === "light" ? "Switch to dark mode" : "Switch to light mode"}
|
||||
>
|
||||
{theme === "light" ? <MdOutlineDarkMode /> : <MdOutlineLightMode />}
|
||||
|
||||
Reference in New Issue
Block a user