RebelofSleep commited on
Commit
fa99bc6
Β·
verified Β·
1 Parent(s): e012330

Add the following to improve the design and functionality of the the app: 🎨 Interface Design (UI/UX) 1. Onboarding (Registration & Login) Components: Sign-up/sign-in form (email + social login with Google/Facebook). Visual validation (βœ…, red border for invalid). Toggle for password visibility. User Flow: Upon sign-in, direct users based on their role: resident: Dashboard for reporting/tracking. official: Admin interface. 2. User Dashboard (Residents) Cards for quick actions: Report Issue, View My Reports Issue Timeline View: Chips: 🟑 Pending β†’ πŸ”΅ In Progress β†’ βœ… Resolved Filters: Category, Urgency, Status Search Bar for filtering issues Heatmap Button: Redirects to Map View 3. Report Issue Page Fields: Category: Dropdown (Infrastructure, Utilities, Safety) Location: Auto via Geolocation + manual pin on Mapbox Urgency Level: Low (green), Medium (orange), High (red) Media Upload: Drag-and-drop + file preview Text Description Tooltips: Help users describe the issue clearly 4. Map View / Heatmap Live overlay using Mapbox/OpenStreetMap Show: Incident pins by category/status Heatmap mode toggle Click on pin β†’ Popup with issue details 5. Admin Dashboard (Officials) Views: Incoming reports table with filters Assign technician dropdown Update status with comment Activity log panel per issue 6. Notifications & Messaging In-App Alerts: Toasts/snackbars Inbox UI: For conversations between users and officials Push Notifications: With Twilio integration - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +6 -4
  2. index.html +947 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: E
3
- emoji: 🐒
4
  colorFrom: pink
5
- colorTo: red
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: e
3
+ emoji: 🐳
4
  colorFrom: pink
