-
Notifications
You must be signed in to change notification settings - Fork 312
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
1 parent
2ddba05
commit 07d5601
Showing
36 changed files
with
3,768 additions
and
123 deletions.
There are no files selected for viewing
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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import Link from 'next/link' | ||
import { Logo, Icons, Search, Signup, Cart } from 'components' | ||
export default function Header() { | ||
return ( | ||
<> | ||
<header className="px-4 bg-white lg:shadow xl:fixed xl:z-20 xl:top-0 xl:left-0 xl:right-0"> | ||
<div className="container max-w-[1700px] lg:flex lg:py-2"> | ||
<div className="inline-flex items-center justify-between w-full border-b lg:border-b-0 lg:max-w-min lg:mr-8"> | ||
<Icons.Question className="icon lg:hidden" /> | ||
<Link passHref href="/"> | ||
{/* <Logo className="w-24 h-14" /> */} | ||
<div className="w-24 h-14 bg-red-200"></div> | ||
</Link> | ||
<div className="icon lg:hidden">三</div> | ||
</div> | ||
<div className="inline-flex items-center justify-between w-full py-2 border-b gap-x-10 lg:border-b-0"> | ||
<Search className="flex flex-grow gap-x-7" /> | ||
<div className="inline-flex items-center gap-x-4 pr-4"> | ||
<Signup /> | ||
<span className="hidden lg:block bg-gray-300 w-0.5 h-8" /> | ||
<Cart /> | ||
</div> | ||
</div> | ||
</div> | ||
</header> | ||
</> | ||
) | ||
} |
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 |
---|---|---|
@@ -1,27 +1,3 @@ | ||
'use client' | ||
|
||
import { useRouter } from 'next/navigation' | ||
|
||
import { ClientLayout, ProfileAside } from 'components' | ||
import useVerify from '@/hooks/useVerify' | ||
|
||
export default function ProfileLayout({ children }) { | ||
const isVerify = useVerify() | ||
const router = useRouter() | ||
|
||
if (!isVerify) router.push('/') | ||
else | ||
return ( | ||
<> | ||
<ClientLayout /> | ||
<div className="lg:flex lg:gap-x-4 lg:px-3 lg:container lg:max-w-7xl"> | ||
<div className="hidden lg:block "> | ||
<ProfileAside user={user} /> | ||
</div> | ||
<div className="py-4 lg:py-8 lg:border lg:border-gray-300 flex-1 lg:rounded-md lg:mt-6 h-fit"> | ||
{children} | ||
</div> | ||
</div> | ||
</> | ||
) | ||
return <div>{children}</div> | ||
} |
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 |
---|---|---|
@@ -1,15 +1,20 @@ | ||
import { Icons } from 'components' | ||
|
||
export default function Search() { | ||
//? Render(s) | ||
return ( | ||
<form className="flex-grow flex flex-row-reverse max-w-3xl rounded-md bg-zinc-200/80"> | ||
<input | ||
type="text" | ||
placeholder="搜索" | ||
className="text-right outline-none bg-transparent p-1 flex-grow " | ||
/> | ||
<button className="p-2"> | ||
<Icons.Search className="icon" /> | ||
</button> | ||
</form> | ||
<> | ||
<div className="flex flex-row flex-grow max-w-3xl rounded-md bg-zinc-200/80 "> | ||
<input | ||
disabled={true} | ||
type="text" | ||
placeholder="搜索" | ||
className="flex-grow p-1 text-right bg-transparent outline-none cursor-pointer input" | ||
/> | ||
<button className="p-2"> | ||
<Icons.Search className="icon text-gray-400" /> | ||
</button> | ||
</div> | ||
</> | ||
) | ||
} |
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,19 @@ | ||
import { useRouter } from 'next/navigation' | ||
import Link from 'next/link' | ||
import { Icons } from '.' | ||
|
||
export default function Signup() { | ||
const { asPath } = useRouter() | ||
return ( | ||
<div className="flex-center text-sm gap-x-3 lg:border lg:border-gray-300 lg:rounded-md lg:py-2 lg:px-3"> | ||
<Link href={`/register?redirectTo=${asPath}`} className="hidden px-2 lg:block"> | ||
注册 | ||
</Link> | ||
<span className="hidden lg:block lg:bg-gray-300 w-0.5 lg:h-6" /> | ||
<Link href={`/login?redirectTo=${asPath}`} className="flex-center gap-x-1"> | ||
登录 | ||
<Icons.Login className="icon" /> | ||
</Link> | ||
</div> | ||
) | ||
} |
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,19 @@ | ||
import Link from 'next/link' | ||
|
||
import { Icons } from 'components' | ||
|
||
export default function Cart() { | ||
return ( | ||
<> | ||
<Link href="/"> | ||
<div className="relative"> | ||
<span className="absolute outline outline-2 bottom-3.5 left-5 bg-red-500 rounded-md w-5 h-5 p-0.5 text-center text-xs text-white farsi-digits"> | ||
0 | ||
</span> | ||
|
||
<Icons.Cart className="icon h-7 w-7" /> | ||
</div> | ||
</Link> | ||
</> | ||
) | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.