From 6d475650dad8e1701acd8343c10365c6a7fef84d Mon Sep 17 00:00:00 2001 From: brooktewabe Date: Sat, 21 Feb 2026 21:18:41 +0300 Subject: [PATCH] feat: enhance layout with mobile navigation and added themes var --- app/globals.css | 67 +++- components/layout/auth-modal.tsx | 24 +- components/layout/layout-client-wrapper.tsx | 27 +- components/layout/mobile-bottom-nav.tsx | 80 ++++ components/layout/site-header.tsx | 381 +++++++++++++------- components/layout/sports-sidebar.tsx | 60 +-- 6 files changed, 445 insertions(+), 194 deletions(-) create mode 100644 components/layout/mobile-bottom-nav.tsx diff --git a/app/globals.css b/app/globals.css index b66ace5..8bbb406 100644 --- a/app/globals.css +++ b/app/globals.css @@ -42,38 +42,52 @@ --radius-md: calc(var(--radius) - 2px); --radius-lg: var(--radius); --radius-xl: calc(var(--radius) + 4px); + + /* Brand Theme Parameters */ + --color-brand-primary: var(--brand-primary); + --color-brand-primary-hover: var(--brand-primary-hover); + --color-brand-secondary: var(--brand-secondary); + --color-brand-bg: var(--brand-bg); + --color-brand-surface: var(--brand-surface); + --color-brand-surface-light: var(--brand-surface-light); + --color-brand-accent: var(--brand-accent); + --color-brand-live: var(--brand-live); } :root { --radius: 0rem; - /* HarifSport orange theme colors */ - --background: #121212; + + /* Brand Colors (Black, Yellow, White theme) */ + --brand-primary: #ff9800; + --brand-primary-hover: #e68900; + --brand-secondary: #ff9800; + /* Usually same as primary for now */ + --brand-bg: #121212; + --brand-surface: #1a1a1a; + --brand-surface-light: #2a2a2a; + --brand-accent: #852222; + /* Maroon */ + --brand-live: #ff3b3b; + + /* Shadcn default mappings */ + --background: var(--brand-bg); --foreground: #ffffff; --card: #1e1e1e; --card-foreground: #ffffff; --popover: #1e1e1e; --popover-foreground: #ffffff; - --primary: #ff9800; + --primary: var(--brand-primary); --primary-foreground: #ffffff; --secondary: #222222; --secondary-foreground: #a0a0a0; --muted: #1a1a1a; --muted-foreground: #808080; - --accent: #ff9800; + --accent: var(--brand-primary); --accent-foreground: #121212; --destructive: #ef4444; --border: #2a2a2a; --input: #222222; - --ring: #ff9800; - - /* HarifSport specific */ - --hs-orange: #ff9800; - --hs-maroon: #852222; - --hs-dark-grey: #1a1a1a; - --hs-odds-bg: #2a2a2a; - --hs-odds-text: #ff9800; - --hs-header-bg: #121212; - --hs-live-red: #ff3b3b; + --ring: var(--brand-primary); } .dark { @@ -169,6 +183,31 @@ animation: fade-in 0.18s ease-out both; } +/* Mobile drawer slide-in from left */ +@keyframes slide-in-left { + from { + transform: translateX(-100%); + } + + to { + transform: translateX(0); + } +} + +.animate-slide-in-left { + animation: slide-in-left 0.22s ease-out both; +} + +/* Hide scrollbar for mobile nav */ +.scrollbar-none { + -ms-overflow-style: none; + scrollbar-width: none; +} + +.scrollbar-none::-webkit-scrollbar { + display: none; +} + /* Scrollbar */ ::-webkit-scrollbar { width: 4px; diff --git a/components/layout/auth-modal.tsx b/components/layout/auth-modal.tsx index cdc71f5..083fa0c 100644 --- a/components/layout/auth-modal.tsx +++ b/components/layout/auth-modal.tsx @@ -15,13 +15,13 @@ function Logo() { ))} {/* HARIF box */} -
+
HARIF
{/* SPORT text */} - + SPORT
@@ -66,7 +66,7 @@ export function AuthModal({ open, defaultMode, onClose }: AuthModalProps) { onClick={onClose} >
e.stopPropagation()} > {/* Close button */} @@ -79,7 +79,7 @@ export function AuthModal({ open, defaultMode, onClose }: AuthModalProps) { {/* Logo */} -
+
@@ -105,7 +105,7 @@ export function AuthModal({ open, defaultMode, onClose }: AuthModalProps) { type="tel" value={phone} onChange={(e) => setPhone(e.target.value)} - className="flex-1 bg-white border border-l-0 border-gray-300 px-3 py-2 text-sm text-[#333] placeholder:text-gray-400 focus:outline-none focus:border-[#ff9800]" + className="flex-1 bg-white border border-l-0 border-gray-300 px-3 py-2 text-sm text-[#333] placeholder:text-gray-400 focus:outline-none focus:border-brand-primary" />
@@ -120,7 +120,7 @@ export function AuthModal({ open, defaultMode, onClose }: AuthModalProps) { value={password} onChange={(e) => setPassword(e.target.value)} placeholder="Password" - className="w-full bg-white border border-gray-300 px-3 py-2 text-sm text-[#333] placeholder:text-gray-400 focus:outline-none focus:border-[#ff9800]" + className="w-full bg-white border border-gray-300 px-3 py-2 text-sm text-[#333] placeholder:text-gray-400 focus:outline-none focus:border-brand-primary" /> @@ -135,7 +135,7 @@ export function AuthModal({ open, defaultMode, onClose }: AuthModalProps) { value={repeatPassword} onChange={(e) => setRepeatPassword(e.target.value)} placeholder="Repeat Password" - className="w-full bg-white border border-gray-300 px-3 py-2 text-sm text-[#333] placeholder:text-gray-400 focus:outline-none focus:border-[#ff9800]" + className="w-full bg-white border border-gray-300 px-3 py-2 text-sm text-[#333] placeholder:text-gray-400 focus:outline-none focus:border-brand-primary" /> )} @@ -147,7 +147,7 @@ export function AuthModal({ open, defaultMode, onClose }: AuthModalProps) { type="checkbox" checked={ageConfirmed} onChange={(e) => setAgeConfirmed(e.target.checked)} - className="w-4 h-4 accent-[#ff9800]" + className="w-4 h-4 accent-brand-primary" /> I confirm I'm over 21 years old @@ -160,7 +160,7 @@ export function AuthModal({ open, defaultMode, onClose }: AuthModalProps) {
Forgot password? @@ -169,7 +169,7 @@ export function AuthModal({ open, defaultMode, onClose }: AuthModalProps) { )} {/* Submit button */} - @@ -190,7 +190,7 @@ export function AuthModal({ open, defaultMode, onClose }: AuthModalProps) { <> Don't have an account?{" "} -
- 🕒 - {time || "00:00:00"} -
-
-
-
- +251 (0) Number - -
-
- - -
-
- - - {/* Main header */} -
- {/* Logo Section */} - -
-
- HARIF + <> +
+ {/* ===== DESKTOP: Top bar (hidden on mobile) ===== */} +
+
+ +
+ 🕒 + {time || "00:00:00"} +
+
+
+
+ +251 (0) Number + +
+
+ +
- SPORT
- - - - {/* Navigation Wrapper - Pushed to Right */} -
- {/* Home icon as button */} - - - - {/* Main Nav Group */} - - - {/* Spacing Gap between groups if needed, but the user says "All in the right" */} - - {/* Extra Nav Group */} -
-
- {/* Secondary Sub Header */} -
- {[ - { label: "Sport Home", href: "/" }, - { label: "General View", href: "/live", forceActive: isLivePage }, - { label: "Event View", href: "/live/event" }, - ].map((tab) => { - const isActive = tab.forceActive || pathname === tab.href - return ( - + {/* Hamburger */} + + + {/* Logo (centered, grows to fill) */} + +
+
+ HARIF +
+ SPORT +
+ + + {/* LOGIN / SIGN UP */} +
+ + +
+
+ + {/* ===== DESKTOP: Main header bar ===== */} +
+ +
+
+ HARIF +
+ SPORT +
+ +
+ + - ) - })} -
-
+ + +
+
+ + {/* ===== MOBILE: Horizontally scrollable nav tabs ===== */} +
+ + + + {allNavItems.map((item) => { + const isActive = pathname === item.href + return ( + + {item.isNew && ( + NEW + )} + {item.label} + + ) + })} +
+ + {/* ===== MOBILE: Sport Category Icons Row ===== */} +
+ {[ + { label: "Check Bet", icon: (active: boolean) => , count: 99 }, + { label: "Live", icon: (active: boolean) =>
, count: 1247 }, + { label: "Football", icon: (active: boolean) => , count: 95 }, + { label: "Tennis", icon: (active: boolean) => , count: 384 }, + { label: "Basketball", icon: (active: boolean) => , count: 173 }, + ].map((item, idx) => ( +
+ {item.count} +
+ {typeof item.icon === 'function' ? item.icon(false) : item.icon} +
+ {item.label} +
+ ))} +
+ + {/* ===== DESKTOP: Secondary sub-header ===== */} +
+ {[ + { label: "Sport Home", href: "/" }, + { label: "General View", href: "/live", forceActive: isLivePage }, + { label: "Event View", href: "/live/event" }, + ].map((tab) => { + const isActive = tab.forceActive || pathname === tab.href + return ( + + {tab.label} + {isActive && tab.label !== "Sport Home" && ( +
+ )} + + ) + })} +
+ + + {/* ===== MOBILE Drawer ===== */} + {drawerOpen && ( +
+ {/* Backdrop */} +
setDrawerOpen(false)} /> + {/* Drawer panel */} +
+ {/* Drawer header */} +
+
+
+ HARIF +
+ SPORT +
+ +
+ {/* Nav links */} + +
+
+ )} + ) } \ No newline at end of file diff --git a/components/layout/sports-sidebar.tsx b/components/layout/sports-sidebar.tsx index fc7b7e5..109eaca 100644 --- a/components/layout/sports-sidebar.tsx +++ b/components/layout/sports-sidebar.tsx @@ -25,15 +25,15 @@ export function SportsSidebar() { const [activeSport, setActiveSport] = useState("football") return ( -