Spaces:
Running

axeronis commited on
Commit
37bb3a7
·
1 Parent(s): 445b18b

feat: ultra-expensive glass with Aurora effects and fixed neon interaction

Browse files
frontend/components/Header.tsx CHANGED
@@ -57,98 +57,106 @@ export function Header() {
57
  }
58
 
59
  return (
60
- <header className="hidden md:flex h-16 border-b border-white/10 md:border-b-0 lg:border-b lg:border-white/10 bg-black/20 backdrop-blur-3xl 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">
64
- <div className="w-8 h-8 relative">
65
- <img src="/logo-v2.png" alt="Logo" className="w-full h-full object-contain" />
66
- </div>
67
- <span className="font-bold text-lg text-white tracking-widest uppercase">
68
- MicroFunnel
69
- </span>
70
- </Link>
71
  </div>
72
 
73
- {/* Center: Spacer or Title - Nav is now in SecondaryNav below */}
74
-
75
- {/* Spacer for LG screens where Nav is in Sidebar, to keep Profile on right */}
76
- <div className="flex-1" />
77
-
78
- <div className="flex items-center gap-4">
79
- {/* Language Switcher moved here if needed, or kept in profile */}
80
-
81
- {/* User Profile with Dropdown */}
82
- <div className="relative">
83
- <button
84
- onClick={() => setShowDropdown(!showDropdown)}
85
- className="flex items-center gap-4 pl-6 border-l border-white/10 h-10 hover:opacity-80 transition"
86
- >
87
- <div className="flex flex-col items-end mr-2 hidden md:flex">
88
- <span className="text-sm font-bold text-white leading-none">
89
- {user?.full_name || 'User'}
90
- </span>
91
- <span className="text-[11px] text-slate-500 font-medium mt-1.5 flex items-center gap-1">
92
- {companyName ? (
93
- <><Building2 className="w-3 h-3" /> {companyName}</>
94
- ) : (
95
- user?.email
96
- )}
97
- </span>
98
  </div>
 
 
 
 
 
99
 
100
- <div className={cn(
101
- "w-8 h-8 rounded-lg flex items-center justify-center text-white font-bold text-xs shadow-lg border border-white/10 ring-2 ring-white/5",
102
- getAvatarColor(user?.email)
103
- )}>
104
- {getInitials(user?.full_name, user?.email)}
105
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
 
107
- <ChevronDown className="w-4 h-4 text-slate-400" />
108
- </button>
109
-
110
- {/* Dropdown Menu */}
111
- {showDropdown && (
112
- <>
113
- <div
114
- className="fixed inset-0 z-40"
115
- onClick={() => setShowDropdown(false)}
116
- />
117
- <div className="absolute right-0 top-full mt-2 w-56 bg-[#1E1F2E] border border-white/10 rounded-xl shadow-2xl z-50 overflow-hidden">
118
- <div className="p-3 border-b border-white/10">
119
- <p className="text-sm font-semibold text-white">{user?.full_name}</p>
120
- <p className="text-xs text-slate-500 mt-0.5">{user?.email}</p>
121
- </div>
122
- <div className="py-1">
123
- <Link
124
- href="/settings/account"
125
- onClick={() => setShowDropdown(false)}
126
- className="flex items-center gap-3 px-4 py-2.5 text-sm text-slate-400 hover:text-white hover:bg-white/5 transition"
127
- >
128
- <User className="w-4 h-4" />
129
- {t('header.profile')}
130
- </Link>
131
- <Link
132
- href="/settings/brain"
133
- onClick={() => setShowDropdown(false)}
134
- className="flex items-center gap-3 px-4 py-2.5 text-sm text-slate-400 hover:text-white hover:bg-white/5 transition"
135
- >
136
- <Settings className="w-4 h-4" />
137
- {t('header.settings')}
138
- </Link>
139
- </div>
140
- <div className="border-t border-white/10 py-1">
141
- <button
142
- onClick={() => { logout(); setShowDropdown(false) }}
143
- className="flex items-center gap-3 px-4 py-2.5 text-sm text-red-400 hover:text-red-300 hover:bg-red-500/10 transition w-full text-left"
144
- >
145
- <LogOut className="w-4 h-4" />
146
- {t('header.logout')}
147
- </button>
148
- </div>
149
  </div>
150
- </>
151
- )}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  </div>
153
  </div>
154
  </header>
 
57
  }
