Spaces:
Running

axeronis commited on
Commit
96c70ef
·
1 Parent(s): 38a7c68

feat: Transparent header and scrollable secondary nav styling

Browse files
frontend/components/Header.tsx CHANGED
@@ -57,7 +57,7 @@ export function Header() {
57
  }
58
 
59
  return (
60
- <header className="hidden md:flex h-16 border-b border-white/10 bg-[#050510] items-center justify-between px-6 sticky top-0 z-30">
61
  {/* Left: Logo (Visible only when sidebar is hidden i.e. < lg) */}
62
  <div className="flex items-center gap-2 lg:hidden">
63
  <Link href="/dashboard" className="flex items-center gap-2">
 
57
  }
58
 
59
  return (
60
+ <header className="hidden md:flex h-16 border-b border-white/10 bg-black/80 backdrop-blur-xl items-center justify-between px-6 sticky top-0 z-30">
61
  {/* Left: Logo (Visible only when sidebar is hidden i.e. < lg) */}
62
  <div className="flex items-center gap-2 lg:hidden">
63
  <Link href="/dashboard" className="flex items-center gap-2">
frontend/components/SecondaryNav.tsx CHANGED
@@ -57,11 +57,29 @@ export function SecondaryNav() {
57
  }
58
  }, [pathname])
59
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  return (
61
- <div className="hidden md:flex lg:hidden w-full h-14 bg-[#050510] border-b border-white/5 sticky top-16 z-20">
62
  <div
63
  ref={scrollContainerRef}
64
- className="flex items-center gap-1 px-4 overflow-x-auto no-scrollbar w-full"
 
 
 
 
 
 
65
  >
66
  {visibleItems.map((item) => {
67
  const active = isActive(item.href)
 
57
  }
58
  }, [pathname])
59
 
60
+ // Handle mouse wheel for horizontal scroll
61
+ const handleWheel = (e: React.WheelEvent) => {
62
+ if (scrollContainerRef.current) {
63
+ // If scrolling vertically (deltaY), scroll horizontally instead
64
+ if (e.deltaY !== 0) {
65
+ scrollContainerRef.current.scrollLeft += e.deltaY
66
+ // e.preventDefault() // Cannot prevent default in passive event listener (React synthetic), strict mode might complain.
67
+ // Usually horizontal scroll on wheel is fine without preventDefault if we manually set scrollLeft.
68
+ }
69
+ }
70
+ }
71
+
72
  return (
73
+ <div className="hidden md:flex lg:hidden w-full h-14 bg-black/60 backdrop-blur-xl border-b border-white/5 sticky top-16 z-20">
74
  <div
75
  ref={scrollContainerRef}
76
+ onWheel={handleWheel}
77
+ className="flex items-center gap-1 px-4 overflow-x-auto w-full scrollbar-minimal"
78
+ style={{
79
+ // Minimalist Scrollbar Styles
80
+ scrollbarWidth: 'thin',
81
+ scrollbarColor: 'rgba(255,255,255,0.1) transparent'
82
+ }}
83
  >
84
  {visibleItems.map((item) => {
85
  const active = isActive(item.href)