Shrink mobile top bar to h-10 (40px) and fix tab sticky offset
- Header: h-10 fixed height, smaller avatar (size-7), smaller logo (22px), tighter padding (px-3) — eliminates the gap/clipping between header and sticky tabs - Tabs sticky offset updated to top-10 (40px) to sit flush under header Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
This commit is contained in:
@@ -15,7 +15,7 @@ export function Feed() {
|
||||
<ComposeBox compact />
|
||||
|
||||
{/* Tabs — stick below the mobile top bar (48px) on small screens, top-0 on desktop */}
|
||||
<div className="flex border-b border-border sticky top-[48px] sidebar:top-0 bg-background/80 backdrop-blur-md z-[5]">
|
||||
<div className="flex border-b border-border sticky top-10 sidebar:top-0 bg-background/80 backdrop-blur-md z-[5]">
|
||||
<TabButton
|
||||
label="Follows"
|
||||
active={activeTab === 'follows'}
|
||||
|
||||
@@ -11,14 +11,14 @@ export function MobileTopBar({ onAvatarClick }: MobileTopBarProps) {
|
||||
const { user, metadata } = useCurrentUser();
|
||||
|
||||
return (
|
||||
<header className="sticky top-0 z-20 flex items-center justify-between px-4 py-2 bg-background/80 backdrop-blur-md border-b border-border sidebar:hidden">
|
||||
<header className="sticky top-0 z-20 flex items-center justify-between px-3 h-10 bg-background/80 backdrop-blur-md border-b border-border sidebar:hidden">
|
||||
{/* Left: user avatar or login */}
|
||||
<div className="w-10">
|
||||
<div className="w-8">
|
||||
{user ? (
|
||||
<button onClick={onAvatarClick} className="rounded-full focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 focus:ring-offset-background">
|
||||
<Avatar className="size-9">
|
||||
<button onClick={onAvatarClick} className="rounded-full focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 focus:ring-offset-background">
|
||||
<Avatar className="size-7">
|
||||
<AvatarImage src={metadata?.picture} alt={metadata?.name} />
|
||||
<AvatarFallback className="bg-primary/20 text-primary text-xs">
|
||||
<AvatarFallback className="bg-primary/20 text-primary text-[10px]">
|
||||
{(metadata?.name?.[0] || '?').toUpperCase()}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
@@ -29,10 +29,10 @@ export function MobileTopBar({ onAvatarClick }: MobileTopBarProps) {
|
||||
</div>
|
||||
|
||||
{/* Center: Mew logo */}
|
||||
<MewLogo size={28} />
|
||||
<MewLogo size={22} />
|
||||
|
||||
{/* Right: spacer for symmetry */}
|
||||
<div className="w-10" />
|
||||
<div className="w-8" />
|
||||
</header>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user