58
 
59
  return (
60
+ <header className="hidden md:flex h-16 border-b border-white/10 md:border-b-0 lg:border-b lg:border-white/10 bg-white/[0.02] backdrop-blur-3xl saturate-[1.8] items-center justify-between px-6 sticky top-0 z-30 overflow-hidden">
61
+ {/* Aurora Background Effects */}
62
+ <div className="absolute inset-0 pointer-events-none overflow-hidden">
63
+ <div className="absolute -top-[50%] -left-[10%] w-[40%] h-[200%] bg-indigo-500/10 blur-[80px] rounded-full rotate-12" />
64
+ <div className="absolute -top-[50%] -right-[10%] w-[30%] h-[200%] bg-purple-500/10 blur-[80px] rounded-full -rotate-12" />
 
 
 
 
 
 
65
  </div>
66
 
67
+ <div className="relative z-10 flex items-center justify-between w-full">
68
+ {/* Left: Logo (Visible only when sidebar is hidden i.e. < lg) */}
69
+ <div className="flex items-center gap-2 lg:hidden">
70
+ <Link href="/dashboard" className="flex items-center gap-2">
71
+ <div className="w-8 h-8 relative">
72
+ <img src="/logo-v2.png" alt="Logo" className="w-full h-full object-contain" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  </div>
74
+ <span className="font-bold text-lg text-white tracking-widest uppercase">
75
+ MicroFunnel
76
+ </span>
77
+ </Link>
78
+ </div>
79
 
80
+ {/* Center: Spacer or Title - Nav is now in SecondaryNav below */}
81
+
82
+ {/* Spacer for LG screens where Nav is in Sidebar, to keep Profile on right */}
83
+ <div className="flex-1" />
84
+
85
+ <div className="flex items-center gap-4">
86
+ {/* Language Switcher moved here if needed, or kept in profile */}
87
+
88
+ {/* User Profile with Dropdown */}
89
+ <div className="relative">
90
+ <button
91
+ onClick={() => setShowDropdown(!showDropdown)}
92
+ className="flex items-center gap-4 pl-6 border-l border-white/10 h-10 hover:opacity-80 transition"
93
+ >
94
+ <div className="flex flex-col items-end mr-2 hidden md:flex">
95
+ <span className="text-sm font-bold text-white leading-none">
96
+ {user?.full_name || 'User'}
97
+ </span>
98
+ <span className="text-[11px] text-slate-500 font-medium mt-1.5 flex items-center gap-1">
99
+ {companyName ? (
100
+ <><Building2 className="w-3 h-3" /> {companyName}</>
101
+ ) : (
102
+ user?.email
103
+ )}
104
+ </span>
105
+ </div>
106
 
107
+ <div className={cn(
108
+ "w-8 h-8 rounded-lg flex items-center justify-center text-white font-bold text-xs shadow-lg border border-white/10 ring-2 ring-white/5",
109
+ getAvatarColor(user?.email)
110
+ )}>
111
+ {getInitials(user?.full_name, user?.email)}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  </div>
113
+
114
+ <ChevronDown className="w-4 h-4 text-slate-400" />
115
+ </button>
116
+
117
+ {/* Dropdown Menu */}
118
+ {showDropdown && (
119
+ <>
120
+ <div
121
+ className="fixed inset-0 z-40"
122
+ onClick={() => setShowDropdown(false)}
123
+ />
124
+ <div className="absolute right-0 top-full mt-2 w-56 bg-[#1E1F2E] border border-white/10 rounded-xl shadow-2xl z-50 overflow-hidden">
125
+ <div className="p-3 border-b border-white/10">
126
+ <p className="text-sm font-semibold text-white">{user?.full_name}</p>
127
+ <p className="text-xs text-slate-500 mt-0.5">{user?.email}</p>
128
+ </div>
129
+ <div className="py-1">
130
+ <Link
131
+ href="/settings/account"
132
+ onClick={() => setShowDropdown(false)}
133
+ className="flex items-center gap-3 px-4 py-2.5 text-sm text-slate-400 hover:text-white hover:bg-white/5 transition"
134
+ >
135
+ <User className="w-4 h-4" />
136
+ {t('header.profile')}
137
+ </Link>
138
+ <Link
139
+ href="/settings/brain"
140
+ onClick={() => setShowDropdown(false)}
141
+ className="flex items-center gap-3 px-4 py-2.5 text-sm text-slate-400 hover:text-white hover:bg-white/5 transition"
142
+ >
143
+ <Settings className="w-4 h-4" />
144
+ {t('header.settings')}
145
+ </Link>
146
+ </div>
147
+ <div className="border-t border-white/10 py-1">
148
+ <button
149
+ onClick={() => { logout(); setShowDropdown(false) }}
150
+ className="flex items-center gap-3 px-4 py-2.5 text-sm text-red-400 hover:text-red-300 hover:bg-red-500/10 transition w-full text-left"
151
+ >
152
+ <LogOut className="w-4 h-4" />
153
+ {t('header.logout')}
154
+ </button>
155
+ </div>
156
+ </div>
157
+ </>
158
+ )}
159
+ </div>
160
  </div>
161
  </div>
162
  </header>
frontend/components/SecondaryNav.tsx CHANGED
@@ -120,42 +120,42 @@ export function SecondaryNav() {
120
  }, [isDragging, startX, scrollLeft])
