fix(layout): add systematic spacing for fixed nav bar
Prevent content from appearing underneath the fixed navigation by: - Adding content wrapper in PageWithNav with top padding - Using CSS variable --app-nav-height set by AppNavBar itself - Different heights for full nav (72px) vs minimal nav (92px) This systematically solves the fixed nav overlap issue for all pages using PageWithNav without requiring per-page adjustments. Fixes: Calendar creator title showing under nav 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -495,6 +495,8 @@ function MinimalNav({
|
|||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'flex-start',
|
alignItems: 'flex-start',
|
||||||
pointerEvents: 'none',
|
pointerEvents: 'none',
|
||||||
|
// Set CSS variable for minimal nav height (top offset + approx button height)
|
||||||
|
['--app-nav-height' as any]: '92px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* Hamburger Menu - positioned absolutely on left */}
|
{/* Hamburger Menu - positioned absolutely on left */}
|
||||||
@@ -607,6 +609,10 @@ export function AppNavBar({ variant = 'full', navSlot }: AppNavBarProps) {
|
|||||||
return (
|
return (
|
||||||
<Tooltip.Provider delayDuration={200}>
|
<Tooltip.Provider delayDuration={200}>
|
||||||
<header
|
<header
|
||||||
|
style={{
|
||||||
|
// Set CSS variable for full nav height
|
||||||
|
['--app-nav-height' as any]: '72px',
|
||||||
|
}}
|
||||||
className={css({
|
className={css({
|
||||||
bg: isTransparent ? 'transparent' : 'rgba(0, 0, 0, 0.5)',
|
bg: isTransparent ? 'transparent' : 'rgba(0, 0, 0, 0.5)',
|
||||||
backdropFilter: isTransparent ? 'none' : 'blur(12px)',
|
backdropFilter: isTransparent ? 'none' : 'blur(12px)',
|
||||||
|
|||||||
@@ -213,7 +213,13 @@ export function PageWithNav({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppNavBar navSlot={navContent} />
|
<AppNavBar navSlot={navContent} />
|
||||||
{children}
|
<div
|
||||||
|
style={{
|
||||||
|
paddingTop: 'var(--app-nav-height, 80px)',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
{configurePlayerId && (
|
{configurePlayerId && (
|
||||||
<PlayerConfigDialog
|
<PlayerConfigDialog
|
||||||
playerId={configurePlayerId}
|
playerId={configurePlayerId}
|
||||||
|
|||||||
Reference in New Issue
Block a user