razen5556 commited on
Commit
1196076
·
verified ·
1 Parent(s): ebfcb42

undefined - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +1432 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Utility Dashboard
3
- emoji: 📚
4
- colorFrom: gray
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: utility-dashboard
3
+ emoji: 🐳
4
+ colorFrom: red
5
+ colorTo: green
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,1432 @@
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>Utility Dashboard</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
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
10
+ <script src="https://cdn.jsdelivr.net/npm/jsbarcode@3.11.5/dist/JsBarcode.all.min.js"></script>
11
+ <style>
12
+ body {
13
+ font-family: 'Inter', sans-serif;
14
+ background-size: cover;
15
+ background-position: center;
16
+ background-attachment: fixed;
17
+ transition: background-image 0.3s ease;
18
+ }
19
+ .sidebar {
20
+ transition: all 0.3s ease;
21
+ }
22
+ .sidebar-collapsed {
23
+ width: 80px;
24
+ }
25
+ .sidebar-collapsed .nav-text {
26
+ display: none;
27
+ }
28
+ .sidebar-expanded {
29
+ width: 250px;
30
+ }
31
+ .main-content {
32
+ transition: margin-left 0.3s ease;
33
+ }
34
+ .signature-canvas {
35
+ border: 1px solid #4b5563;
36
+ background-color: #1f2937;
37
+ }
38
+ .tool-section {
39
+ display: none;
40
+ }
41
+ .tool-section.active {
42
+ display: block;
43
+ }
44
+ .bmi-category {
45
+ font-weight: bold;
46
+ }
47
+ .underweight {
48
+ color: #3b82f6;
49
+ }
50
+ .normal {
51
+ color: #10b981;
52
+ }
53
+ .overweight {
54
+ color: #f59e0b;
55
+ }
56
+ .obese {
57
+ color: #ef4444;
58
+ }
59
+ </style>
60
+ </head>
61
+ <body class="bg-gray-900 text-gray-200 min-h-screen flex">
62
+ <!-- Sidebar -->
63
+ <div class="sidebar bg-gray-800 h-screen fixed sidebar-expanded" id="sidebar">
64
+ <div class="p-4 flex items-center justify-between border-b border-gray-700">
65
+ <h1 class="text-xl font-bold text-white">Utility Dashboard</h1>
66
+ <button id="toggleSidebar" class="text-gray-400 hover:text-white md:hidden">
67
+ <i class="fas fa-bars"></i>
68
+ </button>
69
+ </div>
70
+ <nav class="mt-6">
71
+ <ul>
72
+ <li>
73
+ <a href="#" data-section="overview" class="nav-item flex items-center px-4 py-3 text-gray-300 hover:bg-gray-700 hover:text-white border-l-4 border-transparent hover:border-blue-500">
74
+ <i class="fas fa-home w-6 text-center"></i>
75
+ <span class="nav-text ml-3">Overview</span>
76
+ </a>
77
+ </li>
78
+ <li>
79
+ <a href="#" data-section="bmi-calculator" class="nav-item flex items-center px-4 py-3 text-gray-300 hover:bg-gray-700 hover:text-white border-l-4 border-transparent hover:border-blue-500">
80
+ <i class="fas fa-weight w-6 text-center"></i>
81
+ <span class="nav-text ml-3">BMI Calculator</span>
82
+ </a>
83
+ </li>
84
+ <li>
85
+ <a href="#" data-section="city-locator" class="nav-item flex items-center px-4 py-3 text-gray-300 hover:bg-gray-700 hover:text-white border-l-4 border-transparent hover:border-blue-500">
86
+ <i class="fas fa-map-marker-alt w-6 text-center"></i>
87
+ <span class="nav-text ml-3">City Locator</span>
88
+ </a>
89
+ </li>
90
+ <li>
91
+ <a href="#" data-section="high-schools" class="nav-item flex items-center px-4 py-3 text-gray-300 hover:bg-gray-700 hover:text-white border-l-4 border-transparent hover:border-blue-500">
92
+ <i class="fas fa-school w-6 text-center"></i>
93
+ <span class="nav-text ml-3">High Schools</span>
94
+ </a>
95
+ </li>
96
+ <li>
97
+ <a href="#" data-section="recovery-emails" class="nav-item flex items-center px-4 py-3 text-gray-300 hover:bg-gray-700 hover:text-white border-l-4 border-transparent hover:border-blue-500">
98
+ <i class="fas fa-envelope w-6 text-center"></i>
99
+ <span class="nav-text ml-3">Recovery Emails</span>
100
+ </a>
101
+ </li>
102
+ <li>
103
+ <a href="#" data-section="barcode-generator" class="nav-item flex items-center px-4 py-3 text-gray-300 hover:bg-gray-700 hover:text-white border-l-4 border-transparent hover:border-blue-500">
104
+ <i class="fas fa-barcode w-6 text-center"></i>
105
+ <span class="nav-text ml-3">Barcode Generator</span>
106
+ </a>
107
+ </li>
108
+ <li>
109
+ <a href="#" data-section="password-generator" class="nav-item flex items-center px-4 py-3 text-gray-300 hover:bg-gray-700 hover:text-white border-l-4 border-transparent hover:border-blue-500">
110
+ <i class="fas fa-key w-6 text-center"></i>
111
+ <span class="nav-text ml-3">Password Generator</span>
112
+ </a>
113
+ </li>
114
+ <li>
115
+ <a href="#" data-section="signature-generator" class="nav-item flex items-center px-4 py-3 text-gray-300 hover:bg-gray-700 hover:text-white border-l-4 border-transparent hover:border-blue-500">
116
+ <i class="fas fa-signature w-6 text-center"></i>
117
+ <span class="nav-text ml-3">Signature Generator</span>
118
+ </a>
119
+ </li>
120
+ <li>
121
+ <a href="#" data-section="colleges" class="nav-item flex items-center px-4 py-3 text-gray-300 hover:bg-gray-700 hover:text-white border-l-4 border-transparent hover:border-blue-500">
122
+ <i class="fas fa-university w-6 text-center"></i>
123
+ <span class="nav-text ml-3">Colleges</span>
124
+ </a>
125
+ </li>
126
+ </ul>
127
+ </nav>
128
+ <div class="absolute bottom-0 w-full p-4 border-t border-gray-700">
129
+ <button id="logoutBtn" class="w-full flex items-center justify-center px-4 py-2 text-gray-300 hover:bg-gray-700 hover:text-white rounded">
130
+ <i class="fas fa-sign-out-alt w-6 text-center"></i>
131
+ <span class="nav-text ml-3">Logout</span>
132
+ </button>
133
+ </div>
134
+ </div>
135
+
136
+ <!-- Main Content -->
137
+ <div class="main-content flex-1 ml-0 md:ml-64 lg:ml-72" id="mainContent">
138
+ <!-- Header -->
139
+ <header class="bg-gray-800 shadow-md p-4 flex items-center justify-between sticky top-0 z-10">
140
+ <div>
141
+ <h2 class="text-xl font-semibold text-white" id="currentSectionTitle">Overview</h2>
142
+ </div>
143
+ <div class="flex items-center space-x-4">
144
+ <div class="relative">
145
+ <input type="text" placeholder="Search..." class="bg-gray-700 text-white px-4 py-2 rounded-full w-40 md:w-64 focus:outline-none focus:ring-2 focus:ring-blue-500">
146
+ <i class="fas fa-search absolute right-3 top-3 text-gray-400"></i>
147
+ </div>
148
+ <button id="settingsBtn" class="text-gray-400 hover:text-white">
149
+ <i class="fas fa-cog text-xl"></i>
150
+ </button>
151
+ <div class="flex items-center">
152
+ <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="Profile" class="w-10 h-10 rounded-full border-2 border-blue-500">
153
+ <span class="ml-2 hidden md:inline">John Doe</span>
154
+ </div>
155
+ </div>
156
+ </header>
157
+
158
+ <!-- Tool Sections -->
159
+ <main class="p-6">
160
+ <!-- Overview Section -->
161
+ <section id="overview" class="tool-section active">
162
+ <div class="bg-gray-800 rounded-lg shadow-lg p-6">
163
+ <h1 class="text-3xl font-bold text-white mb-4">Welcome to Utility Dashboard</h1>
164
+ <p class="text-gray-300 mb-6">A collection of useful tools and utilities all in one place. Select a tool from the sidebar to get started.</p>
165
+
166
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
167
+ <div class="bg-gray-700 rounded-lg p-6 hover:bg-gray-600 transition cursor-pointer" data-section="bmi-calculator">
168
+ <div class="flex items-center mb-4">
169
+ <div class="bg-blue-500 p-3 rounded-full mr-4">
170
+ <i class="fas fa-weight text-white"></i>
171
+ </div>
172
+ <h3 class="text-xl font-semibold text-white">BMI Calculator</h3>
173
+ </div>
174
+ <p class="text-gray-300">Calculate your Body Mass Index and check your weight category.</p>
175
+ </div>
176
+
177
+ <div class="bg-gray-700 rounded-lg p-6 hover:bg-gray-600 transition cursor-pointer" data-section="city-locator">
178
+ <div class="flex items-center mb-4">
179
+ <div class="bg-green-500 p-3 rounded-full mr-4">
180
+ <i class="fas fa-map-marker-alt text-white"></i>
181
+ </div>
182
+ <h3 class="text-xl font-semibold text-white">City Locator</h3>
183
+ </div>
184
+ <p class="text-gray-300">Find information about cities around the world.</p>
185
+ </div>
186
+
187
+ <div class="bg-gray-700 rounded-lg p-6 hover:bg-gray-600 transition cursor-pointer" data-section="high-schools">
188
+ <div class="flex items-center mb-4">
189
+ <div class="bg-purple-500 p-3 rounded-full mr-4">
190
+ <i class="fas fa-school text-white"></i>
191
+ </div>
192
+ <h3 class="text-xl font-semibold text-white">High Schools</h3>
193
+ </div>
194
+ <p class="text-gray-300">Browse a list of high schools with search functionality.</p>
195
+ </div>
196
+
197
+ <div class="bg-gray-700 rounded-lg p-6 hover:bg-gray-600 transition cursor-pointer" data-section="recovery-emails">
198
+ <div class="flex items-center mb-4">
199
+ <div class="bg-yellow-500 p-3 rounded-full mr-4">
200
+ <i class="fas fa-envelope text-white"></i>
201
+ </div>
202
+ <h3 class="text-xl font-semibold text-white">Recovery Emails</h3>
203
+ </div>
204
+ <p class="text-gray-300">Manage your recovery email addresses for account security.</p>
205
+ </div>
206
+
207
+ <div class="bg-gray-700 rounded-lg p-6 hover:bg-gray-600 transition cursor-pointer" data-section="barcode-generator">
208
+ <div class="flex items-center mb-4">
209
+ <div class="bg-red-500 p-3 rounded-full mr-4">
210
+ <i class="fas fa-barcode text-white"></i>
211
+ </div>
212
+ <h3 class="text-xl font-semibold text-white">Barcode Generator</h3>
213
+ </div>
214
+ <p class="text-gray-300">Generate barcodes from text input.</p>
215
+ </div>
216
+
217
+ <div class="bg-gray-700 rounded-lg p-6 hover:bg-gray-600 transition cursor-pointer" data-section="password-generator">
218
+ <div class="flex items-center mb-4">
219
+ <div class="bg-indigo-500 p-3 rounded-full mr-4">
220
+ <i class="fas fa-key text-white"></i>
221
+ </div>
222
+ <h3 class="text-xl font-semibold text-white">Password Generator</h3>
223
+ </div>
224
+ <p class="text-gray-300">Create strong, secure passwords with customizable options.</p>
225
+ </div>
226
+ </div>
227
+ </div>
228
+ </section>
229
+
230
+ <!-- BMI Calculator Section -->
231
+ <section id="bmi-calculator" class="tool-section">
232
+ <div class="bg-gray-800 rounded-lg shadow-lg p-6">
233
+ <h2 class="text-2xl font-bold text-white mb-6">BMI Calculator</h2>
234
+
235
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
236
+ <div class="bg-gray-700 rounded-lg p-6">
237
+ <form id="bmiForm">
238
+ <div class="mb-4">
239
+ <label for="height" class="block text-gray-300 mb-2">Height</label>
240
+ <div class="flex">
241
+ <input type="number" id="height" class="bg-gray-600 text-white rounded-l-lg p-2 w-full focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Enter height" required>
242
+ <select id="heightUnit" class="bg-gray-600 text-white rounded-r-lg p-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
243
+ <option value="cm">cm</option>
244
+ <option value="in">inches</option>
245
+ </select>
246
+ </div>
247
+ </div>
248
+
249
+ <div class="mb-6">
250
+ <label for="weight" class="block text-gray-300 mb-2">Weight</label>
251
+ <div class="flex">
252
+ <input type="number" id="weight" class="bg-gray-600 text-white rounded-l-lg p-2 w-full focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Enter weight" required>
253
+ <select id="weightUnit" class="bg-gray-600 text-white rounded-r-lg p-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
254
+ <option value="kg">kg</option>
255
+ <option value="lbs">lbs</option>
256
+ </select>
257
+ </div>
258
+ </div>
259
+
260
+ <button type="submit" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-lg transition">
261
+ Calculate BMI
262
+ </button>
263
+ </form>
264
+ </div>
265
+
266
+ <div class="bg-gray-700 rounded-lg p-6">
267
+ <h3 class="text-xl font-semibold text-white mb-4">Your Results</h3>
268
+ <div id="bmiResult" class="text-center py-8 hidden">
269
+ <div class="text-5xl font-bold mb-2" id="bmiValue">--</div>
270
+ <div class="text-xl mb-6" id="bmiCategory">--</div>
271
+ <div class="bg-gray-600 rounded-lg p-4">
272
+ <h4 class="font-semibold mb-2">BMI Categories:</h4>
273
+ <ul class="text-left space-y-1">
274
+ <li><span class="underweight">Underweight</span>: BMI less than 18.5</li>
275
+ <li><span class="normal">Normal weight</span>: BMI 18.5–24.9</li>
276
+ <li><span class="overweight">Overweight</span>: BMI 25–29.9</li>
277
+ <li><span class="obese">Obesity</span>: BMI 30 or greater</li>
278
+ </ul>
279
+ </div>
280
+ </div>
281
+ <div id="bmiEmptyState" class="text-center py-12 text-gray-400">
282
+ <i class="fas fa-calculator text-5xl mb-4"></i>
283
+ <p>Enter your height and weight to calculate your BMI</p>
284
+ </div>
285
+ </div>
286
+ </div>
287
+ </div>
288
+ </section>
289
+
290
+ <!-- City Locator Section -->
291
+ <section id="city-locator" class="tool-section">
292
+ <div class="bg-gray-800 rounded-lg shadow-lg p-6">
293
+ <h2 class="text-2xl font-bold text-white mb-6">City Locator</h2>
294
+
295
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
296
+ <div class="md:col-span-1 bg-gray-700 rounded-lg p-6">
297
+ <form id="citySearchForm">
298
+ <div class="mb-4">
299
+ <label for="cityName" class="block text-gray-300 mb-2">City Name</label>
300
+ <input type="text" id="cityName" class="bg-gray-600 text-white rounded-lg p-2 w-full focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Enter city name" required>
301
+ </div>
302
+
303
+ <button type="submit" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-lg transition">
304
+ <i class="fas fa-search mr-2"></i> Search
305
+ </button>
306
+ </form>
307
+ </div>
308
+
309
+ <div class="md:col-span-2 bg-gray-700 rounded-lg p-6">
310
+ <h3 class="text-xl font-semibold text-white mb-4">City Information</h3>
311
+ <div id="cityResult" class="hidden">
312
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
313
+ <div>
314
+ <h4 class="text-lg font-semibold text-blue-400 mb-2" id="cityNameDisplay">--</h4>
315
+ <div class="flex items-center text-gray-300 mb-1">
316
+ <i class="fas fa-globe-americas mr-2"></i>
317
+ <span id="cityCountry">--</span>
318
+ </div>
319
+ <div class="flex items-center text-gray-300 mb-1">
320
+ <i class="fas fa-users mr-2"></i>
321
+ <span id="cityPopulation">--</span>
322
+ </div>
323
+ <div class="flex items-center text-gray-300">
324
+ <i class="fas fa-map-marker-alt mr-2"></i>
325
+ <span id="cityCoordinates">--</span>
326
+ </div>
327
+ </div>
328
+ <div>
329
+ <div class="flex items-center text-gray-300 mb-1">
330
+ <i class="fas fa-temperature-high mr-2"></i>
331
+ <span id="cityTemperature">--</span>
332
+ </div>
333
+ <div class="flex items-center text-gray-300 mb-1">
334
+ <i class="fas fa-cloud mr-2"></i>
335
+ <span id="cityWeather">--</span>
336
+ </div>
337
+ <div class="flex items-center text-gray-300">
338
+ <i class="fas fa-clock mr-2"></i>
339
+ <span id="cityTimezone">--</span>
340
+ </div>
341
+ </div>
342
+ </div>
343
+
344
+ <div class="bg-gray-600 rounded-lg p-4">
345
+ <h4 class="font-semibold mb-2">Quick Facts</h4>
346
+ <p class="text-gray-300" id="cityFacts">--</p>
347
+ </div>
348
+ </div>
349
+ <div id="cityEmptyState" class="text-center py-12 text-gray-400">
350
+ <i class="fas fa-city text-5xl mb-4"></i>
351
+ <p>Search for a city to view detailed information</p>
352
+ </div>
353
+ </div>
354
+ </div>
355
+ </div>
356
+ </section>
357
+
358
+ <!-- High Schools Section -->
359
+ <section id="high-schools" class="tool-section">
360
+ <div class="bg-gray-800 rounded-lg shadow-lg p-6">
361
+ <h2 class="text-2xl font-bold text-white mb-6">High Schools</h2>
362
+
363
+ <div class="mb-6">
364
+ <div class="relative">
365
+ <input type="text" id="schoolSearch" class="bg-gray-700 text-white px-4 py-2 rounded-lg w-full focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Search high schools by name or location...">
366
+ <i class="fas fa-search absolute right-3 top-3 text-gray-400"></i>
367
+ </div>
368
+ </div>
369
+
370
+ <div class="overflow-x-auto">
371
+ <table class="min-w-full bg-gray-700 rounded-lg overflow-hidden">
372
+ <thead class="bg-gray-600">
373
+ <tr>
374
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Name</th>
375
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Location</th>
376
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Type</th>
377
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Students</th>
378
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Rating</th>
379
+ </tr>
380
+ </thead>
381
+ <tbody id="schoolsTableBody" class="divide-y divide-gray-600">
382
+ <!-- Schools will be populated here -->
383
+ </tbody>
384
+ </table>
385
+ </div>
386
+ </div>
387
+ </section>
388
+
389
+ <!-- Recovery Emails Section -->
390
+ <section id="recovery-emails" class="tool-section">
391
+ <div class="bg-gray-800 rounded-lg shadow-lg p-6">
392
+ <h2 class="text-2xl font-bold text-white mb-6">Recovery Emails</h2>
393
+
394
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
395
+ <div class="bg-gray-700 rounded-lg p-6">
396
+ <h3 class="text-xl font-semibold text-white mb-4">Add New Email</h3>
397
+ <form id="addEmailForm">
398
+ <div class="mb-4">
399
+ <label for="newEmail" class="block text-gray-300 mb-2">Email Address</label>
400
+ <input type="email" id="newEmail" class="bg-gray-600 text-white rounded-lg p-2 w-full focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Enter email address" required>
401
+ </div>
402
+
403
+ <button type="submit" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-lg transition">
404
+ <i class="fas fa-plus mr-2"></i> Add Email
405
+ </button>
406
+ </form>
407
+ </div>
408
+
409
+ <div class="bg-gray-700 rounded-lg p-6">
410
+ <h3 class="text-xl font-semibold text-white mb-4">Your Recovery Emails</h3>
411
+ <div id="emailsList" class="space-y-3">
412
+ <!-- Emails will be populated here -->
413
+ <div class="text-center py-8 text-gray-400" id="noEmailsMessage">
414
+ <i class="fas fa-envelope-open-text text-3xl mb-3"></i>
415
+ <p>No recovery emails added yet</p>
416
+ </div>
417
+ </div>
418
+ </div>
419
+ </div>
420
+ </div>
421
+ </section>
422
+
423
+ <!-- Barcode Generator Section -->
424
+ <section id="barcode-generator" class="tool-section">
425
+ <div class="bg-gray-800 rounded-lg shadow-lg p-6">
426
+ <h2 class="text-2xl font-bold text-white mb-6">Barcode Generator</h2>
427
+
428
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
429
+ <div class="bg-gray-700 rounded-lg p-6">
430
+ <form id="barcodeForm">
431
+ <div class="mb-4">
432
+ <label for="barcodeText" class="block text-gray-300 mb-2">Text to Encode</label>
433
+ <input type="text" id="barcodeText" class="bg-gray-600 text-white rounded-lg p-2 w-full focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Enter text to generate barcode" required>
434
+ </div>
435
+
436
+ <div class="mb-4">
437
+ <label for="barcodeType" class="block text-gray-300 mb-2">Barcode Type</label>
438
+ <select id="barcodeType" class="bg-gray-600 text-white rounded-lg p-2 w-full focus:outline-none focus:ring-2 focus:ring-blue-500">
439
+ <option value="CODE128">CODE128</option>
440
+ <option value="EAN13">EAN13</option>
441
+ <option value="UPC">UPC</option>
442
+ <option value="CODE39">CODE39</option>
443
+ <option value="ITF14">ITF14</option>
444
+ </select>
445
+ </div>
446
+
447
+ <button type="submit" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-lg transition">
448
+ <i class="fas fa-barcode mr-2"></i> Generate Barcode
449
+ </button>
450
+ </form>
451
+ </div>
452
+
453
+ <div class="bg-gray-700 rounded-lg p-6 flex flex-col items-center justify-center">
454
+ <h3 class="text-xl font-semibold text-white mb-4">Generated Barcode</h3>
455
+ <div id="barcodeContainer" class="p-4 bg-white rounded-lg mb-4 w-full flex justify-center">
456
+ <svg id="barcode" class="max-w-full h-auto"></svg>
457
+ </div>
458
+ <button id="downloadBarcode" class="bg-green-600 hover:bg-green-700 text-white font-bold py-2 px-4 rounded-lg transition hidden">
459
+ <i class="fas fa-download mr-2"></i> Download Barcode
460
+ </button>
461
+ <div id="barcodeEmptyState" class="text-center py-8 text-gray-400">
462
+ <i class="fas fa-barcode text-5xl mb-4"></i>
463
+ <p>Enter text to generate a barcode</p>
464
+ </div>
465
+ </div>
466
+ </div>
467
+ </div>
468
+ </section>
469
+
470
+ <!-- Password Generator Section -->
471
+ <section id="password-generator" class="tool-section">
472
+ <div class="bg-gray-800 rounded-lg shadow-lg p-6">
473
+ <h2 class="text-2xl font-bold text-white mb-6">Password Generator</h2>
474
+
475
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
476
+ <div class="bg-gray-700 rounded-lg p-6">
477
+ <form id="passwordForm">
478
+ <div class="mb-4">
479
+ <label for="passwordLength" class="block text-gray-300 mb-2">Password Length</label>
480
+ <input type="range" id="passwordLength" min="6" max="32" value="12" class="w-full h-2 bg-gray-600 rounded-lg appearance-none cursor-pointer">
481
+ <div class="flex justify-between text-gray-300 text-sm">
482
+ <span>6</span>
483
+ <span id="lengthValue">12</span>
484
+ <span>32</span>
485
+ </div>
486
+ </div>
487
+
488
+ <div class="mb-4">
489
+ <label class="block text-gray-300 mb-2">Include:</label>
490
+ <div class="space-y-2">
491
+ <label class="flex items-center">
492
+ <input type="checkbox" id="includeUppercase" checked class="form-checkbox h-4 w-4 text-blue-600 bg-gray-600 border-gray-500 rounded focus:ring-blue-500">
493
+ <span class="ml-2">Uppercase Letters (A-Z)</span>
494
+ </label>
495
+ <label class="flex items-center">
496
+ <input type="checkbox" id="includeLowercase" checked class="form-checkbox h-4 w-4 text-blue-600 bg-gray-600 border-gray-500 rounded focus:ring-blue-500">
497
+ <span class="ml-2">Lowercase Letters (a-z)</span>
498
+ </label>
499
+ <label class="flex items-center">
500
+ <input type="checkbox" id="includeNumbers" checked class="form-checkbox h-4 w-4 text-blue-600 bg-gray-600 border-gray-500 rounded focus:ring-blue-500">
501
+ <span class="ml-2">Numbers (0-9)</span>
502
+ </label>
503
+ <label class="flex items-center">
504
+ <input type="checkbox" id="includeSymbols" class="form-checkbox h-4 w-4 text-blue-600 bg-gray-600 border-gray-500 rounded focus:ring-blue-500">
505
+ <span class="ml-2">Symbols (!@#$%^&*)</span>
506
+ </label>
507
+ </div>
508
+ </div>
509
+
510
+ <button type="submit" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-lg transition">
511
+ <i class="fas fa-key mr-2"></i> Generate Password
512
+ </button>
513
+ </form>
514
+ </div>
515
+
516
+ <div class="bg-gray-700 rounded-lg p-6">
517
+ <h3 class="text-xl font-semibold text-white mb-4">Generated Password</h3>
518
+ <div class="mb-4">
519
+ <div class="relative">
520
+ <input type="text" id="generatedPassword" readonly class="bg-gray-600 text-white px-4 py-3 rounded-lg w-full focus:outline-none focus:ring-2 focus:ring-blue-500 font-mono">
521
+ <button id="copyPassword" class="absolute right-2 top-2 bg-gray-500 hover:bg-gray-600 text-white p-1 rounded">
522
+ <i class="fas fa-copy"></i>
523
+ </button>
524
+ </div>
525
+ </div>
526
+
527
+ <div class="bg-gray-600 rounded-lg p-4">
528
+ <h4 class="font-semibold mb-2">Password Strength</h4>
529
+ <div class="mb-2">
530
+ <div class="w-full bg-gray-500 rounded-full h-2.5">
531
+ <div id="passwordStrengthBar" class="bg-red-500 h-2.5 rounded-full" style="width: 0%"></div>
532
+ </div>
533
+ </div>
534
+ <p id="passwordStrengthText" class="text-sm">Very Weak</p>
535
+ </div>
536
+ </div>
537
+ </div>
538
+ </div>
539
+ </section>
540
+
541
+ <!-- Signature Generator Section -->
542
+ <section id="signature-generator" class="tool-section">
543
+ <div class="bg-gray-800 rounded-lg shadow-lg p-6">
544
+ <h2 class="text-2xl font-bold text-white mb-6">Signature Generator</h2>
545
+
546
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
547
+ <div class="bg-gray-700 rounded-lg p-6">
548
+ <div class="mb-4">
549
+ <label class="block text-gray-300 mb-2">Draw your signature below:</label>
550
+ <canvas id="signatureCanvas" class="signature-canvas w-full h-48 touch-none"></canvas>
551
+ </div>
552
+
553
+ <div class="flex space-x-3">
554
+ <button id="clearSignature" class="flex-1 bg-gray-600 hover:bg-gray-500 text-white font-bold py-2 px-4 rounded-lg transition">
555
+ <i class="fas fa-eraser mr-2"></i> Clear
556
+ </button>
557
+ <button id="saveSignature" class="flex-1 bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-lg transition">
558
+ <i class="fas fa-save mr-2"></i> Save
559
+ </button>
560
+ </div>
561
+ </div>
562
+
563
+ <div class="bg-gray-700 rounded-lg p-6 flex flex-col items-center justify-center">
564
+ <h3 class="text-xl font-semibold text-white mb-4">Your Signature</h3>
565
+ <div id="signaturePreview" class="p-4 bg-white rounded-lg mb-4 w-full flex justify-center items-center h-48">
566
+ <p class="text-gray-500">Your signature will appear here</p>
567
+ </div>
568
+ <button id="downloadSignature" class="bg-green-600 hover:bg-green-700 text-white font-bold py-2 px-4 rounded-lg transition hidden">
569
+ <i class="fas fa-download mr-2"></i> Download
570
+ </button>
571
+ </div>
572
+ </div>
573
+ </div>
574
+ </section>
575
+
576
+ <!-- Colleges Section -->
577
+ <section id="colleges" class="tool-section">
578
+ <div class="bg-gray-800 rounded-lg shadow-lg p-6">
579
+ <h2 class="text-2xl font-bold text-white mb-6">Colleges & Universities</h2>
580
+
581
+ <div class="mb-6">
582
+ <div class="relative">
583
+ <input type="text" id="collegeSearch" class="bg-gray-700 text-white px-4 py-2 rounded-lg w-full focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Search colleges by name or location...">
584
+ <i class="fas fa-search absolute right-3 top-3 text-gray-400"></i>
585
+ </div>
586
+ </div>
587
+
588
+ <div class="overflow-x-auto">
589
+ <table class="min-w-full bg-gray-700 rounded-lg overflow-hidden">
590
+ <thead class="bg-gray-600">
591
+ <tr>
592
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Name</th>
593
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Location</th>
594
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Type</th>
595
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Students</th>
596
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-300 uppercase tracking-wider">Ranking</th>
597
+ </tr>
598
+ </thead>
599
+ <tbody id="collegesTableBody" class="divide-y divide-gray-600">
600
+ <!-- Colleges will be populated here -->
601
+ </tbody>
602
+ </table>
603
+ </div>
604
+ </div>
605
+ </section>
606
+ </main>
607
+ </div>
608
+
609
+ <!-- Settings Modal -->
610
+ <div id="settingsModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
611
+ <div class="bg-gray-800 rounded-lg shadow-xl w-full max-w-md">
612
+ <div class="p-6">
613
+ <div class="flex justify-between items-center mb-4">
614
+ <h3 class="text-xl font-bold text-white">Settings</h3>
615
+ <button id="closeSettings" class="text-gray-400 hover:text-white">
616
+ <i class="fas fa-times"></i>
617
+ </button>
618
+ </div>
619
+
620
+ <div class="space-y-4">
621
+ <div>
622
+ <label class="block text-gray-300 mb-2">Theme</label>
623
+ <select id="themeSelect" class="bg-gray-700 text-white rounded-lg p-2 w-full focus:outline-none focus:ring-2 focus:ring-blue-500">
624
+ <option value="dark">Dark</option>
625
+ <option value="light">Light</option>
626
+ <option value="blue">Blue</option>
627
+ </select>
628
+ </div>
629
+
630
+ <div>
631
+ <label class="block text-gray-300 mb-2">Background Image</label>
632
+ <select id="bgImageSelect" class="bg-gray-700 text-white rounded-lg p-2 w-full focus:outline-none focus:ring-2 focus:ring-blue-500">
633
+ <option value="none">None</option>
634
+ <option value="mountains">Mountains</option>
635
+ <option value="city">City</option>
636
+ <option value="space">Space</option>
637
+ <option value="custom">Custom URL</option>
638
+ </select>
639
+ </div>
640
+
641
+ <div id="customBgUrlContainer" class="hidden">
642
+ <label class="block text-gray-300 mb-2">Custom Background URL</label>
643
+ <input type="text" id="customBgUrl" class="bg-gray-700 text-white rounded-lg p-2 w-full focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Enter image URL">
644
+ </div>
645
+
646
+ <div class="pt-4 border-t border-gray-700">
647
+ <button id="saveSettings" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-lg transition">
648
+ Save Settings
649
+ </button>
650
+ </div>
651
+ </div>
652
+ </div>
653
+ </div>
654
+ </div>
655
+
656
+ <script>
657
+ // Mock data
658
+ const mockSchools = [
659
+ { name: "Lincoln High School", location: "New York, NY", type: "Public", students: 1250, rating: 4.5 },
660
+ { name: "Jefferson Academy", location: "Chicago, IL", type: "Charter", students: 850, rating: 4.2 },
661
+ { name: "Washington Prep", location: "Los Angeles, CA", type: "Public", students: 2100, rating: 4.0 },
662
+ { name: "Roosevelt High", location: "Seattle, WA", type: "Public", students: 980, rating: 3.8 },
663
+ { name: "Madison Academy", location: "Boston, MA", type: "Private", students: 650, rating: 4.7 },
664
+ { name: "Kennedy High", location: "Houston, TX", type: "Public", students: 1750, rating: 3.9 },
665
+ { name: "Adams Preparatory", location: "Philadelphia, PA", type: "Private", students: 720, rating: 4.6 }
666
+ ];
667
+
668
+ const mockColleges = [
669
+ { name: "Harvard University", location: "Cambridge, MA", type: "Private", students: 22000, ranking: 1 },
670
+ { name: "Stanford University", location: "Stanford, CA", type: "Private", students: 17000, ranking: 2 },
671
+ { name: "MIT", location: "Cambridge, MA", type: "Private", students: 11500, ranking: 3 },
672
+ { name: "University of California, Berkeley", location: "Berkeley, CA", type: "Public", students: 42000, ranking: 4 },
673
+ { name: "University of Michigan", location: "Ann Arbor, MI", type: "Public", students: 46000, ranking: 5 },
674
+ { name: "University of Texas at Austin", location: "Austin, TX", type: "Public", students: 51000, ranking: 6 },
675
+ { name: "Columbia University", location: "New York, NY", type: "Private", students: 33000, ranking: 7 }
676
+ ];
677
+
678
+ const mockCities = {
679
+ "New York": {
680
+ country: "United States",
681
+ population: "8.8 million",
682
+ coordinates: "40.7128° N, 74.0060° W",
683
+ temperature: "72°F (22°C)",
684
+ weather: "Partly Cloudy",
685
+ timezone: "UTC-4 (EDT)",
686
+ facts: "New York City is the most populous city in the United States and a global hub for commerce, finance, culture, and entertainment."
687
+ },
688
+ "London": {
689
+ country: "United Kingdom",
690
+ population: "8.9 million",
691
+ coordinates: "51.5074° N, 0.1278° W",
692
+ temperature: "64°F (18°C)",
693
+ weather: "Rainy",
694
+ timezone: "UTC+1 (BST)",
695
+ facts: "London is the capital and largest city of England and the United Kingdom, with a history spanning nearly two millennia."
696
+ },
697
+ "Tokyo": {
698
+ country: "Japan",
699
+ population: "13.9 million",
700
+ coordinates: "35.6762° N, 139.6503° E",
701
+ temperature: "77°F (25°C)",
702
+ weather: "Sunny",
703
+ timezone: "UTC+9 (JST)",
704
+ facts: "Tokyo is the capital and most populous city of Japan, known for its modern architecture, vibrant pop culture, and historic temples."
705
+ },
706
+ "Paris": {
707
+ country: "France",
708
+ population: "2.1 million",
709
+ coordinates: "48.8566° N, 2.3522° E",
710
+ temperature: "68°F (20°C)",
711
+ weather: "Clear",
712
+ timezone: "UTC+2 (CEST)",
713
+ facts: "Paris is the capital and most populous city of France, known worldwide for its art, fashion, gastronomy, and culture."
714
+ },
715
+ "Sydney": {
716
+ country: "Australia",
717
+ population: "5.3 million",
718
+ coordinates: "33.8688° S, 151.2093° E",
719
+ temperature: "59°F (15°C)",
720
+ weather: "Partly Cloudy",
721
+ timezone: "UTC+10 (AEST)",
722
+ facts: "Sydney is the most populous city in Australia and a major global city, known for its harborfront Sydney Opera House and Harbour Bridge."
723
+ }
724
+ };
725
+
726
+ // DOM Elements
727
+ const sidebar = document.getElementById('sidebar');
728
+ const toggleSidebar = document.getElementById('toggleSidebar');
729
+ const mainContent = document.getElementById('mainContent');
730
+ const navItems = document.querySelectorAll('.nav-item');
731
+ const toolSections = document.querySelectorAll('.tool-section');
732
+ const currentSectionTitle = document.getElementById('currentSectionTitle');
733
+ const settingsBtn = document.getElementById('settingsBtn');
734
+ const settingsModal = document.getElementById('settingsModal');
735
+ const closeSettings = document.getElementById('closeSettings');
736
+ const saveSettings = document.getElementById('saveSettings');
737
+ const bgImageSelect = document.getElementById('bgImageSelect');
738
+ const customBgUrlContainer = document.getElementById('customBgUrlContainer');
739
+ const themeSelect = document.getElementById('themeSelect');
740
+ const logoutBtn = document.getElementById('logoutBtn');
741
+
742
+ // BMI Calculator
743
+ const bmiForm = document.getElementById('bmiForm');
744
+ const bmiResult = document.getElementById('bmiResult');
745
+ const bmiEmptyState = document.getElementById('bmiEmptyState');
746
+ const bmiValue = document.getElementById('bmiValue');
747
+ const bmiCategory = document.getElementById('bmiCategory');
748
+
749
+ // City Locator
750
+ const citySearchForm = document.getElementById('citySearchForm');
751
+ const cityResult = document.getElementById('cityResult');
752
+ const cityEmptyState = document.getElementById('cityEmptyState');
753
+ const cityNameDisplay = document.getElementById('cityNameDisplay');
754
+ const cityCountry = document.getElementById('cityCountry');
755
+ const cityPopulation = document.getElementById('cityPopulation');
756
+ const cityCoordinates = document.getElementById('cityCoordinates');
757
+ const cityTemperature = document.getElementById('cityTemperature');
758
+ const cityWeather = document.getElementById('cityWeather');
759
+ const cityTimezone = document.getElementById('cityTimezone');
760
+ const cityFacts = document.getElementById('cityFacts');
761
+
762
+ // High Schools
763
+ const schoolSearch = document.getElementById('schoolSearch');
764
+ const schoolsTableBody = document.getElementById('schoolsTableBody');
765
+
766
+ // Recovery Emails
767
+ const addEmailForm = document.getElementById('addEmailForm');
768
+ const emailsList = document.getElementById('emailsList');
769
+ const noEmailsMessage = document.getElementById('noEmailsMessage');
770
+
771
+ // Barcode Generator
772
+ const barcodeForm = document.getElementById('barcodeForm');
773
+ const barcodeContainer = document.getElementById('barcodeContainer');
774
+ const barcodeEmptyState = document.getElementById('barcodeEmptyState');
775
+ const downloadBarcode = document.getElementById('downloadBarcode');
776
+
777
+ // Password Generator
778
+ const passwordForm = document.getElementById('passwordForm');
779
+ const passwordLength = document.getElementById('passwordLength');
780
+ const lengthValue = document.getElementById('lengthValue');
781
+ const generatedPassword = document.getElementById('generatedPassword');
782
+ const copyPassword = document.getElementById('copyPassword');
783
+ const passwordStrengthBar = document.getElementById('passwordStrengthBar');
784
+ const passwordStrengthText = document.getElementById('passwordStrengthText');
785
+
786
+ // Signature Generator
787
+ const signatureCanvas = document.getElementById('signatureCanvas');
788
+ const signaturePreview = document.getElementById('signaturePreview');
789
+ const clearSignature = document.getElementById('clearSignature');
790
+ const saveSignature = document.getElementById('saveSignature');
791
+ const downloadSignature = document.getElementById('downloadSignature');
792
+
793
+ // Colleges
794
+ const collegeSearch = document.getElementById('collegeSearch');
795
+ const collegesTableBody = document.getElementById('collegesTableBody');
796
+
797
+ // Initialize
798
+ document.addEventListener('DOMContentLoaded', function() {
799
+ // Load saved settings
800
+ loadSettings();
801
+
802
+ // Populate schools table
803
+ populateSchoolsTable(mockSchools);
804
+
805
+ // Populate colleges table
806
+ populateCollegesTable(mockColleges);
807
+
808
+ // Initialize signature canvas
809
+ initSignatureCanvas();
810
+
811
+ // Set up event listeners
812
+ setupEventListeners();
813
+
814
+ // Show overview section by default
815
+ showSection('overview');
816
+ });
817
+
818
+ function loadSettings() {
819
+ const savedTheme = localStorage.getItem('theme') || 'dark';
820
+ const savedBgImage = localStorage.getItem('bgImage') || 'none';
821
+ const savedCustomBgUrl = localStorage.getItem('customBgUrl') || '';
822
+
823
+ themeSelect.value = savedTheme;
824
+ bgImageSelect.value = savedBgImage;
825
+
826
+ if (savedBgImage === 'custom') {
827
+ customBgUrlContainer.classList.remove('hidden');
828
+ document.getElementById('customBgUrl').value = savedCustomBgUrl;
829
+ }
830
+
831
+ applyTheme(savedTheme);
832
+ applyBackground(savedBgImage, savedCustomBgUrl);
833
+ }
834
+
835
+ function applyTheme(theme) {
836
+ document.body.classList.remove('theme-dark', 'theme-light', 'theme-blue');
837
+ document.body.classList.add(`theme-${theme}`);
838
+ }
839
+
840
+ function applyBackground(bgImage, customUrl = '') {
841
+ let bgUrl = '';
842
+
843
+ switch(bgImage) {
844
+ case 'mountains':
845
+ bgUrl = 'https://images.unsplash.com/photo-1519681393784-d120267933ba?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80';
846
+ break;
847
+ case 'city':
848
+ bgUrl = 'https://images.unsplash.com/photo-1480714378408-67cf0d13bc1b?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80';
849
+ break;
850
+ case 'space':
851
+ bgUrl = 'https://images.unsplash.com/photo-1506318137071-a8e063b4bec0?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80';
852
+ break;
853
+ case 'custom':
854
+ bgUrl = customUrl;
855
+ break;
856
+ default:
857
+ document.body.style.backgroundImage = 'none';
858
+ return;
859
+ }
860
+
861
+ if (bgUrl) {
862
+ document.body.style.backgroundImage = `url('${bgUrl}')`;
863
+ }
864
+ }
865
+
866
+ function populateSchoolsTable(schools) {
867
+ schoolsTableBody.innerHTML = '';
868
+
869
+ schools.forEach(school => {
870
+ const row = document.createElement('tr');
871
+ row.className = 'hover:bg-gray-600';
872
+
873
+ row.innerHTML = `
874
+ <td class="px-6 py-4 whitespace-nowrap">
875
+ <div class="text-white">${school.name}</div>
876
+ </td>
877
+ <td class="px-6 py-4 whitespace-nowrap">
878
+ <div class="text-gray-300">${school.location}</div>
879
+ </td>
880
+ <td class="px-6 py-4 whitespace-nowrap">
881
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${school.type === 'Public' ? 'bg-green-100 text-green-800' : school.type === 'Private' ? 'bg-purple-100 text-purple-800' : 'bg-blue-100 text-blue-800'}">
882
+ ${school.type}
883
+ </span>
884
+ </td>
885
+ <td class="px-6 py-4 whitespace-nowrap text-gray-300">
886
+ ${school.students.toLocaleString()}
887
+ </td>
888
+ <td class="px-6 py-4 whitespace-nowrap">
889
+ <div class="flex items-center">
890
+ <div class="mr-2 text-yellow-400">
891
+ ${'★'.repeat(Math.floor(school.rating))}${'☆'.repeat(5 - Math.floor(school.rating))}
892
+ </div>
893
+ <span class="text-gray-300">${school.rating}/5</span>
894
+ </div>
895
+ </td>
896
+ `;
897
+
898
+ schoolsTableBody.appendChild(row);
899
+ });
900
+ }
901
+
902
+ function populateCollegesTable(colleges) {
903
+ collegesTableBody.innerHTML = '';
904
+
905
+ colleges.forEach(college => {
906
+ const row = document.createElement('tr');
907
+ row.className = 'hover:bg-gray-600';
908
+
909
+ row.innerHTML = `
910
+ <td class="px-6 py-4 whitespace-nowrap">
911
+ <div class="text-white">${college.name}</div>
912
+ </td>
913
+ <td class="px-6 py-4 whitespace-nowrap">
914
+ <div class="text-gray-300">${college.location}</div>
915
+ </td>
916
+ <td class="px-6 py-4 whitespace-nowrap">
917
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${college.type === 'Public' ? 'bg-green-100 text-green-800' : 'bg-purple-100 text-purple-800'}">
918
+ ${college.type}
919
+ </span>
920
+ </td>
921
+ <td class="px-6 py-4 whitespace-nowrap text-gray-300">
922
+ ${college.students.toLocaleString()}
923
+ </td>
924
+ <td class="px-6 py-4 whitespace-nowrap">
925
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">
926
+ #${college.ranking}
927
+ </span>
928
+ </td>
929
+ `;
930
+
931
+ collegesTableBody.appendChild(row);
932
+ });
933
+ }
934
+
935
+ function initSignatureCanvas() {
936
+ const canvas = signatureCanvas;
937
+ const ctx = canvas.getContext('2d');
938
+ let isDrawing = false;
939
+ let lastX = 0;
940
+ let lastY = 0;
941
+
942
+ // Set canvas size
943
+ function resizeCanvas() {
944
+ const rect = canvas.getBoundingClientRect();
945
+ canvas.width = rect.width;
946
+ canvas.height = rect.height;
947
+ }
948
+
949
+ resizeCanvas();
950
+ window.addEventListener('resize', resizeCanvas);
951
+
952
+ // Drawing functions
953
+ function startDrawing(e) {
954
+ isDrawing = true;
955
+ [lastX, lastY] = getPosition(e);
956
+ }
957
+
958
+ function draw(e) {
959
+ if (!isDrawing) return;
960
+
961
+ ctx.strokeStyle = '#000';
962
+ ctx.lineWidth = 2;
963
+ ctx.lineJoin = 'round';
964
+ ctx.lineCap = 'round';
965
+
966
+ const [x, y] = getPosition(e);
967
+
968
+ ctx.beginPath();
969
+ ctx.moveTo(lastX, lastY);
970
+ ctx.lineTo(x, y);
971
+ ctx.stroke();
972
+
973
+ [lastX, lastY] = [x, y];
974
+ }
975
+
976
+ function stopDrawing() {
977
+ isDrawing = false;
978
+ }
979
+
980
+ function getPosition(e) {
981
+ let x, y;
982
+
983
+ if (e.type.includes('touch')) {
984
+ const touch = e.touches[0] || e.changedTouches[0];
985
+ const rect = canvas.getBoundingClientRect();
986
+ x = touch.clientX - rect.left;
987
+ y = touch.clientY - rect.top;
988
+ } else {
989
+ x = e.offsetX;
990
+ y = e.offsetY;
991
+ }
992
+
993
+ return [x, y];
994
+ }
995
+
996
+ // Event listeners
997
+ canvas.addEventListener('mousedown', startDrawing);
998
+ canvas.addEventListener('mousemove', draw);
999
+ canvas.addEventListener('mouseup', stopDrawing);
1000
+ canvas.addEventListener('mouseout', stopDrawing);
1001
+
1002
+ // Touch support
1003
+ canvas.addEventListener('touchstart', (e) => {
1004
+ e.preventDefault();
1005
+ startDrawing(e);
1006
+ });
1007
+
1008
+ canvas.addEventListener('touchmove', (e) => {
1009
+ e.preventDefault();
1010
+ draw(e);
1011
+ });
1012
+
1013
+ canvas.addEventListener('touchend', (e) => {
1014
+ e.preventDefault();
1015
+ stopDrawing();
1016
+ });
1017
+
1018
+ // Clear button
1019
+ clearSignature.addEventListener('click', () => {
1020
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
1021
+ });
1022
+
1023
+ // Save button
1024
+ saveSignature.addEventListener('click', () => {
1025
+ const dataUrl = canvas.toDataURL('image/png');
1026
+ signaturePreview.innerHTML = `<img src="${dataUrl}" alt="Signature" class="max-w-full max-h-full">`;
1027
+ downloadSignature.classList.remove('hidden');
1028
+
1029
+ downloadSignature.onclick = () => {
1030
+ const link = document.createElement('a');
1031
+ link.download = 'signature.png';
1032
+ link.href = dataUrl;
1033
+ link.click();
1034
+ };
1035
+ });
1036
+ }
1037
+
1038
+ function setupEventListeners() {
1039
+ // Sidebar toggle
1040
+ toggleSidebar.addEventListener('click', () => {
1041
+ sidebar.classList.toggle('sidebar-collapsed');
1042
+ sidebar.classList.toggle('sidebar-expanded');
1043
+ mainContent.classList.toggle('md:ml-64');
1044
+ mainContent.classList.toggle('md:ml-20');
1045
+ });
1046
+
1047
+ // Navigation
1048
+ navItems.forEach(item => {
1049
+ item.addEventListener('click', (e) => {
1050
+ e.preventDefault();
1051
+ const section = item.getAttribute('data-section');
1052
+ showSection(section);
1053
+
1054
+ // Update active nav item
1055
+ navItems.forEach(navItem => {
1056
+ navItem.classList.remove('bg-gray-700', 'text-white', 'border-blue-500');
1057
+ });
1058
+ item.classList.add('bg-gray-700', 'text-white', 'border-blue-500');
1059
+ });
1060
+ });
1061
+
1062
+ // Quick links in overview
1063
+ document.querySelectorAll('[data-section]').forEach(link => {
1064
+ if (link.closest('#overview')) {
1065
+ link.addEventListener('click', (e) => {
1066
+ e.preventDefault();
1067
+ const section = link.getAttribute('data-section');
1068
+ showSection(section);
1069
+
1070
+ // Update active nav item
1071
+ navItems.forEach(navItem => {
1072
+ navItem.classList.remove('bg-gray-700', 'text-white', 'border-blue-500');
1073
+ if (navItem.getAttribute('data-section') === section) {
1074
+ navItem.classList.add('bg-gray-700', 'text-white', 'border-blue-500');
1075
+ }
1076
+ });
1077
+ });
1078
+ }
1079
+ });
1080
+
1081
+ // Settings modal
1082
+ settingsBtn.addEventListener('click', () => {
1083
+ settingsModal.classList.remove('hidden');
1084
+ });
1085
+
1086
+ closeSettings.addEventListener('click', () => {
1087
+ settingsModal.classList.add('hidden');
1088
+ });
1089
+
1090
+ bgImageSelect.addEventListener('change', (e) => {
1091
+ if (e.target.value === 'custom') {
1092
+ customBgUrlContainer.classList.remove('hidden');
1093
+ } else {
1094
+ customBgUrlContainer.classList.add('hidden');
1095
+ }
1096
+ });
1097
+
1098
+ saveSettings.addEventListener('click', () => {
1099
+ const theme = themeSelect.value;
1100
+ const bgImage = bgImageSelect.value;
1101
+ const customBgUrl = document.getElementById('customBgUrl').value;
1102
+
1103
+ localStorage.setItem('theme', theme);
1104
+ localStorage.setItem('bgImage', bgImage);
1105
+ localStorage.setItem('customBgUrl', customBgUrl);
1106
+
1107
+ applyTheme(theme);
1108
+ applyBackground(bgImage, customBgUrl);
1109
+
1110
+ settingsModal.classList.add('hidden');
1111
+ });
1112
+
1113
+ logoutBtn.addEventListener('click', () => {
1114
+ alert('Logout functionality would be implemented here');
1115
+ });
1116
+
1117
+ // BMI Calculator
1118
+ bmiForm.addEventListener('submit', (e) => {
1119
+ e.preventDefault();
1120
+
1121
+ const height = parseFloat(document.getElementById('height').value);
1122
+ const heightUnit = document.getElementById('heightUnit').value;
1123
+ const weight = parseFloat(document.getElementById('weight').value);
1124
+ const weightUnit = document.getElementById('weightUnit').value;
1125
+
1126
+ // Convert to metric if needed
1127
+ const heightM = heightUnit === 'in' ? height * 0.0254 : height * 0.01;
1128
+ const weightKg = weightUnit === 'lbs' ? weight * 0.453592 : weight;
1129
+
1130
+ // Calculate BMI
1131
+ const bmi = weightKg / (heightM * heightM);
1132
+ const roundedBMI = Math.round(bmi * 10) / 10;
1133
+
1134
+ // Determine category
1135
+ let category, categoryClass;
1136
+ if (bmi < 18.5) {
1137
+ category = 'Underweight';
1138
+ categoryClass = 'underweight';
1139
+ } else if (bmi < 25) {
1140
+ category = 'Normal weight';
1141
+ categoryClass = 'normal';
1142
+ } else if (bmi < 30) {
1143
+ category = 'Overweight';
1144
+ categoryClass = 'overweight';
1145
+ } else {
1146
+ category = 'Obese';
1147
+ categoryClass = 'obese';
1148
+ }
1149
+
1150
+ // Display results
1151
+ bmiValue.textContent = roundedBMI;
1152
+ bmiCategory.textContent = category;
1153
+ bmiCategory.className = `text-xl mb-6 bmi-category ${categoryClass}`;
1154
+
1155
+ bmiEmptyState.classList.add('hidden');
1156
+ bmiResult.classList.remove('hidden');
1157
+ });
1158
+
1159
+ // City Locator
1160
+ citySearchForm.addEventListener('submit', (e) => {
1161
+ e.preventDefault();
1162
+
1163
+ const cityName = document.getElementById('cityName').value.trim();
1164
+ const cityData = mockCities[cityName];
1165
+
1166
+ if (cityData) {
1167
+ cityNameDisplay.textContent = cityName;
1168
+ cityCountry.textContent = cityData.country;
1169
+ cityPopulation.textContent = cityData.population;
1170
+ cityCoordinates.textContent = cityData.coordinates;
1171
+ cityTemperature.textContent = cityData.temperature;
1172
+ cityWeather.textContent = cityData.weather;
1173
+ cityTimezone.textContent = cityData.timezone;
1174
+ cityFacts.textContent = cityData.facts;
1175
+
1176
+ cityEmptyState.classList.add('hidden');
1177
+ cityResult.classList.remove('hidden');
1178
+ } else {
1179
+ cityEmptyState.classList.remove('hidden');
1180
+ cityResult.classList.add('hidden');
1181
+ alert('City not found in our database. Try New York, London, Tokyo, Paris, or Sydney.');
1182
+ }
1183
+ });
1184
+
1185
+ // High Schools search
1186
+ schoolSearch.addEventListener('input', (e) => {
1187
+ const searchTerm = e.target.value.toLowerCase();
1188
+ const filteredSchools = mockSchools.filter(school =>
1189
+ school.name.toLowerCase().includes(searchTerm) ||
1190
+ school.location.toLowerCase().includes(searchTerm)
1191
+ );
1192
+ populateSchoolsTable(filteredSchools);
1193
+ });
1194
+
1195
+ // Recovery Emails
1196
+ let recoveryEmails = JSON.parse(localStorage.getItem('recoveryEmails')) || [];
1197
+
1198
+ function updateEmailsList() {
1199
+ emailsList.innerHTML = '';
1200
+
1201
+ if (recoveryEmails.length === 0) {
1202
+ noEmailsMessage.classList.remove('hidden');
1203
+ return;
1204
+ }
1205
+
1206
+ noEmailsMessage.classList.add('hidden');
1207
+
1208
+ recoveryEmails.forEach((email, index) => {
1209
+ const emailItem = document.createElement('div');
1210
+ emailItem.className = 'flex items-center justify-between bg-gray-600 p-3 rounded-lg';
1211
+
1212
+ emailItem.innerHTML = `
1213
+ <div class="flex items-center">
1214
+ <i class="fas fa-envelope text-gray-400 mr-3"></i>
1215
+ <span class="text-white">${email}</span>
1216
+ </div>
1217
+ <button class="text-red-400 hover:text-red-300 delete-email" data-index="${index}">
1218
+ <i class="fas fa-trash"></i>
1219
+ </button>
1220
+ `;
1221
+
1222
+ emailsList.appendChild(emailItem);
1223
+ });
1224
+
1225
+ // Add event listeners to delete buttons
1226
+ document.querySelectorAll('.delete-email').forEach(button => {
1227
+ button.addEventListener('click', (e) => {
1228
+ const index = parseInt(e.target.closest('button').getAttribute('data-index'));
1229
+ recoveryEmails.splice(index, 1);
1230
+ localStorage.setItem('recoveryEmails', JSON.stringify(recoveryEmails));
1231
+ updateEmailsList();
1232
+ });
1233
+ });
1234
+ }
1235
+
1236
+ updateEmailsList();
1237
+
1238
+ addEmailForm.addEventListener('submit', (e) => {
1239
+ e.preventDefault();
1240
+ const newEmail = document.getElementById('newEmail').value.trim();
1241
+
1242
+ if (!newEmail) return;
1243
+
1244
+ if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(newEmail)) {
1245
+ alert('Please enter a valid email address');
1246
+ return;
1247
+ }
1248
+
1249
+ if (recoveryEmails.includes(newEmail)) {
1250
+ alert('This email is already in your recovery list');
1251
+ return;
1252
+ }
1253
+
1254
+ recoveryEmails.push(newEmail);
1255
+ localStorage.setItem('recoveryEmails', JSON.stringify(recoveryEmails));
1256
+
1257
+ document.getElementById('newEmail').value = '';
1258
+ updateEmailsList();
1259
+ });
1260
+
1261
+ // Barcode Generator
1262
+ barcodeForm.addEventListener('submit', (e) => {
1263
+ e.preventDefault();
1264
+
1265
+ const text = document.getElementById('barcodeText').value.trim();
1266
+ const type = document.getElementById('barcodeType').value;
1267
+
1268
+ if (!text) {
1269
+ alert('Please enter text to generate barcode');
1270
+ return;
1271
+ }
1272
+
1273
+ try {
1274
+ JsBarcode("#barcode", text, {
1275
+ format: type,
1276
+ lineColor: "#000",
1277
+ width: 2,
1278
+ height: 100,
1279
+ displayValue: true,
1280
+ fontSize: 16,
1281
+ margin: 10
1282
+ });
1283
+
1284
+ barcodeEmptyState.classList.add('hidden');
1285
+ barcodeContainer.classList.remove('hidden');
1286
+ downloadBarcode.classList.remove('hidden');
1287
+
1288
+ downloadBarcode.onclick = () => {
1289
+ const svg = document.querySelector('#barcode');
1290
+ const svgData = new XMLSerializer().serializeToString(svg);
1291
+ const canvas = document.createElement('canvas');
1292
+ const ctx = canvas.getContext('2d');
1293
+ const img = new Image();
1294
+
1295
+ img.onload = function() {
1296
+ canvas.width = img.width;
1297
+ canvas.height = img.height;
1298
+ ctx.drawImage(img, 0, 0);
1299
+
1300
+ const pngFile = canvas.toDataURL('image/png');
1301
+ const downloadLink = document.createElement('a');
1302
+ downloadLink.download = `${text}-barcode.png`;
1303
+ downloadLink.href = pngFile;
1304
+ downloadLink.click();
1305
+ };
1306
+
1307
+ img.src = 'data:image/svg+xml;base64,' + btoa(unescape(encodeURIComponent(svgData)));
1308
+ };
1309
+ } catch (error) {
1310
+ alert('Error generating barcode: ' + error.message);
1311
+ }
1312
+ });
1313
+
1314
+ // Password Generator
1315
+ passwordLength.addEventListener('input', (e) => {
1316
+ lengthValue.textContent = e.target.value;
1317
+ });
1318
+
1319
+ passwordForm.addEventListener('submit', (e) => {
1320
+ e.preventDefault();
1321
+
1322
+ const length = parseInt(passwordLength.value);
1323
+ const includeUppercase = document.getElementById('includeUppercase').checked;
1324
+ const includeLowercase = document.getElementById('includeLowercase').checked;
1325
+ const includeNumbers = document.getElementById('includeNumbers').checked;
1326
+ const includeSymbols = document.getElementById('includeSymbols').checked;
1327
+
1328
+ if (!includeUppercase && !includeLowercase && !includeNumbers && !includeSymbols) {
1329
+ alert('Please select at least one character type');
1330
+ return;
1331
+ }
1332
+
1333
+ const uppercaseChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
1334
+ const lowercaseChars = 'abcdefghijklmnopqrstuvwxyz';
1335
+ const numberChars = '0123456789';
1336
+ const symbolChars = '!@#$%^&*()_+-=[]{}|;:,.<>?';
1337
+
1338
+ let allowedChars = '';
1339
+ if (includeUppercase) allowedChars += uppercaseChars;
1340
+ if (includeLowercase) allowedChars += lowercaseChars;
1341
+ if (includeNumbers) allowedChars += numberChars;
1342
+ if (includeSymbols) allowedChars += symbolChars;
1343
+
1344
+ let password = '';
1345
+ for (let i = 0; i < length; i++) {
1346
+ const randomIndex = Math.floor(Math.random() * allowedChars.length);
1347
+ password += allowedChars[randomIndex];
1348
+ }
1349
+
1350
+ generatedPassword.value = password;
1351
+
1352
+ // Calculate password strength
1353
+ let strength = 0;
1354
+ if (length >= 12) strength += 2;
1355
+ else if (length >= 8) strength += 1;
1356
+
1357
+ if (includeUppercase) strength += 1;
1358
+ if (includeLowercase) strength += 1;
1359
+ if (includeNumbers) strength += 1;
1360
+ if (includeSymbols) strength += 2;
1361
+
1362
+ let strengthText, strengthColor, strengthWidth;
1363
+ if (strength <= 3) {
1364
+ strengthText = 'Very Weak';
1365
+ strengthColor = 'bg-red-500';
1366
+ strengthWidth = '25%';
1367
+ } else if (strength <= 5) {
1368
+ strengthText = 'Weak';
1369
+ strengthColor = 'bg-orange-500';
1370
+ strengthWidth = '50%';
1371
+ } else if (strength <= 7) {
1372
+ strengthText = 'Good';
1373
+ strengthColor = 'bg-yellow-500';
1374
+ strengthWidth = '75%';
1375
+ } else {
1376
+ strengthText = 'Strong';
1377
+ strengthColor = 'bg-green-500';
1378
+ strengthWidth = '100%';
1379
+ }
1380
+
1381
+ passwordStrengthText.textContent = strengthText;
1382
+ passwordStrengthBar.className = `${strengthColor} h-2.5 rounded-full`;
1383
+ passwordStrengthBar.style.width = strengthWidth;
1384
+ });
1385
+
1386
+ copyPassword.addEventListener('click', () => {
1387
+ if (!generatedPassword.value) return;
1388
+
1389
+ generatedPassword.select();
1390
+ document.execCommand('copy');
1391
+
1392
+ const originalText = copyPassword.innerHTML;
1393
+ copyPassword.innerHTML = '<i class="fas fa-check mr-2"></i> Copied!';
1394
+
1395
+ setTimeout(() => {
1396
+ copyPassword.innerHTML = originalText;
1397
+ }, 2000);
1398
+ });
1399
+
1400
+ // Colleges search
1401
+ collegeSearch.addEventListener('input', (e) => {
1402
+ const searchTerm = e.target.value.toLowerCase();
1403
+ const filteredColleges = mockColleges.filter(college =>
1404
+ college.name.toLowerCase().includes(searchTerm) ||
1405
+ college.location.toLowerCase().includes(searchTerm)
1406
+ );
1407
+ populateCollegesTable(filteredColleges);
1408
+ });
1409
+ }
1410
+
1411
+ function showSection(sectionId) {
1412
+ // Hide all sections
1413
+ toolSections.forEach(section => {
1414
+ section.classList.remove('active');
1415
+ });
1416
+
1417
+ // Show selected section
1418
+ const section = document.getElementById(sectionId);
1419
+ if (section) {
1420
+ section.classList.add('active');
1421
+
1422
+ // Update title
1423
+ const navItem = document.querySelector(`.nav-item[data-section="${sectionId}"]`);
1424
+ if (navItem) {
1425
+ const title = navItem.querySelector('.nav-text').textContent;
1426
+ currentSectionTitle.textContent = title;
1427
+ }
1428
+ }
1429
+ }
1430
+ </script>
1431
+ <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=razen5556/utility-dashboard" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
1432
+ </html>