121
 
122
  return (
123
- <div className="hidden md:flex lg:hidden w-full h-14 bg-black/20 backdrop-blur-3xl border-t border-white/5 sticky top-16 z-20 shadow-2xl">
124
- {/* Custom Styles for Neon Scrollbar */}
 
 
 
 
 
 
125
  <style jsx>{`
126
- .aurora-nav-container:hover .aurora-scroll::-webkit-scrollbar-thumb {
127
- opacity: 1;
128
- }
129
  .aurora-scroll::-webkit-scrollbar {
130
  height: 3px;
131
  background: transparent;
132
  }
133
  .aurora-scroll::-webkit-scrollbar-track {
134
- background: transparent;
135
  }
136
  .aurora-scroll::-webkit-scrollbar-thumb {
137
- background: #6366f1;
138
  border-radius: 99px;
139
- /* Ultra Neon Glow */
140
  box-shadow:
141
- 0 0 10px #6366f1,
142
- 0 0 20px rgba(99, 102, 241, 0.6),
143
- inset 0 0 4px #818cf8;
144
  cursor: pointer;
145
- transition: all 0.3s ease;
146
  }
147
  .aurora-scroll::-webkit-scrollbar-thumb:hover {
148
- background: #818cf8;
149
  box-shadow:
150
- 0 0 15px #818cf8,
151
- 0 0 30px rgba(129, 140, 248, 0.8),
152
- inset 0 0 6px #a5b4fc;
153
  }
154
- /* Smooth reveal on hover */
155
  .aurora-scroll {
156
  scrollbar-width: thin;
157
- scrollbar-color: #6366f1 transparent;
158
- transition: scrollbar-color 0.3s;
159
  }
160
  `}</style>
161
 
@@ -163,7 +163,10 @@ export function SecondaryNav() {
163
  ref={scrollContainerRef}
164
  onWheel={handleWheel}
165
  onMouseDown={handleMouseDown}
166
- className="aurora-nav-container flex items-center gap-1 px-4 overflow-x-auto w-full aurora-scroll cursor-grab active:cursor-grabbing select-none"
 
 
 
167
  style={{
168
  WebkitOverflowScrolling: 'touch'
169
  }}
@@ -180,8 +183,9 @@ export function SecondaryNav() {
180
  draggable={false}
181
  className={cn(
182
  "flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium whitespace-nowrap transition-all duration-300 shrink-0",
 
183
  active
184
- ? "text-indigo-400 bg-white/5 border border-white/10 shadow-[0_0_20px_rgba(99,102,241,0.1)]"
185
  : "text-slate-400 hover:text-white hover:bg-white/5"
186
  )}
187
  >
 
120
  }, [isDragging, startX, scrollLeft])
121
 
122
  return (
123
+ <div className="hidden md:flex lg:hidden w-full h-14 bg-white/[0.02] backdrop-blur-3xl saturate-[1.8] border-t border-white/10 sticky top-16 z-20 overflow-hidden shadow-2xl">
124
+ {/* Aurora Background Effects - Matching Header */}
125
+ <div className="absolute inset-0 pointer-events-none overflow-hidden">
126
+ <div className="absolute -bottom-[50%] -left-[5%] w-[45%] h-[200%] bg-indigo-500/10 blur-[80px] rounded-full" />
127
+ <div className="absolute -bottom-[50%] -right-[5%] w-[35%] h-[200%] bg-purple-500/10 blur-[80px] rounded-full" />
128
+ </div>
129
+
130
+ {/* Custom Styles for Ultra-Neon Scrollbar */}
131
  <style jsx>{`
 
 
 
132
  .aurora-scroll::-webkit-scrollbar {
133
  height: 3px;
134
  background: transparent;
135
  }
136
  .aurora-scroll::-webkit-scrollbar-track {
137
+ background: rgba(255, 255, 255, 0.01);
138
  }
139
  .aurora-scroll::-webkit-scrollbar-thumb {
140
+ background: linear-gradient(90deg, #22d3ee, #6366f1); /* Cyan to Indigo */
141
  border-radius: 99px;
142
+ /* Intense Neon Glow */
143
  box-shadow:
144
+ 0 0 12px rgba(34, 211, 238, 0.9),
145
+ 0 0 24px rgba(99, 102, 241, 0.5),
146
+ inset 0 0 4px rgba(255, 255, 255, 0.8);
147
  cursor: pointer;
 
148
  }
149
  .aurora-scroll::-webkit-scrollbar-thumb:hover {
150
+ background: linear-gradient(90deg, #67e8f9, #818cf8);
151
  box-shadow:
152
+ 0 0 18px rgba(34, 211, 238, 1),
153
+ 0 0 36px rgba(99, 102, 241, 0.7),
154
+ inset 0 0 6px rgba(255, 255, 255, 1);
155
  }
 
156
  .aurora-scroll {
157
  scrollbar-width: thin;
158
+ scrollbar-color: #22d3ee transparent;
 
159
  }
160
  `}</style>
161
 
 
163
  ref={scrollContainerRef}
164
  onWheel={handleWheel}
165
  onMouseDown={handleMouseDown}
166
+ className={cn(
167
+ "relative z-10 flex items-center gap-1 px-4 overflow-x-auto w-full aurora-scroll cursor-grab active:cursor-grabbing select-none",
168
+ isDragging && "cursor-grabbing"
169
+ )}
170
  style={{
171
  WebkitOverflowScrolling: 'touch'
172
  }}
 
183
  draggable={false}
184
  className={cn(
185
  "flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium whitespace-nowrap transition-all duration-300 shrink-0",
186
+ isDragging && "pointer-events-none", // Crucial: prevent cursor change/hover during drag
187
  active
188
+ ? "text-indigo-400 bg-white/5 border border-white/10 shadow-[0_0_20px_rgba(99,102,241,0.15)]"
189
  : "text-slate-400 hover:text-white hover:bg-white/5"
190
  )}
191
  >