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:
Thomas Hallock
2025-11-04 18:58:04 -06:00
parent fab227d686
commit 4559fb121d
2 changed files with 13 additions and 1 deletions

View File

@@ -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)',

View File

@@ -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}