BUYELELE commited on
Commit
8900547
·
verified ·
1 Parent(s): 5c28693

import React, { useState, useEffect } from 'react'; import { navItems } from '../data/sondelaData'; const Sidebar = ({ onToggle }) => { const [activeItem, setActiveItem] = useState('dashboard'); const [collapsed, setCollapsed] = useState(false); const [expandedSection, setExpandedSection] = useState(null); useEffect(() => { if (onToggle) { onToggle(collapsed); } }, [collapsed, onToggle]); const toggleSidebar = () => { setCollapsed(!collapsed); // Reset expanded section when collapsing sidebar if (!collapsed) { setExpandedSection(null); } }; // Group navigation items by section const navSections = navItems.reduce((acc, item) => { if (!acc[item.section]) { acc[item.section] = []; } acc[item.section].push(item); return acc; }, {}); // Toggle section expansion const toggleSection = (section) => { if (collapsed) return; // Don't toggle when sidebar is collapsed setExpandedSection(expandedSection === section ? null : section); }; return ( <div className={`sidebar bg-gradient-to-b from-blue-900 to-blue-800 text-white shadow-xl ${collapsed ? 'collapsed w-20' : 'w-64'} flex flex-col h-screen transition-all duration-300`} > {/* Logo */} <div className="p-4 flex items-center justify-between border-b border-blue-800"> <div className="flex items-center"> <div className="bg-white p-2 rounded-lg"> <i className="fas fa-shield-alt text-blue-800 text-xl"></i> </div> {!collapsed && ( <h1 className="logo-text text-xl font-bold ml-3">Sondela</h1> )} </div> {/* Collapse Button */} <button className="text-blue-200 hover:text-white hover:bg-blue-700 p-1.5 rounded-md transition-colors" onClick={toggleSidebar} aria-label={collapsed ? "Expand sidebar" : "Collapse sidebar"} > <i className={`fas fa-chevron-${collapsed ? 'right' : 'left'}`}></i> </button> </div> {/* User Profile */} <div className="p-4 flex items-center border-b border-blue-800"> <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="User" className={`${collapsed ? 'w-10 h-10 mx-auto' : 'w-10 h-10'} rounded-full border-2 border-white shadow-md`} /> {!collapsed && ( <div className="ml-3"> <p className="font-semibold">Cmdt. Williams</p> <div className="flex items-center"> <span className="inline-block w-2 h-2 bg-green-500 rounded-full mr-1.5"></span> <p className="text-blue-200 text-xs">Online</p> </div> </div> )} </div> {/* Navigation */} <nav className="flex-1 overflow-y-auto custom-scrollbar pt-2"> {Object.keys(navSections).map((section) => ( <div key={section} className="mb-2"> {/* Section Header */} {!collapsed && ( <div className="flex items-center justify-between px-4 py-2 text-blue-300 text-xs uppercase font-semibold cursor-pointer hover:text-white" onClick={() => toggleSection(section)} > <span>{section}</span> {section !== 'Main' && ( <i className={`fas fa-chevron-${expandedSection === section ? 'down' : 'right'} text-xs`}></i> )} </div> )} {/* Section Items */} <ul className={`${ collapsed || section === 'Main' || expandedSection === section ? 'max-h-96' : 'max-h-0' } overflow-hidden transition-all duration-300`}> {navSections[section].map((item) => ( <li key={item.id} className="px-2"> <a href="#" className={`nav-item flex items-center rounded-lg ${ collapsed ? 'justify-center mx-auto py-3 px-1' : 'py-2.5 px-4' } hover:bg-blue-800/50 transition-all duration-200 ${ activeItem === item.id ? 'bg-blue-800 text-white' : 'text-blue-100 hover:text-white' }`} onClick={() => setActiveItem(item.id)} > <div className="relative"> <i className={`fas fa-${item.icon} ${collapsed ? 'text-xl' : ''}`}></i> {item.badge && ( <span className="absolute -right-2 -top-2 bg-red-500 text-white text-xs rounded-full w-4 h-4 flex items-center justify-center"> {item.badge} </span> )} </div> {!collapsed && ( <> <span className="ml-3 flex-grow">{item.name}</span> {item.badge && ( <span className="bg-red-500 text-xs text-white px-2 py-0.5 rounded-full"> {item.badge} </span> )} </> )} </a> </li> ))} </ul> </div> ))} </nav> {/* Footer */} <div className="p-4 border-t border-blue-800"> {collapsed ? ( <div className="text-center"> <button className="text-blue-200 hover:text-white p-2 rounded-full hover:bg-blue-700"> <i className="fas fa-sign-out-alt"></i> </button> </div> ) : ( <div className="flex items-center justify-between"> <div> <p className="text-sm text-blue-200">System Status</p> <p className="text-xs flex items-center"> <span className="w-2 h-2 bg-green-500 rounded-full inline-block mr-1"></span> Online </p> </div> <button className="text-blue-200 hover:text-white p-2 rounded hover:bg-blue-700"> <i className="fas fa-sign-out-alt mr-1"></i> {!collapsed && <span>Logout</span>} </button> </div> )} </div> </div> ); }; export default Sidebar; - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +418 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Sondela
3
- emoji: 🦀
4
- colorFrom: red
5
- colorTo: indigo
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: sondela
3
+ emoji: 🐳
4
+ colorFrom: pink
5
+ colorTo: red
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,418 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Sondela Sidebar</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .sidebar {
11
+ transition: all 0.3s ease;
12
+ }
13
+ .nav-item.active {
14
+ background-color: rgba(30, 58, 138, 1);
15
+ color: white;
16
+ }
17
+ .nav-item:not(.active) {
18
+ color: rgb(191, 219, 254);
19
+ }
20
+ .nav-item:not(.active):hover {
21
+ background-color: rgba(30, 58, 138, 0.5);
22
+ color: white;
23
+ }
24
+ .custom-scrollbar::-webkit-scrollbar {
25
+ width: 4px;
26
+ }
27
+ .custom-scrollbar::-webkit-scrollbar-track {
28
+ background: rgba(30, 58, 138, 0.3);
29
+ }
30
+ .custom-scrollbar::-webkit-scrollbar-thumb {
31
+ background-color: rgba(191, 219, 254, 0.5);
32
+ border-radius: 20px;
33
+ }
34
+ @media (max-width: 768px) {
35
+ .sidebar {
36
+ position: fixed;
37
+ z-index: 50;
38
+ transform: translateX(-100%);
39
+ }
40
+ .sidebar.open {
41
+ transform: translateX(0);
42
+ }
43
+ .sidebar.collapsed {
44
+ transform: translateX(-100%);
45
+ }
46
+ .overlay {
47
+ display: none;
48
+ position: fixed;
49
+ top: 0;
50
+ left: 0;
51
+ right: 0;
52
+ bottom: 0;
53
+ background-color: rgba(0, 0, 0, 0.5);
54
+ z-index: 40;
55
+ }
56
+ .overlay.active {
57
+ display: block;
58
+ }
59
+ }
60
+ </style>
61
+ </head>
62
+ <body class="bg-gray-100">
63
+ <div class="flex h-screen">
64
+ <!-- Overlay for mobile -->
65
+ <div class="overlay" id="overlay"></div>
66
+
67
+ <!-- Sidebar -->
68
+ <div class="sidebar bg-gradient-to-b from-blue-900 to-blue-800 text-white shadow-xl w-64 flex flex-col h-screen transition-all duration-300" id="sidebar">
69
+ <!-- Logo -->
70
+ <div class="p-4 flex items-center justify-between border-b border-blue-800">
71
+ <div class="flex items-center">
72
+ <div class="bg-white p-2 rounded-lg">
73
+ <i class="fas fa-shield-alt text-blue-800 text-xl"></i>
74
+ </div>
75
+ <h1 class="logo-text text-xl font-bold ml-3">Sondela</h1>
76
+ </div>
77
+ <!-- Collapse Button -->
78
+ <button class="text-blue-200 hover:text-white hover:bg-blue-700 p-1.5 rounded-md transition-colors lg:block hidden" onclick="toggleSidebar()">
79
+ <i class="fas fa-chevron-left"></i>
80
+ </button>
81
+ <!-- Mobile close button -->
82
+ <button class="text-blue-200 hover:text-white hover:bg-blue-700 p-1.5 rounded-md transition-colors lg:hidden" onclick="closeMobileSidebar()">
83
+ <i class="fas fa-times"></i>
84
+ </button>
85
+ </div>
86
+
87
+ <!-- User Profile -->
88
+ <div class="p-4 flex items-center border-b border-blue-800">
89
+ <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="User" class="w-10 h-10 rounded-full border-2 border-white shadow-md">
90
+ <div class="ml-3">
91
+ <p class="font-semibold">Cmdt. Williams</p>
92
+ <div class="flex items-center">
93
+ <span class="inline-block w-2 h-2 bg-green-500 rounded-full mr-1.5"></span>
94
+ <p class="text-blue-200 text-xs">Online</p>
95
+ </div>
96
+ </div>
97
+ </div>
98
+
99
+ <!-- Navigation -->
100
+ <nav class="flex-1 overflow-y-auto custom-scrollbar pt-2" id="nav">
101
+ <!-- Main Section -->
102
+ <div class="mb-2">
103
+ <div class="flex items-center justify-between px-4 py-2 text-blue-300 text-xs uppercase font-semibold">
104
+ <span>Main</span>
105
+ </div>
106
+ <ul class="max-h-96">
107
+ <li class="px-2">
108
+ <a href="#" class="nav-item active flex items-center py-2.5 px-4 rounded-lg hover:bg-blue-800/50 transition-all duration-200">
109
+ <div class="relative">
110
+ <i class="fas fa-tachometer-alt"></i>
111
+ </div>
112
+ <span class="ml-3 flex-grow">Dashboard</span>
113
+ </a>
114
+ </li>
115
+ <li class="px-2">
116
+ <a href="#" class="nav-item flex items-center py-2.5 px-4 rounded-lg hover:bg-blue-800/50 transition-all duration-200">
117
+ <div class="relative">
118
+ <i class="fas fa-envelope"></i>
119
+ <span class="absolute -right-2 -top-2 bg-red-500 text-white text-xs rounded-full w-4 h-4 flex items-center justify-center">3</span>
120
+ </div>
121
+ <span class="ml-3 flex-grow">Messages</span>
122
+ <span class="bg-red-500 text-xs text-white px-2 py-0.5 rounded-full">3</span>
123
+ </a>
124
+ </li>
125
+ <li class="px-2">
126
+ <a href="#" class="nav-item flex items-center py-2.5 px-4 rounded-lg hover:bg-blue-800/50 transition-all duration-200">
127
+ <div class="relative">
128
+ <i class="fas fa-calendar"></i>
129
+ </div>
130
+ <span class="ml-3 flex-grow">Calendar</span>
131
+ </a>
132
+ </li>
133
+ </ul>
134
+ </div>
135
+
136
+ <!-- Operations Section -->
137
+ <div class="mb-2">
138
+ <div class="flex items-center justify-between px-4 py-2 text-blue-300 text-xs uppercase font-semibold cursor-pointer hover:text-white" onclick="toggleSection('operations')">
139
+ <span>Operations</span>
140
+ <i class="fas fa-chevron-down text-xs" id="operations-chevron"></i>
141
+ </div>
142
+ <ul class="max-h-96 overflow-hidden" id="operations-section">
143
+ <li class="px-2">
144
+ <a href="#" class="nav-item flex items-center py-2.5 px-4 rounded-lg hover:bg-blue-800/50 transition-all duration-200">
145
+ <div class="relative">
146
+ <i class="fas fa-users"></i>
147
+ </div>
148
+ <span class="ml-3 flex-grow">Personnel</span>
149
+ </a>
150
+ </li>
151
+ <li class="px-2">
152
+ <a href="#" class="nav-item flex items-center py-2.5 px-4 rounded-lg hover:bg-blue-800/50 transition-all duration-200">
153
+ <div class="relative">
154
+ <i class="fas fa-map-marked-alt"></i>
155
+ </div>
156
+ <span class="ml-3 flex-grow">Locations</span>
157
+ </a>
158
+ </li>
159
+ <li class="px-2">
160
+ <a href="#" class="nav-item flex items-center py-2.5 px-4 rounded-lg hover:bg-blue-800/50 transition-all duration-200">
161
+ <div class="relative">
162
+ <i class="fas fa-tasks"></i>
163
+ </div>
164
+ <span class="ml-3 flex-grow">Tasks</span>
165
+ <span class="bg-yellow-500 text-xs text-white px-2 py-0.5 rounded-full">5</span>
166
+ </a>
167
+ </li>
168
+ </ul>
169
+ </div>
170
+
171
+ <!-- Reports Section -->
172
+ <div class="mb-2">
173
+ <div class="flex items-center justify-between px-4 py-2 text-blue-300 text-xs uppercase font-semibold cursor-pointer hover:text-white" onclick="toggleSection('reports')">
174
+ <span>Reports</span>
175
+ <i class="fas fa-chevron-right text-xs" id="reports-chevron"></i>
176
+ </div>
177
+ <ul class="max-h-0 overflow-hidden" id="reports-section">
178
+ <li class="px-2">
179
+ <a href="#" class="nav-item flex items-center py-2.5 px-4 rounded-lg hover:bg-blue-800/50 transition-all duration-200">
180
+ <div class="relative">
181
+ <i class="fas fa-chart-line"></i>
182
+ </div>
183
+ <span class="ml-3 flex-grow">Analytics</span>
184
+ </a>
185
+ </li>
186
+ <li class="px-2">
187
+ <a href="#" class="nav-item flex items-center py-2.5 px-4 rounded-lg hover:bg-blue-800/50 transition-all duration-200">
188
+ <div class="relative">
189
+ <i class="fas fa-file-alt"></i>
190
+ </div>
191
+ <span class="ml-3 flex-grow">Documents</span>
192
+ </a>
193
+ </li>
194
+ </ul>
195
+ </div>
196
+ </nav>
197
+
198
+ <!-- Footer -->
199
+ <div class="p-4 border-t border-blue-800">
200
+ <div class="flex items-center justify-between">
201
+ <div>
202
+ <p class="text-sm text-blue-200">System Status</p>
203
+ <p class="text-xs flex items-center">
204
+ <span class="w-2 h-2 bg-green-500 rounded-full inline-block mr-1"></span>
205
+ Online
206
+ </p>
207
+ </div>
208
+ <button class="text-blue-200 hover:text-white p-2 rounded hover:bg-blue-700">
209
+ <i class="fas fa-sign-out-alt mr-1"></i>
210
+ <span>Logout</span>
211
+ </button>
212
+ </div>
213
+ </div>
214
+ </div>
215
+
216
+ <!-- Collapsed Sidebar -->
217
+ <div class="sidebar bg-gradient-to-b from-blue-900 to-blue-800 text-white shadow-xl w-20 flex flex-col h-screen transition-all duration-300 hidden" id="collapsed-sidebar">
218
+ <!-- Logo -->
219
+ <div class="p-4 flex items-center justify-center border-b border-blue-800">
220
+ <div class="bg-white p-2 rounded-lg">
221
+ <i class="fas fa-shield-alt text-blue-800 text-xl"></i>
222
+ </div>
223
+ </div>
224
+
225
+ <!-- User Profile -->
226
+ <div class="p-4 flex items-center justify-center border-b border-blue-800">
227
+ <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="User" class="w-10 h-10 rounded-full border-2 border-white shadow-md">
228
+ </div>
229
+
230
+ <!-- Navigation -->
231
+ <nav class="flex-1 overflow-y-auto custom-scrollbar pt-2">
232
+ <!-- Main Section -->
233
+ <div class="mb-2">
234
+ <ul class="max-h-96">
235
+ <li class="px-2">
236
+ <a href="#" class="nav-item active flex items-center justify-center py-3 px-1 rounded-lg hover:bg-blue-800/50 transition-all duration-200 mx-auto">
237
+ <div class="relative">
238
+ <i class="fas fa-tachometer-alt text-xl"></i>
239
+ </div>
240
+ </a>
241
+ </li>
242
+ <li class="px-2">
243
+ <a href="#" class="nav-item flex items-center justify-center py-3 px-1 rounded-lg hover:bg-blue-800/50 transition-all duration-200 mx-auto">
244
+ <div class="relative">
245
+ <i class="fas fa-envelope text-xl"></i>
246
+ <span class="absolute -right-2 -top-2 bg-red-500 text-white text-xs rounded-full w-4 h-4 flex items-center justify-center">3</span>
247
+ </div>
248
+ </a>
249
+ </li>
250
+ <li class="px-2">
251
+ <a href="#" class="nav-item flex items-center justify-center py-3 px-1 rounded-lg hover:bg-blue-800/50 transition-all duration-200 mx-auto">
252
+ <div class="relative">
253
+ <i class="fas fa-calendar text-xl"></i>
254
+ </div>
255
+ </a>
256
+ </li>
257
+ </ul>
258
+ </div>
259
+
260
+ <!-- Operations Section -->
261
+ <div class="mb-2">
262
+ <ul class="max-h-96">
263
+ <li class="px-2">
264
+ <a href="#" class="nav-item flex items-center justify-center py-3 px-1 rounded-lg hover:bg-blue-800/50 transition-all duration-200 mx-auto">
265
+ <div class="relative">
266
+ <i class="fas fa-users text-xl"></i>
267
+ </div>
268
+ </a>
269
+ </li>
270
+ <li class="px-2">
271
+ <a href="#" class="nav-item flex items-center justify-center py-3 px-1 rounded-lg hover:bg-blue-800/50 transition-all duration-200 mx-auto">
272
+ <div class="relative">
273
+ <i class="fas fa-map-marked-alt text-xl"></i>
274
+ </div>
275
+ </a>
276
+ </li>
277
+ <li class="px-2">
278
+ <a href="#" class="nav-item flex items-center justify-center py-3 px-1 rounded-lg hover:bg-blue-800/50 transition-all duration-200 mx-auto">
279
+ <div class="relative">
280
+ <i class="fas fa-tasks text-xl"></i>
281
+ </div>
282
+ </a>
283
+ </li>
284
+ </ul>
285
+ </div>
286
+
287
+ <!-- Reports Section -->
288
+ <div class="mb-2">
289
+ <ul>
290
+ <li class="px-2">
291
+ <a href="#" class="nav-item flex items-center justify-center py-3 px-1 rounded-lg hover:bg-blue-800/50 transition-all duration-200 mx-auto">
292
+ <div class="relative">
293
+ <i class="fas fa-chart-line text-xl"></i>
294
+ </div>
295
+ </a>
296
+ </li>
297
+ <li class="px-2">
298
+ <a href="#" class="nav-item flex items-center justify-center py-3 px-1 rounded-lg hover:bg-blue-800/50 transition-all duration-200 mx-auto">
299
+ <div class="relative">
300
+ <i class="fas fa-file-alt text-xl"></i>
301
+ </div>
302
+ </a>
303
+ </li>
304
+ </ul>
305
+ </div>
306
+ </nav>
307
+
308
+ <!-- Footer -->
309
+ <div class="p-4 border-t border-blue-800">
310
+ <div class="text-center">
311
+ <button class="text-blue-200 hover:text-white p-2 rounded-full hover:bg-blue-700">
312
+ <i class="fas fa-sign-out-alt"></i>
313
+ </button>
314
+ </div>
315
+ </div>
316
+ </div>
317
+
318
+ <!-- Main Content -->
319
+ <div class="flex-1 overflow-auto">
320
+ <!-- Mobile menu button -->
321
+ <div class="lg:hidden p-4">
322
+ <button class="text-blue-900 p-2 rounded-md" onclick="openMobileSidebar()">
323
+ <i class="fas fa-bars text-xl"></i>
324
+ </button>
325
+ </div>
326
+
327
+ <div class="p-8">
328
+ <h1 class="text-3xl font-bold text-blue-900 mb-6">Dashboard</h1>
329
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
330
+ <div class="bg-white p-6 rounded-lg shadow-md">
331
+ <h2 class="text-xl font-semibold mb-4">Recent Activity</h2>
332
+ <p class="text-gray-600">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
333
+ </div>
334
+ <div class="bg-white p-6 rounded-lg shadow-md">
335
+ <h2 class="text-xl font-semibold mb-4">Notifications</h2>
336
+ <p class="text-gray-600">Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
337
+ </div>
338
+ <div class="bg-white p-6 rounded-lg shadow-md">
339
+ <h2 class="text-xl font-semibold mb-4">Quick Actions</h2>
340
+ <p class="text-gray-600">Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.</p>
341
+ </div>
342
+ </div>
343
+ </div>
344
+ </div>
345
+ </div>
346
+
347
+ <script>
348
+ // Toggle sidebar between expanded and collapsed states
349
+ function toggleSidebar() {
350
+ const sidebar = document.getElementById('sidebar');
351
+ const collapsedSidebar = document.getElementById('collapsed-sidebar');
352
+
353
+ if (sidebar.classList.contains('hidden')) {
354
+ sidebar.classList.remove('hidden');
355
+ collapsedSidebar.classList.add('hidden');
356
+ } else {
357
+ sidebar.classList.add('hidden');
358
+ collapsedSidebar.classList.remove('hidden');
359
+ }
360
+ }
361
+
362
+ // Toggle section expansion
363
+ function toggleSection(section) {
364
+ const sectionElement = document.getElementById(`${section}-section`);
365
+ const chevron = document.getElementById(`${section}-chevron`);
366
+
367
+ if (sectionElement.classList.contains('max-h-96')) {
368
+ sectionElement.classList.remove('max-h-96');
369
+ sectionElement.classList.add('max-h-0');
370
+ chevron.classList.remove('fa-chevron-down');
371
+ chevron.classList.add('fa-chevron-right');
372
+ } else {
373
+ sectionElement.classList.remove('max-h-0');
374
+ sectionElement.classList.add('max-h-96');
375
+ chevron.classList.remove('fa-chevron-right');
376
+ chevron.classList.add('fa-chevron-down');
377
+ }
378
+ }
379
+
380
+ // Mobile sidebar functions
381
+ function openMobileSidebar() {
382
+ document.getElementById('sidebar').classList.add('open');
383
+ document.getElementById('overlay').classList.add('active');
384
+ }
385
+
386
+ function closeMobileSidebar() {
387
+ document.getElementById('sidebar').classList.remove('open');
388
+ document.getElementById('overlay').classList.remove('active');
389
+ }
390
+
391
+ // Close sidebar when clicking on overlay
392
+ document.getElementById('overlay').addEventListener('click', closeMobileSidebar);
393
+
394
+ // Set active nav item
395
+ document.querySelectorAll('.nav-item').forEach(item => {
396
+ item.addEventListener('click', function() {
397
+ document.querySelectorAll('.nav-item').forEach(i => i.classList.remove('active'));
398
+ this.classList.add('active');
399
+
400
+ // Close mobile sidebar after selection
401
+ if (window.innerWidth < 768) {
402
+ closeMobileSidebar();
403
+ }
404
+ });
405
+ });
406
+
407
+ // Responsive behavior
408
+ function handleResize() {
409
+ if (window.innerWidth >= 768) {
410
+ document.getElementById('sidebar').classList.remove('open');
411
+ document.getElementById('overlay').classList.remove('active');
412
+ }
413
+ }
414
+
415
+ window.addEventListener('resize', handleResize);
416
+ </script>
417
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=BUYELELE/sondela" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
418
+ </html>