Redesign nav: sticky horizontal scrollable category strip

19 categories can't fit in a fixed bottom tab bar. Replace with a
sticky horizontal pill strip that sits below the header, auto-scrolls
active tab into view via Intersection Observer, and shows emoji + label
at a readable size with teal active highlight.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mstfyldz
2026-06-03 03:21:35 +03:00
co-authored by Claude Sonnet 4.6
parent bc8bd747ff
commit d369c9e258
5 changed files with 392 additions and 271 deletions
+7 -10
View File
@@ -20,24 +20,24 @@ export default async function MenuPage({
<>
<Header dict={dict} />
{/* Sticky category nav — renders directly below header via sticky positioning */}
<BottomTabBar categories={categories} lang={lang} />
<main
className="relative min-h-screen"
style={{
paddingTop: 'var(--header-h)',
paddingBottom: 'calc(var(--tabbar-h) + 8px)',
}}
style={{ paddingTop: 'var(--header-h)', paddingBottom: '32px' }}
>
{/* Hero gradient fade from header */}
<div
aria-hidden="true"
className="h-8 w-full"
className="h-6 w-full"
style={{
background:
'linear-gradient(180deg, rgba(31,20,10,0.12) 0%, transparent 100%)',
'linear-gradient(180deg, rgba(31,20,10,0.10) 0%, transparent 100%)',
}}
/>
{/* Decorative welcome strip */}
{/* Welcome strip */}
<div className="px-4 pt-2 pb-1">
<div
className="rounded-2xl px-4 py-3 flex items-center gap-3"
@@ -67,7 +67,6 @@ export default async function MenuPage({
</div>
</div>
{/* Category sections */}
{categories.map((category) => (
<CategorySection
key={category.id}
@@ -84,8 +83,6 @@ export default async function MenuPage({
message={dict.whatsapp.message}
label={dict.whatsapp.label}
/>
<BottomTabBar categories={categories} lang={lang} />
</>
)
}