forked from 77media/video-flow
移动端首页适配
This commit is contained in:
parent
dd59bd9b28
commit
5b9004c3ed
@ -167,7 +167,10 @@ export function TopBar({ collapsed }: { collapsed: boolean }) {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="fixed right-0 top-0 h-16 header z-[999]"
|
className="fixed right-0 top-0 h-16 header z-[999]"
|
||||||
style={{ isolation: "isolate", left: collapsed ? "3rem" : "16rem" }}
|
style={{
|
||||||
|
isolation: "isolate",
|
||||||
|
left: pathname === "/" ? "0" : (collapsed ? "2.5rem" : "16rem")
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<div className="h-full flex items-center justify-between pr-6 pl-4">
|
<div className="h-full flex items-center justify-between pr-6 pl-4">
|
||||||
<div className="flex items-center space-x-4">
|
<div className="flex items-center space-x-4">
|
||||||
@ -212,7 +215,11 @@ export function TopBar({ collapsed }: { collapsed: boolean }) {
|
|||||||
{pathname === "/" ? (
|
{pathname === "/" ? (
|
||||||
<div
|
<div
|
||||||
data-alt="go-started-button"
|
data-alt="go-started-button"
|
||||||
className="z-100 pointer-events-auto bg-white text-black rounded-full px-4 py-2 cursor-pointer transition-opacity opacity-100 hover:opacity-80 text-sm font-medium"
|
className="z-100 pointer-events-auto bg-white text-black rounded-full cursor-pointer transition-opacity opacity-100 hover:opacity-80 font-medium
|
||||||
|
/* 移动端适配 */
|
||||||
|
px-2 py-1.5 text-xs
|
||||||
|
/* 平板及以上适配 */
|
||||||
|
sm:px-4 sm:py-2 sm:text-sm"
|
||||||
onClick={() => router.push("/movies")}
|
onClick={() => router.push("/movies")}
|
||||||
>
|
>
|
||||||
Go Started
|
Go Started
|
||||||
@ -357,17 +364,25 @@ export function TopBar({ collapsed }: { collapsed: boolean }) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="flex items-center space-x-4">
|
<div className="flex items-center space-x-2 sm:space-x-4">
|
||||||
<div
|
<div
|
||||||
data-alt="login-button"
|
data-alt="login-button"
|
||||||
className="z-100 pointer-events-auto text-gray-300 hover:text-white cursor-pointer px-3 py-2 rounded transition-colors text-sm"
|
className="z-100 pointer-events-auto text-gray-300 hover:text-white cursor-pointer rounded transition-colors
|
||||||
|
/* 移动端适配 */
|
||||||
|
px-2 py-1.5 text-xs
|
||||||
|
/* 平板及以上适配 */
|
||||||
|
sm:px-3 sm:py-2 sm:text-sm"
|
||||||
onClick={() => router.push("/signup")}
|
onClick={() => router.push("/signup")}
|
||||||
>
|
>
|
||||||
Sign Up
|
Sign Up
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
data-alt="go-started-button"
|
data-alt="go-started-button"
|
||||||
className="z-100 pointer-events-auto bg-white text-black rounded-full px-4 py-2 cursor-pointer transition-opacity opacity-100 hover:opacity-80 text-sm font-medium"
|
className="z-100 pointer-events-auto bg-white text-black rounded-full cursor-pointer transition-opacity opacity-100 hover:opacity-80 font-medium
|
||||||
|
/* 移动端适配 */
|
||||||
|
px-2 py-1.5 text-xs
|
||||||
|
/* 平板及以上适配 */
|
||||||
|
sm:px-4 sm:py-2 sm:text-sm"
|
||||||
onClick={() => router.push("/movies")}
|
onClick={() => router.push("/movies")}
|
||||||
>
|
>
|
||||||
Go Started
|
Go Started
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user