5
+ colorTo: yellow
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,947 @@
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" class="scroll-smooth">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <meta name="description" content="Report and track municipal issues in South Africa">
7
+ <title>QuickFixSA | Civic Engagement Platform</title>
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@700&family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
10
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
11
+ <link rel="manifest" href="/manifest.json">
12
+ <style>
13
+ :root {
14
+ --primary: #2A5C82;
15
+ --secondary: #4CAF50;
16
+ --alert: #E74C3C;
17
+ }
18
+ body {
19
+ font-family: 'Open Sans', sans-serif;
20
+ }
21
+ h1, h2, h3, h4 {
22
+ font-family: 'Roboto', sans-serif;
23
+ }
24
+ .map-container {
25
+ height: 400px;
26
+ background: linear-gradient(135deg, #6a93cb 0%, #a4bfef 100%);
27
+ }
28
+ .status-pending { background-color: #F39C12; }
29
+ .status-in-progress { background-color: #3498DB; }
30
+ .status-resolved { background-color: #2ECC71; }
31
+ .priority-low { background-color: #2ECC71; }
32
+ .priority-medium { background-color: #F39C12; }
33
+ .priority-high { background-color: #E74C3C; }
34
+ .dark-mode {
35
+ background-color: #1a202c;
36
+ color: #e2e8f0;
37
+ }
38
+ .dark-mode .card {
39
+ background-color: #2d3748;
40
+ border-color: #4a5568;
41
+ }
42
+ .dark-mode .navbar {
43
+ background-color: #1a202c;
44
+ }
45
+ .drop-area {
46
+ border: 2px dashed #cbd5e0;
47
+ border-radius: 0.5rem;
48
+ transition: all 0.3s ease;
49
+ }
50
+ .drop-area.active {
51
+ border-color: var(--primary);
52
+ background-color: rgba(42, 92, 130, 0.05);
53
+ }
54
+ .scroll-shrink {
55
+ transition: all 0.3s ease;
56
+ }
57
+ .scroll-shrink.shrink {
58
+ padding: 0.5rem 0;
59
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
60
+ }
61
+ .issue-card:hover {
62
+ transform: translateY(-5px);
63
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
64
+ }
65
+ @media (prefers-color-scheme: dark) {
66
+ .dark-mode-toggle .light-icon { display: none; }
67
+ .dark-mode-toggle .dark-icon { display: inline-block; }
68
+ }
69
+ @media (prefers-color-scheme: light) {
70
+ .dark-mode-toggle .light-icon { display: inline-block; }
71
+ .dark-mode-toggle .dark-icon { display: none; }
72
+ }
73
+ </style>
74
+ </head>
75
+ <body class="bg-gray-50 text-gray-800">
76
+ <!-- Navigation Bar -->
77
+ <nav id="navbar" class="navbar scroll-shrink fixed w-full bg-white py-4 px-4 md:px-8 z-50">
78
+ <div class="max-w-7xl mx-auto flex justify-between items-center">
79
+ <div class="flex items-center">
80
+ <div class="bg-[#2A5C82] text-white font-bold text-xl py-2 px-3 rounded-lg mr-3">QF</div>
81
+ <span class="text-xl font-bold text-[#2A5C82]">QuickFixSA</span>
82
+ </div>
83
+
84
+ <div class="hidden md:flex items-center space-x-8">
85
+ <a href="#home" class="text-gray-700 hover:text-[#2A5C82] font-medium">Home</a>
86
+ <a href="#features" class="text-gray-700 hover:text-[#2A5C82] font-medium">Features</a>
87
+ <a href="#how-it-works" class="text-gray-700 hover:text-[#2A5C82] font-medium">How It Works</a>
88
+ <a href="#dashboard" class="text-gray-700 hover:text-[#2A5C82] font-medium">Dashboard</a>
89
+ </div>
90
+
91
+ <div class="flex items-center space-x-4">
92
+ <button id="dark-mode-toggle" class="dark-mode-toggle p-2 rounded-full hover:bg-gray-100">
93
+ <i class="fas fa-sun light-icon"></i>
94
+ <i class="fas fa-moon dark-icon"></i>
95
+ </button>
96
+ <button id="login-btn" class="bg-[#2A5C82] hover:bg-[#1d4565] text-white font-medium py-2 px-4 rounded-lg transition">
97
+ Sign In
98
+ </button>
99
+ <button class="md:hidden" id="mobile-menu-btn">
100
+ <i class="fas fa-bars text-2xl text-gray-700"></i>
101
+ </button>
102
+ </div>
103
+ </div>
104
+
105
+ <!-- Mobile Menu -->
106
+ <div id="mobile-menu" class="md:hidden hidden absolute top-full left-0 w-full bg-white shadow-lg py-4 px-4">
107
+ <a href="#home" class="block py-2 text-gray-700 hover:text-[#2A5C82]">Home</a>
108
+ <a href="#features" class="block py-2 text-gray-700 hover:text-[#2A5C82]">Features</a>
109
+ <a href="#how-it-works" class="block py-2 text-gray-700 hover:text-[#2A5C82]">How It Works</a>
110
+ <a href="#dashboard" class="block py-2 text-gray-700 hover:text-[#2A5C82]">Dashboard</a>
111
+ </div>
112
+ </nav>
113
+
114
+ <!-- Hero Section -->
115
+ <section id="home" class="pt-24 pb-16 px-4 md:px-8 bg-gradient-to-r from-[#2A5C82] to-[#3a7cb3] text-white">
116
+ <div class="max-w-7xl mx-auto grid grid-cols-1 md:grid-cols-2 gap-12 items-center">
117
+ <div>
118
+ <h1 class="text-4xl md:text-5xl font-bold mb-6">Making Civic Engagement Simple</h1>
119
+ <p class="text-xl mb-8 opacity-90">Report & Track Municipal Issues in Real-Time Across South Africa</p>
120
+ <div class="flex flex-wrap gap-4">
121
+ <button id="report-btn" class="bg-[#4CAF50] hover:bg-[#3d8b40] text-white font-bold py-3 px-8 rounded-lg text-lg transition transform hover:scale-105">
122
+ Report an Issue
123
+ </button>
124
+ <button class="bg-white text-[#2A5C82] hover:bg-gray-100 font-bold py-3 px-8 rounded-lg text-lg transition">
125
+ How It Works
126
+ </button>
127
+ </div>
128
+ </div>
129
+ <div class="flex justify-center">
130
+ <div class="relative">
131
+ <div class="bg-white rounded-2xl shadow-xl p-6 w-80 h-80 relative z-10">
132
+ <div class="bg-gray-200 border-2 border-dashed rounded-xl w-full h-full"></div>
133
+ </div>
134
+ <div class="absolute -bottom-6 -right-6 bg-[#4CAF50] rounded-2xl shadow-xl p-6 w-64 h-64">
135
+ <div class="bg-gray-200 border-2 border-dashed rounded-xl w-full h-full"></div>
136
+ </div>
137
+ </div>
138
+ </div>
139
+ </div>
140
+ </section>
141
+
142
+ <!-- Features Section -->
143
+ <section id="features" class="py-16 px-4 md:px-8 bg-white">
144
+ <div class="max-w-7xl mx-auto">
145
+ <h2 class="text-3xl md:text-4xl font-bold text-center mb-4 text-[#2A5C82]">Powerful Features</h2>
146
+ <p class="text-center text-gray-600 mb-16 max-w-3xl mx-auto">QuickFixSA empowers citizens and municipal officials to collaborate on improving community services</p>
147
+
148
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
149
+ <!-- Feature 1 -->
150
+ <div class="card bg-gray-50 rounded-xl p-6 shadow-md hover:shadow-lg transition">
151
+ <div class="w-16 h-16 rounded-full bg-[#2A5C82] flex items-center justify-center mb-6">
152
+ <i class="fas fa-map-marker-alt text-white text-2xl"></i>
153
+ </div>
154
+ <h3 class="text-xl font-bold mb-3">Real-Time Issue Tracking</h3>
155
+ <p class="text-gray-600">Report municipal issues with precise location mapping and track their resolution progress in real-time.</p>
156
+ </div>
157
+
158
+ <!-- Feature 2 -->
159
+ <div class="card bg-gray-50 rounded-xl p-6 shadow-md hover:shadow-lg transition">
160
+ <div class="w-16 h-16 rounded-full bg-[#4CAF50] flex items-center justify-center mb-6">
161
+ <i class="fas fa-users text-white text-2xl"></i>
162
+ </div>
163
+ <h3 class="text-xl font-bold mb-3">Community Collaboration</h3>
164
+ <p class="text-gray-600">Engage with neighbors and municipal officials through comments, upvotes, and status updates.</p>
165
+ </div>
166
+
167
+ <!-- Feature 3 -->
168
+ <div class="card bg-gray-50 rounded-xl p-6 shadow-md hover:shadow-lg transition">
169
+ <div class="w-16 h-16 rounded-full bg-[#E74C3C] flex items-center justify-center mb-6">
170
+ <i class="fas fa-bell text-white text-2xl"></i>
171
+ </div>
172
+ <h3 class="text-xl font-bold mb-3">Instant Notifications</h3>
173
+ <p class="text-gray-600">Receive SMS, email, and in-app alerts when your reported issues are updated or resolved.</p>
174
+ </div>
175
+ </div>
176
+ </div>
177
+ </section>
178
+
179
+ <!-- How It Works Section -->
180
+ <section id="how-it-works" class="py-16 px-4 md:px-8 bg-gray-50">
181
+ <div class="max-w-7xl mx-auto">
182
+ <h2 class="text-3xl md:text-4xl font-bold text-center mb-4 text-[#2A5C82]">How QuickFixSA Works</h2>
183
+ <p class="text-center text-gray-600 mb-16 max-w-3xl mx-auto">A simple three-step process to report and resolve municipal issues</p>
184
+
185
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
186
+ <!-- Step 1 -->
187
+ <div class="flex flex-col items-center text-center">
188
+ <div class="w-20 h-20 rounded-full bg-white border-4 border-[#2A5C82] flex items-center justify-center mb-6 text-[#2A5C82] text-3xl font-bold">1</div>
189
+ <h3 class="text-xl font-bold mb-3">Report an Issue</h3>
190
+ <p class="text-gray-600">Use our mobile app or website to report infrastructure issues with photos and location details.</p>
191
+ </div>
192
+
193
+ <!-- Step 2 -->
194
+ <div class="flex flex-col items-center text-center">
195
+ <div class="w-20 h-20 rounded-full bg-white border-4 border-[#4CAF50] flex items-center justify-center mb-6 text-[#4CAF50] text-3xl font-bold">2</div>
196
+ <h3 class="text-xl font-bold mb-3">Municipal Response</h3>
197
+ <p class="text-gray-600">Municipal officials review and assign your report to the appropriate department.</p>
198
+ </div>
199
+
200
+ <!-- Step 3 -->
201
+ <div class="flex flex-col items-center text-center">
202
+ <div class="w-20 h-20 rounded-full bg-white border-4 border-[#E74C3C] flex items-center justify-center mb-6 text-[#E74C3C] text-3xl font-bold">3</div>
203
+ <h3 class="text-xl font-bold mb-3">Track Resolution</h3>
204
+ <p class="text-gray-600">Monitor progress in real-time and receive notifications when your issue is resolved.</p>
205
+ </div>
206
+ </div>
207
+ </div>
208
+ </section>
209
+
210
+ <!-- Dashboard Preview -->
211
+ <section id="dashboard" class="py-16 px-4 md:px-8 bg-white">
212
+ <div class="max-w-7xl mx-auto">
213
+ <h2 class="text-3xl md:text-4xl font-bold text-center mb-4 text-[#2A5C82]">Your Personal Dashboard</h2>
214
+ <p class="text-center text-gray-600 mb-12 max-w-3xl mx-auto">Track all your reported issues in one place with real-time updates</p>
215
+
216
+ <div class="bg-gray-50 rounded-2xl shadow-lg overflow-hidden">
217
+ <!-- Dashboard Header -->
218
+ <div class="bg-[#2A5C82] text-white p-6">
219
+ <div class="flex justify-between items-center">
220
+ <h3 class="text-xl font-bold">Welcome, Thabo!</h3>
221
+ <button class="bg-[#4CAF50] hover:bg-[#3d8b40] text-white font-medium py-2 px-4 rounded-lg">
222
+ Report New Issue
223
+ </button>
224
+ </div>
225
+ </div>
226
+
227
+ <!-- Dashboard Filters -->
228
+ <div class="p-6 border-b">
229
+ <!-- Quick Actions -->
230
+ <div class="grid grid-cols-2 gap-4 mb-6">
231
+ <button class="bg-[#4CAF50] hover:bg-[#3d8b40] text-white font-medium py-4 px-6 rounded-lg flex items-center transition">
232
+ <i class="fas fa-plus-circle text-xl mr-3"></i>
233
+ <span>Report New Issue</span>
234
+ </button>
235
+ <button class="bg-[#2A5C82] hover:bg-[#1d4565] text-white font-medium py-4 px-6 rounded-lg flex items-center transition">
236
+ <i class="fas fa-history text-xl mr-3"></i>
237
+ <span>View My Reports</span>
238
+ </button>
239
+ </div>
240
+
241
+ <!-- Search & Filters -->
242
+ <div class="flex flex-wrap gap-4 mb-4 items-end">
243
+ <div class="flex-1 min-w-[300px]">
244
+ <label class="block text-gray-700 font-medium mb-1">Search</label>
245
+ <div class="relative">
246
+ <input type="text" placeholder="Search my reports..." class="w-full border border-gray-300 rounded-lg px-4 py-2 pl-10">
247
+ <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
248
+ </div>
249
+ </div>
250
+ <button class="bg-white border border-gray-300 rounded-lg px-4 py-2 hover:bg-gray-50 flex items-center">
251
+ <i class="fas fa-map-marked-alt mr-2 text-[#2A5C82]"></i>
252
+ <span>View Heatmap</span>
253
+ </button>
254
+ </div>
255
+
256
+ <div class="flex flex-wrap gap-4">
257
+ <select class="bg-white border border-gray-300 rounded-lg px-4 py-2">
258
+ <option>All Categories</option>
259
+ <option>Electrical</option>
260
+ <option>Water & Sewer</option>
261
+ <option>Roads</option>
262
+ <option>Safety</option>
263
+ </select>
264
+
265
+ <select class="bg-white border border-gray-300 rounded-lg px-4 py-2">
266
+ <option>All Statuses</option>
267
+ <option>Pending</option>
268
+ <option>In Progress</option>
269
+ <option>Resolved</option>
270
+ </select>
271
+
272
+ <select class="bg-white border border-gray-300 rounded-lg px-4 py-2">
273
+ <option>All Priorities</option>
274
+ <option>Low</option>
275
+ <option>Medium</option>
276
+ <option>High</option>
277
+ </select>
278
+
279
+ <button class="bg-white border border-gray-300 rounded-lg px-4 py-2 hover:bg-gray-50">
280
+ <i class="fas fa-sync-alt mr-2"></i> Refresh
281
+ </button>
282
+ </div>
283
+ </div>
284
+
285
+ <!-- Issues List -->
286
+ <div class="p-6">
287
+ <div class="grid grid-cols-1 gap-6">
288
+ <!-- Issue Card 1 -->
289
+ <div class="issue-card card bg-white rounded-xl p-6 shadow-md border-l-4 border-[#E74C3C] transition">
290
+ <div class="flex flex-wrap justify-between items-start gap-4">
291
+ <div>
292
+ <div class="priority-high text-white text-xs font-bold py-1 px-3 rounded-full inline-block mb-2">High Priority</div>
293
+ <h4 class="text-lg font-bold mb-1">Pothole on Main Road</h4>
294
+ <p class="text-gray-600 mb-3">Large pothole causing traffic hazards near Mandela Square</p>
295
+ <div class="flex flex-wrap gap-3">
296
+ <div class="flex items-center text-sm text-gray-500">
297
+ <i class="fas fa-map-marker-alt mr-2"></i> Johannesburg, Region B
298
+ </div>
299
+ <div class="flex items-center text-sm text-gray-500">
300
+ <i class="fas fa-calendar mr-2"></i> Reported: 15 Oct 2023
301
+ </div>
302
+ <div class="flex items-center text-sm text-gray-500">
303
+ <i class="fas fa-tag mr-2"></i> Roads
304
+ </div>
305
+ </div>
306
+ </div>
307
+ <div class="text-right">
308
+ <div class="status-in-progress text-white text-sm font-bold py-1 px-3 rounded-full mb-3">In Progress</div>
309
+ <div class="text-sm text-gray-500">Job Card: #QF-23015</div>
310
+ <div class="text-sm text-gray-500">Assigned to: Roads Dept</div>
311
+ </div>
312
+ </div>
313
+ </div>
314
+
315
+ <!-- Issue Card 2 -->
316
+ <div class="issue-card card bg-white rounded-xl p-6 shadow-md border-l-4 border-[#F39C12] transition">
317
+ <div class="flex flex-wrap justify-between items-start gap-4">
318
+ <div>
319
+ <div class="priority-medium text-white text-xs font-bold py-1 px-3 rounded-full inline-block mb-2">Medium Priority</div>
320
+ <h4 class="text-lg font-bold mb-1">Street Light Outage</h4>
321
+ <p class="text-gray-600 mb-3">Entire block without street lighting on Vilakazi Street</p>
322
+ <div class="flex flex-wrap gap-3">
323
+ <div class="flex items-center text-sm text-gray-500">
324
+ <i class="fas fa-map-marker-alt mr-2"></i> Soweto, Region D
325
+ </div>
326
+ <div class="flex items-center text-sm text-gray-500">
327
+ <i class="fas fa-calendar mr-2"></i> Reported: 12 Oct 2023
328
+ </div>
329
+ <div class="flex items-center text-sm text-gray-500">
330
+ <i class="fas fa-tag mr-2"></i> Electrical
331
+ </div>
332
+ </div>
333
+ </div>
334
+ <div class="text-right">
335
+ <div class="status-pending text-white text-sm font-bold py-1 px-3 rounded-full mb-3">Pending</div>
336
+ <div class="text-sm text-gray-500">Job Card: #QF-23012</div>
337
+ <div class="text-sm text-gray-500">Awaiting assignment</div>
338
+ </div>
339
+ </div>
340
+ </div>
341
+
342
+ <!-- Issue Card 3 -->
343
+ <div class="issue-card card bg-white rounded-xl p-6 shadow-md border-l-4 border-[#2ECC71] transition">
344
+ <div class="flex flex-wrap justify-between items-start gap-4">
345
+ <div>
346
+ <div class="priority-low text-white text-xs font-bold py-1 px-3 rounded-full inline-block mb-2">Low Priority</div>
347
+ <h4 class="text-lg font-bold mb-1">Water Leak in Park</h4>
348
+ <p class="text-gray-600 mb-3">Constant water leak near playground in Freedom Park</p>
349
+ <div class="flex flex-wrap gap-3">
350
+ <div class="flex items-center text-sm text-gray-500">
351
+ <i class="fas fa-map-marker-alt mr-2"></i> Pretoria, Region 3
352
+ </div>
353
+ <div class="flex items-center text-sm text-gray-500">
354
+ <i class="fas fa-calendar mr-2"></i> Reported: 5 Oct 2023
355
+ </div>
356
+ <div class="flex items-center text-sm text-gray-500">
357
+ <i class="fas fa-tag mr-2"></i> Water & Sewer
358
+ </div>
359
+ </div>
360
+ </div>
361
+ <div class="text-right">
362
+ <div class="status-resolved text-white text-sm font-bold py-1 px-3 rounded-full mb-3">Resolved</div>
363
+ <div class="text-sm text-gray-500">Job Card: #QF-23005</div>
364
+ <div class="text-sm text-gray-500">Resolved: 10 Oct 2023</div>
365
+ </div>
366
+ </div>
367
+ </div>
368
+ </div>
369
+ </div>
370
+ </div>
371
+ </div>
372
+ </section>
373
+
374
+ <!-- Report Modal -->
375
+ <div id="report-modal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden items-center justify-center p-4">
376
+ <div class="bg-white rounded-2xl shadow-xl max-w-2xl w-full max-h-[90vh] overflow-y-auto">
377
+ <div class="sticky top-0 bg-white p-6 border-b flex justify-between items-center">
378
+ <h3 class="text-xl font-bold text-[#2A5C82]">Report New Issue</h3>
379
+ <button id="close-modal" class="text-gray-500 hover:text-gray-700">
380
+ <i class="fas fa-times text-2xl"></i>
381
+ </button>
382
+ </div>
383
+
384
+ <div class="p-6">
385
+ <form id="issue-form">
386
+ <!-- Category -->
387
+ <div class="mb-6">
388
+ <label class="block text-gray-700 font-medium mb-2">Category</label>
389
+ <div class="grid grid-cols-2 md:grid-cols-4 gap-3">
390
+ <button type="button" class="category-btn bg-gray-100 hover:bg-gray-200 rounded-lg py-3 px-4 text-center transition" data-category="electrical">
391
+ <i class="fas fa-bolt text-2xl text-yellow-500 mb-2"></i>
392
+ <div>Electrical</div>
393
+ </button>
394
+ <button type="button" class="category-btn bg-gray-100 hover:bg-gray-200 rounded-lg py-3 px-4 text-center transition" data-category="water">
395
+ <i class="fas fa-faucet text-2xl text-blue-500 mb-2"></i>
396
+ <div>Water & Sewer</div>
397
+ </button>
398
+ <button type="button" class="category-btn bg-gray-100 hover:bg-gray-200 rounded-lg py-3 px-4 text-center transition" data-category="roads">
399
+ <i class="fas fa-road text-2xl text-gray-700 mb-2"></i>
400
+ <div>Roads</div>
401
+ </button>
402
+ <button type="button" class="category-btn bg-gray-100 hover:bg-gray-200 rounded-lg py-3 px-4 text-center transition" data-category="safety">
403
+ <i class="fas fa-shield-alt text-2xl text-red-500 mb-2"></i>
404
+ <div>Safety</div>
405
+ </button>
406
+ </div>
407
+ <input type="hidden" name="category" id="category-input">
408
+ </div>
409
+
410
+ <!-- Location -->
411
+ <div class="mb-6">
412
+ <label class="block text-gray-700 font-medium mb-2">Location</label>
413
+ <div class="map-container rounded-lg mb-3 relative">
414
+ <div class="absolute top-4 right-4 bg-white rounded-lg shadow-md p-2">
415
+ <button type="button" class="px-3 py-1 text-sm">
416
+ <i class="fas fa-location-arrow mr-1"></i> Use Current Location
417
+ </button>
418
+ </div>
419
+ </div>
420
+ <div class="text-sm text-gray-600 mb-3">Drag the marker to adjust location</div>
421
+ <input type="text" placeholder="Address or landmark" class="w-full border border-gray-300 rounded-lg px-4 py-2">
422
+ </div>
423
+
424
+ <!-- Description -->
425
+ <div class="mb-6">
426
+ <div class="flex items-center justify-between mb-2">
427
+ <label class="block text-gray-700 font-medium">Description</label>
428
+ <div class="flex items-center text-sm text-gray-500">
429
+ <i class="fas fa-question-circle mr-1"></i>
430
+ <span>Tip: Include specific location details</span>
431
+ </div>
432
+ </div>
433
+ <textarea
434
+ placeholder="Describe the issue in detail (e.g. 'Large pothole near entrance of Mandela Park')..."
435
+ rows="3"
436
+ class="w-full border border-gray-300 rounded-lg px-4 py-2"
437
+ data-tooltip="Be specific about the location and size of the issue"
438
+ ></textarea>
439
+ </div>
440
+
441
+ <!-- Media Upload -->
442
+ <div class="mb-6">
443
+ <label class="block text-gray-700 font-medium mb-2">Add Photos or Videos</label>
444
+ <div id="drop-area" class="drop-area border-dashed rounded-lg p-8 text-center cursor-pointer">
445
+ <i class="fas fa-cloud-upload-alt text-4xl text-gray-400 mb-3"></i>
446
+ <p class="text-gray-500">Drag & drop files here or click to browse</p>
447
+ <p class="text-sm text-gray-400 mt-2">Supports JPG, PNG, MP4 (max 20MB each)</p>
448
+ </div>
449
+ <div id="file-list" class="mt-4 grid grid-cols-3 gap-3"></div>
450
+ </div>
451
+
452
+ <!-- Priority -->
453
+ <div class="mb-6">
454
+ <label class="block text-gray-700 font-medium mb-2">Priority Level</label>
455
+ <div class="grid grid-cols-3 gap-3">
456
+ <button type="button" class="priority-btn bg-gray-100 hover:bg-gray-200 rounded-lg py-3 px-4 text-center transition" data-priority="low">
457
+ <div class="priority-low text-white text-xs font-bold py-1 px-3 rounded-full mb-2">Low</div>
458
+ <div>Not urgent</div>
459
+ </button>
460
+ <button type="button" class="priority-btn bg-gray-100 hover:bg-gray-200 rounded-lg py-3 px-4 text-center transition" data-priority="medium">
461
+ <div class="priority-medium text-white text-xs font-bold py-1 px-3 rounded-full mb-2">Medium</div>
462
+ <div>Needs attention</div>
463
+ </button>
464
+ <button type="button" class="priority-btn bg-gray-100 hover:bg-gray-200 rounded-lg py-3 px-4 text-center transition" data-priority="high">
465
+ <div class="priority-high text-white text-xs font-bold py-1 px-3 rounded-full mb-2">High</div>
466
+ <div>Urgent/Safety risk</div>
467
+ </button>
468
+ </div>
469
+ <input type="hidden" name="priority" id="priority-input">
470
+ </div>
471
+
472
+ <!-- Submit Button -->
473
+ <div class="mt-8">
474
+ <button type="submit" class="w-full bg-[#4CAF50] hover:bg-[#3d8b40] text-white font-bold py-3 px-4 rounded-lg text-lg transition">
475
+ Submit Report
476
+ </button>
477
+ </div>
478
+ </form>
479
+ </div>
480
+ </div>
481
+ </div>
482
+
483
+ <!-- Login Modal -->
484
+ <div id="login-modal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden items-center justify-center p-4">
485
+ <div class="bg-white rounded-2xl shadow-xl max-w-md w-full">
486
+ <div class="p-8">
487
+ <div class="text-center mb-8">
488
+ <div class="bg-[#2A5C82] text-white font-bold text-2xl py-3 px-4 rounded-lg inline-block mb-4">QF</div>
489
+ <h3 class="text-2xl font-bold text-gray-800">Sign In to QuickFixSA</h3>
490
+ <p class="text-gray-600 mt-2">Access your civic engagement dashboard</p>
491
+ </div>
492
+
493
+ <form id="login-form">
494
+ <div class="mb-5">
495
+ <label class="block text-gray-700 font-medium mb-2">Email Address</label>
496
+ <input type="email" placeholder="you@example.com" class="w-full border border-gray-300 rounded-lg px-4 py-3">
497
+ </div>
498
+
499
+ <div class="mb-5 relative">
500
+ <label class="block text-gray-700 font-medium mb-2">Password</label>
501
+ <input type="password" id="password-input" placeholder="β€’β€’β€’β€’β€’β€’β€’β€’" class="w-full border border-gray-300 rounded-lg px-4 py-3 pr-10">
502
+ <button type="button" id="toggle-password" class="absolute right-3 top-10 text-gray-500 hover:text-gray-700">
503
+ <i class="far fa-eye"></i>
504
+ </button>
505
+ <div id="password-strength" class="h-1 mt-2 bg-gray-200 rounded-full overflow-hidden hidden">
506
+ <div class="h-full w-0" id="strength-meter"></div>
507
+ </div>
508
+ </div>
509
+
510
+ <div class="flex justify-between items-center mb-6">
511
+ <div class="flex items-center">
512
+ <input type="checkbox" id="remember" class="mr-2">
513
+ <label for="remember" class="text-gray-600">Remember me</label>
514
+ </div>
515
+ <a href="#" class="text-[#2A5C82] hover:underline">Forgot password?</a>
516
+ </div>
517
+
518
+ <button type="submit" class="w-full bg-[#2A5C82] hover:bg-[#1d4565] text-white font-bold py-3 px-4 rounded-lg text-lg mb-4 transition">
519
+ Sign In
520
+ </button>
521
+
522
+ <div class="text-center text-gray-600 mb-4">or continue with</div>
523
+
524
+ <div class="grid grid-cols-2 gap-3 mb-6">
525
+ <button class="flex items-center justify-center bg-gray-100 hover:bg-gray-200 py-3 rounded-lg transition">
526
+ <i class="fab fa-google text-red-500 mr-2"></i> Google
527
+ </button>
528
+ <button class="flex items-center justify-center bg-gray-100 hover:bg-gray-200 py-3 rounded-lg transition">
529
+ <i class="fab fa-facebook text-blue-600 mr-2"></i> Facebook
530
+ </button>
531
+ </div>
532
+
533
+ <div class="text-center text-gray-600">
534
+ Don't have an account? <a href="#" class="text-[#2A5C82] font-medium hover:underline">Sign Up</a>
535
+ </div>
536
+ </form>
537
+ </div>
538
+ </div>
539
+ </div>
540
+
541
+ <!-- Admin Dashboard (Officials) -->
542
+ <section id="admin-dashboard" class="py-16 px-4 md:px-8 bg-gray-100">
543
+ <div class="max-w-7xl mx-auto">
544
+ <div class="flex justify-between items-center mb-8">
545
+ <h2 class="text-3xl font-bold text-[#2A5C82]">Municipal Admin Dashboard</h2>
546
+ <div class="flex gap-4">
547
+ <select class="bg-white border border-gray-300 rounded-lg px-4 py-2">
548
+ <option>All Departments</option>
549
+ <option>Roads</option>
550
+ <option>Electricity</option>
551
+ <option>Water</option>
552
+ </select>
553
+ </div>
554
+ </div>
555
+
556
+ <div class="bg-white rounded-xl shadow-lg overflow-hidden">
557
+ <!-- Report Table -->
558
+ <div class="overflow-x-auto">
559
+ <table class="w-full">
560
+ <thead class="bg-gray-50">
561
+ <tr>
562
+ <th class="p-4 text-left font-medium">Job ID</th>
563
+ <th class="p-4 text-left font-medium">Category</th>
564
+ <th class="p-4 text-left font-medium">Description</th>
565
+ <th class="p-4 text-left font-medium">Reporter</th>
566
+ <th class="p-4 text-left font-medium">Priority</th>
567
+ <th class="p-4 text-left font-medium">Status</th>
568
+ <th class="p-4 text-left font-medium">Actions</th>
569
+ </tr>
570
+ </thead>
571
+ <tbody class="divide-y divide-gray-200">
572
+ <!-- Sample Row -->
573
+ <tr>
574
+ <td class="p-4">#QF-23015</td>
575
+ <td class="p-4">
576
+ <span class="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded">Roads</span>
577
+ </td>
578
+ <td class="p-4">Large pothole on Main Road</td>
579
+ <td class="p-4">Thabo M.</td>
580
+ <td class="p-4">
581
+ <span class="priority-high text-white text-xs font-bold py-1 px-2 rounded-full">High</span>
582
+ </td>
583
+ <td class="p-4">
584
+ <span class="status-in-progress text-white text-xs font-bold py-1 px-2 rounded-full">In Progress</span>
585
+ </td>
586
+ <td class="p-4">
587
+ <button class="text-[#2A5C82] hover:text-[#1d4565] mr-2">
588
+ <i class="fas fa-edit"></i>
589
+ </button>
590
+ <button class="text-[#4CAF50] hover:text-[#3d8b40]">
591
+ <i class="fas fa-check"></i>
592
+ </button>
593
+ </td>
594
+ </tr>
595
+ </tbody>
596
+ </table>
597
+ </div>
598
+
599
+ <!-- Activity Log -->
600
+ <div class="p-6 border-t">
601
+ <h3 class="text-xl font-bold mb-4 text-[#2A5C82]">Activity Log</h3>
602
+ <div class="space-y-4">
603
+ <div class="flex items-start">
604
+ <div class="bg-blue-100 text-blue-800 rounded-full w-8 h-8 flex items-center justify-center mr-3 mt-1">
605
+ <i class="fas fa-user-shield"></i>
606
+ </div>
607
+ <div>
608
+ <p class="font-medium">Assigned to Roads Department</p>
609
+ <p class="text-sm text-gray-500">Today at 09:24 AM by Officer Mkhize</p>
610
+ </div>
611
+ </div>
612
+ </div>
613
+ </div>
614
+ </div>
615
+ </div>
616
+ </section>
617
+
618
+ <!-- Footer -->
619
+ <footer class="bg-[#2A5C82] text-white py-12 px-4 md:px-8">
620
+ <div class="max-w-7xl mx-auto grid grid-cols-1 md:grid-cols-4 gap-8">
621
+ <div>
622
+ <div class="flex items-center mb-4">
623
+ <div class="bg-white text-[#2A5C82] font-bold text-xl py-2 px-3 rounded-lg mr-3">QF</div>
624
+ <span class="text-xl font-bold">QuickFixSA</span>
625
+ </div>
626
+ <p class="text-gray-300 mb-4">Empowering communities through civic engagement.</p>
627
+ <div class="flex space-x-4">
628
+ <a href="#" class="text-gray-300 hover:text-white"><i class="fab fa-facebook-f"></i></a>
629
+ <a href="#" class="text-gray-300 hover:text-white"><i class="fab fa-twitter"></i></a>
630
+ <a href="#" class="text-gray-300 hover:text-white"><i class="fab fa-instagram"></i></a>
631
+ </div>
632
+ </div>
633
+
634
+ <div>
635
+ <h4 class="text-lg font-bold mb-4">Quick Links</h4>
636
+ <ul class="space-y-2">
637
+ <li><a href="#" class="text-gray-300 hover:text-white">Home</a></li>
638
+ <li><a href="#" class="text-gray-300 hover:text-white">Report Issue</a></li>
639
+ <li><a href="#" class="text-gray-300 hover:text-white">My Dashboard</a></li>
640
+ <li><a href="#" class="text-gray-300 hover:text-white">How It Works</a></li>
641
+ </ul>
642
+ </div>
643
+
644
+ <div>
645
+ <h4 class="text-lg font-bold mb-4">Resources</h4>
646
+ <ul class="space-y-2">
647
+ <li><a href="#" class="text-gray-300 hover:text-white">Help Center</a></li>
648
+ <li><a href="#" class="text-gray-300 hover:text-white">Municipal Contacts</a></li>
649
+ <li><a href="#" class="text-gray-300 hover:text-white">Community Guidelines</a></li>
650
+ <li><a href="#" class="text-gray-300 hover:text-white">FAQ</a></li>
651
+ </ul>
652
+ </div>
653
+
654
+ <div>
655
+ <h4 class="text-lg font-bold mb-4">Contact Us</h4>
656
+ <ul class="space-y-2">
657
+ <li class="flex items-start">
658
+ <i class="fas fa-envelope mt-1 mr-3 text-gray-300"></i>
659
+ <span>support@quickfixsa.co.za</span>
660
+ </li>
661
+ <li class="flex items-start">
662
+ <i class="fas fa-phone mt-1 mr-3 text-gray-300"></i>
663
+ <span>+27 11 123 4567</span>
664
+ </li>
665
+ <li class="flex items-start">
666
+ <i class="fas fa-map-marker-alt mt-1 mr-3 text-gray-300"></i>
667
+ <span>Johannesburg, South Africa</span>
668
+ </li>
669
+ </ul>
670
+ </div>
671
+ </div>
672
+
673
+ <div class="max-w-7xl mx-auto mt-12 pt-6 border-t border-gray-700 text-center text-gray-400">
674
+ <p>&copy; 2023 QuickFixSA. All rights reserved. | Privacy Policy | Terms of Service</p>
675
+ </div>
676
+ </footer>
677
+
678
+ <script>
679
+ // Mobile Menu Toggle
680
+ const mobileMenuBtn = document.getElementById('mobile-menu-btn');
681
+ const mobileMenu = document.getElementById('mobile-menu');
682
+
683
+ mobileMenuBtn.addEventListener('click', () => {
684
+ mobileMenu.classList.toggle('hidden');
685
+ });
686
+
687
+ // Scroll Shrink Navigation
688
+ const navbar = document.getElementById('navbar');
689
+ window.addEventListener('scroll', () => {
690
+ if (window.scrollY > 50) {
691
+ navbar.classList.add('shrink');
692
+ } else {
693
+ navbar.classList.remove('shrink');
694
+ }
695
+ });
696
+
697
+ // Dark Mode Toggle
698
+ const darkModeToggle = document.getElementById('dark-mode-toggle');
699
+ darkModeToggle.addEventListener('click', () => {
700
+ document.body.classList.toggle('dark-mode');
701
+ });
702
+
703
+ // Report Modal
704
+ const reportBtn = document.getElementById('report-btn');
705
+ const reportModal = document.getElementById('report-modal');
706
+ const closeModal = document.getElementById('close-modal');
707
+
708
+ reportBtn.addEventListener('click', () => {
709
+ reportModal.classList.remove('hidden');
710
+ reportModal.classList.add('flex');
711
+ });
712
+
713
+ closeModal.addEventListener('click', () => {
714
+ reportModal.classList.add('hidden');
715
+ reportModal.classList.remove('flex');
716
+ });
717
+
718
+ // Login Modal
719
+ const loginBtn = document.getElementById('login-btn');
720
+ const loginModal = document.getElementById('login-modal');
721
+
722
+ loginBtn.addEventListener('click', () => {
723
+ loginModal.classList.remove('hidden');
724
+ loginModal.classList.add('flex');
725
+ });
726
+
727
+ // Close modals when clicking outside
728
+ window.addEventListener('click', (e) => {
729
+ if (e.target === reportModal) {
730
+ reportModal.classList.add('hidden');
731
+ reportModal.classList.remove('flex');
732
+ }
733
+ if (e.target === loginModal) {
734
+ loginModal.classList.add('hidden');
735
+ loginModal.classList.remove('flex');
736
+ }
737
+ });
738
+
739
+ // Category Selection
740
+ const categoryBtns = document.querySelectorAll('.category-btn');
741
+ const categoryInput = document.getElementById('category-input');
742
+
743
+ categoryBtns.forEach(btn => {
744
+ btn.addEventListener('click', () => {
745
+ // Remove active class from all buttons
746
+ categoryBtns.forEach(b => b.classList.remove('bg-[#2A5C82]', 'text-white'));
747
+
748
+ // Add active class to clicked button
749
+ btn.classList.add('bg-[#2A5C82]', 'text-white');
750
+
751
+ // Set the hidden input value
752
+ categoryInput.value = btn.dataset.category;
753
+ });
754
+ });
755
+
756
+ // Priority Selection
757
+ const priorityBtns = document.querySelectorAll('.priority-btn');
758
+ const priorityInput = document.getElementById('priority-input');
759
+
760
+ priorityBtns.forEach(btn => {
761
+ btn.addEventListener('click', () => {
762
+ // Remove active class from all buttons
763
+ priorityBtns.forEach(b => b.classList.remove('ring-2', 'ring-[#2A5C82]'));
764
+
765
+ // Add active class to clicked button
766
+ btn.classList.add('ring-2', 'ring-[#2A5C82]');
767
+
768
+ // Set the hidden input value
769
+ priorityInput.value = btn.dataset.priority;
770
+ });
771
+ });
772
+
773
+ // Drag and drop file upload
774
+ const dropArea = document.getElementById('drop-area');
775
+ const fileList = document.getElementById('file-list');
776
+
777
+ ['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
778
+ dropArea.addEventListener(eventName, preventDefaults, false);
779
+ });
780
+
781
+ function preventDefaults(e) {
782
+ e.preventDefault();
783
+ e.stopPropagation();
784
+ }
785
+
786
+ ['dragenter', 'dragover'].forEach(eventName => {
787
+ dropArea.addEventListener(eventName, highlight, false);
788
+ });
789
+
790
+ ['dragleave', 'drop'].forEach(eventName => {
791
+ dropArea.addEventListener(eventName, unhighlight, false);
792
+ });
793
+
794
+ function highlight() {
795
+ dropArea.classList.add('active');
796
+ }
797
+
798
+ function unhighlight() {
799
+ dropArea.classList.remove('active');
800
+ }
801
+
802
+ dropArea.addEventListener('drop', handleDrop, false);
803
+
804
+ function handleDrop(e) {
805
+ const dt = e.dataTransfer;
806
+ const files = dt.files;
807
+ handleFiles(files);
808
+ }
809
+
810
+ function handleFiles(files) {
811
+ for (let i = 0; i < files.length; i++) {
812
+ const file = files[i];
813
+ if (file.type.startsWith('image/') || file.type.startsWith('video/')) {
814
+ previewFile(file);
815
+ }
816
+ }
817
+ }
818
+
819
+ function previewFile(file) {
820
+ const reader = new FileReader();
821
+ reader.readAsDataURL(file);
822
+ reader.onloadend = function() {
823
+ const preview = document.createElement('div');
824
+ preview.className = 'relative';
825
+
826
+ if (file.type.startsWith('image/')) {
827
+ preview.innerHTML = `
828
+ <img src="${reader.result}" alt="Preview" class="w-full h-32 object-cover rounded-lg">
829
+ <button class="absolute top-1 right-1 bg-red-500 text-white rounded-full w-6 h-6 flex items-center justify-center">
830
+ <i class="fas fa-times text-xs"></i>
831
+ </button>
832
+ `;
833
+ } else {
834
+ preview.innerHTML = `
835
+ <video controls class="w-full h-32 object-cover rounded-lg">
836
+ <source src="${reader.result}" type="${file.type}">
837
+ </video>
838
+ <button class="absolute top-1 right-1 bg-red-500 text-white rounded-full w-6 h-6 flex items-center justify-center">
839
+ <i class="fas fa-times text-xs"></i>
840
+ </button>
841
+ `;
842
+ }
843
+
844
+ fileList.appendChild(preview);
845
+
846
+ // Add remove functionality
847
+ const removeBtn = preview.querySelector('button');
848
+ removeBtn.addEventListener('click', () => {
849
+ preview.remove();
850
+ });
851
+ };
852
+ }
853
+
854
+ // Password visibility toggle
855
+ const togglePassword = document.getElementById('toggle-password');
856
+ const passwordInput = document.getElementById('password-input');
857
+
858
+ togglePassword.addEventListener('click', () => {
859
+ const isPassword = passwordInput.type === 'password';
860
+ passwordInput.type = isPassword ? 'text' : 'password';
861
+ togglePassword.innerHTML = isPassword ? '<i class="far fa-eye-slash"></i>' : '<i class="far fa-eye"></i>';
862
+ });
863
+
864
+ // Password strength meter
865
+ passwordInput.addEventListener('input', () => {
866
+ const strengthMeter = document.getElementById('password-strength');
867
+ const meter = document.getElementById('strength-meter');
868
+
869
+ if(passwordInput.value.length > 0) {
870
+ strengthMeter.classList.remove('hidden');
871
+
872
+ // Simple strength calculation
873
+ const strength = Math.min(100, passwordInput.value.length * 5);
874
+ meter.style.width = `${strength}%`;
875
+
876
+ if(strength < 40) {
877
+ meter.className = 'h-full bg-red-500';
878
+ } else if(strength < 70) {
879
+ meter.className = 'h-full bg-yellow-500';
880
+ } else {
881
+ meter.className = 'h-full bg-green-500';
882
+ }
883
+ } else {
884
+ strengthMeter.classList.add('hidden');
885
+ }
886
+ });
887
+
888
+ // Form validation
889
+ const forms = document.querySelectorAll('form');
890
+ forms.forEach(form => {
891
+ form.addEventListener('submit', function(e) {
892
+ let isValid = true;
893
+
894
+ // Check required fields
895
+ this.querySelectorAll('[required]').forEach(field => {
896
+ if(!field.value.trim()) {
897
+ field.classList.add('border-red-500');
898
+ isValid = false;
899
+ } else {
900
+ field.classList.remove('border-red-500');
901
+
902
+ // Email validation
903
+ if(field.type === 'email' && !/^\S+@\S+\.\S+$/.test(field.value)) {
904
+ field.classList.add('border-red-500');
905
+ isValid = false;
906
+ }
907
+ }
908
+ });
909
+
910
+ if(!isValid) {
911
+ e.preventDefault();
912
+ alert('Please fill in all required fields correctly.');
913
+ }
914
+ });
915
+ });
916
+
917
+ // Form submission
918
+ const issueForm = document.getElementById('issue-form');
919
+ issueForm.addEventListener('submit', (e) => {
920
+ e.preventDefault();
921
+ alert('Issue report submitted successfully!');
922
+ reportModal.classList.add('hidden');
923
+ reportModal.classList.remove('flex');
924
+ issueForm.reset();
925
+ fileList.innerHTML = '';
926
+ });
927
+
928
+ const loginForm = document.getElementById('login-form');
929
+ loginForm.addEventListener('submit', (e) => {
930
+ e.preventDefault();
931
+ alert('Login successful! Redirecting to dashboard...');
932
+ loginModal.classList.add('hidden');
933
+ loginModal.classList.remove('flex');
934
+ });
935
+
936
+ // Initialize scroll behavior
937
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
938
+ anchor.addEventListener('click', function (e) {
939
+ e.preventDefault();
940
+ document.querySelector(this.getAttribute('href')).scrollIntoView({
941
+ behavior: 'smooth'
942
+ });
943
+ });
944
+ });
945
+ </script>
946
+ <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=RebelofSleep/e" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
947
+ </html>