linguabot commited on
Commit
02f2d05
·
verified ·
1 Parent(s): bcfd9de

Upload folder using huggingface_hub

Browse files
client/src/components/Layout.tsx CHANGED
@@ -133,29 +133,25 @@ const Layout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
133
  window.location.href = '/login';
134
  };
135
 
136
- // Map each route to a custom icon path in /public/icons
137
- const navIconFor = (name: string) => {
138
- switch (name) {
139
- case 'Home': return '/icons/home.svg';
140
- case 'Tutorial Tasks': return '/icons/tutorial tasks.svg';
141
- case 'Weekly Practice': return '/icons/weekly practice.svg';
142
- case 'Votes': return '/icons/votes.svg';
143
- case 'Toolkit': return '/icons/toolkit.svg';
144
- case 'Slides': return '/icons/slides.svg';
145
- case 'Feedback': return '/icons/feedback.svg';
146
- case 'Manage': return '/icons/049-cyber security.svg';
147
- default: return '/icons/home.svg';
148
- }
149
- };
150
 
151
  let navigation = [
152
- { name: 'Home', href: '/dashboard' },
153
- { name: 'Tutorial Tasks', href: '/tutorial-tasks' },
154
- { name: 'Weekly Practice', href: '/weekly-practice' },
155
- { name: 'Votes', href: '/votes' },
156
- { name: 'Toolkit', href: '/toolkit' },
157
- { name: 'Slides', href: '/slides' },
158
- { name: 'Feedback', href: '/feedback' },
159
  ];
160
 
161
  // Hide Slides for visitors
@@ -165,7 +161,7 @@ const Layout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
165
 
166
  // Add Manage link for admin users
167
  if (user?.role === 'admin') {
168
- navigation.push({ name: 'Manage', href: '/manage' });
169
  }
170
 
171
  return (
@@ -182,18 +178,18 @@ const Layout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
182
  <div className="flex">
183
  {/* Sidebar */}
184
  <aside className="hidden md:flex md:flex-col w-60 min-h-[calc(100vh-56px)] border-r border-ui-border bg-ui-panel">
185
- <nav className="p-4 space-y-2.5 flex-1" style={{ fontFamily: 'Champion, BebasNeue, Inter, system-ui, sans-serif', letterSpacing: '0.01in' }}>
186
  {navigation.map((item) => {
187
  const isActive = location.pathname === item.href;
188
  return (
189
  <Link
190
  key={item.name}
191
  to={item.href}
192
- className={`flex items-center px-4 py-3 rounded-lg text-[0.95rem] font-medium transition-colors ${
193
- isActive ? 'bg-ui-bg text-ui-text shadow-[0_0_6px_rgba(14,165,233,0.45)]' : 'text-ui-text/80 hover:bg-ui-panel/60'
194
  }`}
195
  >
196
- <img src={navIconFor(item.name)} alt="" className="h-6 w-6 mr-3" style={{ filter: 'invert(39%) sepia(92%) saturate(1730%) hue-rotate(177deg) brightness(97%) contrast(101%)' }} />
197
  <span>{item.name}</span>
198
  </Link>
199
  );
 
133
  window.location.href = '/login';
134
  };
135
 
136
+ // Use default heroicons for nav icons
137
+ import {
138
+ HomeIcon,
139
+ AcademicCapIcon,
140
+ BookOpenIcon,
141
+ HandThumbUpIcon,
142
+ WrenchScrewdriverIcon,
143
+ ChatBubbleLeftRightIcon,
144
+ Cog6ToothIcon
145
+ } from '@heroicons/react/24/outline';
 
 
 
 
146
 
147
  let navigation = [
148
+ { name: 'Home', href: '/dashboard', icon: HomeIcon },
149
+ { name: 'Tutorial Tasks', href: '/tutorial-tasks', icon: AcademicCapIcon },
150
+ { name: 'Weekly Practice', href: '/weekly-practice', icon: BookOpenIcon },
151
+ { name: 'Votes', href: '/votes', icon: HandThumbUpIcon },
152
+ { name: 'Toolkit', href: '/toolkit', icon: WrenchScrewdriverIcon },
153
+ { name: 'Slides', href: '/slides', icon: BookOpenIcon },
154
+ { name: 'Feedback', href: '/feedback', icon: ChatBubbleLeftRightIcon },
155
  ];
156
 
157
  // Hide Slides for visitors
 
161
 
162
  // Add Manage link for admin users
163
  if (user?.role === 'admin') {
164
+ navigation.push({ name: 'Manage', href: '/manage', icon: Cog6ToothIcon });
165
  }
166
 
167
  return (
 
178
  <div className="flex">
179
  {/* Sidebar */}
180
  <aside className="hidden md:flex md:flex-col w-60 min-h-[calc(100vh-56px)] border-r border-ui-border bg-ui-panel">
181
+ <nav className="p-4 space-y-2 flex-1">
182
  {navigation.map((item) => {
183
  const isActive = location.pathname === item.href;
184
  return (
185
  <Link
186
  key={item.name}
187
  to={item.href}
188
+ className={`flex items-center px-3 py-2 rounded-lg text-[0.95rem] font-medium transition-colors ${
189
+ isActive ? 'bg-ui-bg text-ui-text shadow-[0_0_6px_rgba(20,163,255,0.35)]' : 'text-ui-text/80 hover:bg-ui-panel/60'
190
  }`}
191
  >
192
+ <item.icon className="h-5 w-5 mr-3 text-ui-neonCyan" />
193
  <span>{item.name}</span>
194
  </Link>
195
  );
client/src/index.css CHANGED
@@ -4,7 +4,7 @@
4
 
5
  @layer base {
6
  html {
7
- font-family: 'Exo2', 'Inter', system-ui, sans-serif;
8
  }
9
  body {
10
  @apply bg-ui-bg text-ui-text;
 
4
 
5
  @layer base {
6
  html {
7
+ font-family: 'Inter', system-ui, sans-serif;
8
  }
9
  body {
10
  @apply bg-ui-bg text-ui-text;