Skip to content

Commit 172a034

Browse files
committed
fix(ui): align sticky header when announcement bar is hidden
Signed-off-by: Talha Amjad <myown4500@gmail.com>
1 parent 4b5ca35 commit 172a034

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎components/headline-bar.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function HeadlineBar() {
4343
const leavingAnimation = slideDirection === 1 ? 'headlineExitToRight' : 'headlineExitToLeft'
4444

4545
return (
46-
<div className="sticky top-0 z-50 w-full border-b border-white/20 bg-gradient-to-r from-amber-400 via-orange-500 to-rose-500 text-slate-950 shadow-[0_10px_30px_rgba(249,115,22,0.35)]">
46+
<div className="w-full border-b border-white/20 bg-gradient-to-r from-amber-400 via-orange-500 to-rose-500 text-slate-950 shadow-[0_10px_30px_rgba(249,115,22,0.35)]">
4747
<div className="container mx-auto px-4 sm:px-6 lg:px-8">
4848
<div className="relative flex min-h-10 items-center justify-center overflow-hidden py-2 text-center text-xs sm:text-sm font-semibold tracking-wide">
4949
{leavingMessage && (

‎components/navbar.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default function Navbar() {
4040
const isActive = (path: string) => pathname === path;
4141

4242
return (
43-
<header className="sticky top-10 z-40 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
43+
<div className="relative w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
4444
<nav className="container mx-auto px-4 sm:px-6 lg:px-8" aria-label="Top">
4545
<div className="flex items-center justify-between py-4">
4646
<div className="flex items-center">
@@ -241,6 +241,6 @@ export default function Navbar() {
241241
</div>
242242
)}
243243
</nav>
244-
</header>
244+
</div>
245245
);
246-
}
246+
}

‎components/site-header.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ export function SiteHeader() {
1414
}
1515

1616
return (
17-
<>
17+
<header className="sticky top-0 z-50 w-full">
1818
<HeadlineBar />
1919
<Navbar />
20-
</>
20+
</header>
2121
)
2222
}

0 commit comments

Comments
 (0)