style(playground): adjust header layout and z-index for centered RunCode button

This commit is contained in:
cfngc4594 2025-04-10 20:38:39 +08:00
parent 10c1716019
commit 84ebd17be9

View File

@ -16,20 +16,20 @@ export function PlaygroundHeader({
{...props} {...props}
className={cn("relative", className)} className={cn("relative", className)}
> >
<nav className="relative h-12 w-full flex shrink-0 items-center px-2.5"> <nav className="z-0 relative h-12 w-full flex shrink-0 items-center px-2.5">
<div className="w-full flex justify-between"> <div className="w-full flex justify-between">
<div className="w-full flex items-center justify-between"> <div className="w-full flex items-center justify-between">
<div className="z-10 flex items-center"> <div className="flex items-center">
<BackButton href="/problemset" /> <BackButton href="/problemset" />
</div> </div>
<div className="z-10 flex items-center gap-2"> <div className="relative flex items-center gap-2">
<AvatarButton /> <AvatarButton />
</div> </div>
</div> </div>
</div> </div>
</nav> </nav>
<div className="absolute left-0 right-0 top-0 h-full mx-auto py-2"> <div className="z-10 absolute left-1/2 top-0 h-full -translate-x-1/2 py-2">
<div className="relative flex justify-center"> <div className="relative flex">
<div className="relative flex overflow-hidden rounded"> <div className="relative flex overflow-hidden rounded">
<RunCode className="bg-muted text-muted-foreground hover:bg-muted/50" /> <RunCode className="bg-muted text-muted-foreground hover:bg-muted/50" />
</div> </div>