File size: 33,629 Bytes
57919f0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Community Forum</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        /* Custom scrollbar */
        ::-webkit-scrollbar {
            width: 8px;
        }
        ::-webkit-scrollbar-track {
            background: #f1f1f1;
        }
        ::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 4px;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: #555;
        }
        
        /* Animation for new posts */
        @keyframes highlight {
            0% { background-color: rgba(254, 240, 138, 0.5); }
            100% { background-color: transparent; }
        }
        .new-post {
            animation: highlight 2s ease-out;
        }
        
        /* Custom checkbox */
        .custom-checkbox {
            appearance: none;
            -webkit-appearance: none;
            width: 20px;
            height: 20px;
            border: 2px solid #d1d5db;
            border-radius: 4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .custom-checkbox:checked {
            background-color: #3b82f6;
            border-color: #3b82f6;
        }
        .custom-checkbox:checked::after {
            content: "✓";
            color: white;
            font-size: 12px;
        }
    </style>
</head>
<body class="bg-gray-100 font-sans">
    <!-- Header -->
    <header class="bg-indigo-700 text-white shadow-lg">
        <div class="container mx-auto px-4 py-3 flex justify-between items-center">
            <div class="flex items-center space-x-2">
                <i class="fas fa-comments text-2xl"></i>
                <h1 class="text-2xl font-bold">Community Forum</h1>
            </div>
            <div class="flex items-center space-x-4">
                <div class="relative hidden md:block">
                    <input type="text" placeholder="Search forums..." class="px-4 py-2 rounded-full text-gray-800 w-64 focus:outline-none focus:ring-2 focus:ring-indigo-500">
                    <button class="absolute right-3 top-2 text-gray-500">
                        <i class="fas fa-search"></i>
                    </button>
                </div>
                <div class="flex items-center space-x-2">
                    <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="w-8 h-8 rounded-full border-2 border-white">
                    <span class="hidden md:inline">Sarah</span>
                </div>
            </div>
        </div>
    </header>

    <!-- Main Content -->
    <div class="container mx-auto px-4 py-6 flex flex-col md:flex-row gap-6">
        <!-- Sidebar -->
        <aside class="w-full md:w-64 flex-shrink-0">
            <div class="bg-white rounded-lg shadow-md p-4 mb-4">
                <h2 class="text-lg font-semibold mb-4 text-gray-800">Categories</h2>
                <ul class="space-y-2">
                    <li>
                        <a href="#" class="flex items-center px-3 py-2 rounded-md bg-indigo-50 text-indigo-700 font-medium">
                            <i class="fas fa-home mr-2"></i> Home
                        </a>
                    </li>
                    <li>
                        <a href="#" class="flex items-center px-3 py-2 rounded-md hover:bg-gray-100 text-gray-700">
                            <i class="fas fa-code mr-2"></i> Development
                        </a>
                    </li>
                    <li>
                        <a href="#" class="flex items-center px-3 py-2 rounded-md hover:bg-gray-100 text-gray-700">
                            <i class="fas fa-paint-brush mr-2"></i> Design
                        </a>
                    </li>
                    <li>
                        <a href="#" class="flex items-center px-3 py-2 rounded-md hover:bg-gray-100 text-gray-700">
                            <i class="fas fa-chart-line mr-2"></i> Marketing
                        </a>
                    </li>
                    <li>
                        <a href="#" class="flex items-center px-3 py-2 rounded-md hover:bg-gray-100 text-gray-700">
                            <i class="fas fa-question-circle mr-2"></i> Support
                        </a>
                    </li>
                    <li>
                        <a href="#" class="flex items-center px-3 py-2 rounded-md hover:bg-gray-100 text-gray-700">
                            <i class="fas fa-lightbulb mr-2"></i> Ideas
                        </a>
                    </li>
                </ul>
            </div>

            <div class="bg-white rounded-lg shadow-md p-4">
                <h2 class="text-lg font-semibold mb-4 text-gray-800">Forum Stats</h2>
                <div class="space-y-3">
                    <div class="flex justify-between">
                        <span class="text-gray-600">Total Threads</span>
                        <span class="font-medium">1,245</span>
                    </div>
                    <div class="flex justify-between">
                        <span class="text-gray-600">Total Posts</span>
                        <span class="font-medium">8,763</span>
                    </div>
                    <div class="flex justify-between">
                        <span class="text-gray-600">Members</span>
                        <span class="font-medium">3,421</span>
                    </div>
                    <div class="flex justify-between">
                        <span class="text-gray-600">Online Now</span>
                        <span class="font-medium text-green-600">128</span>
                    </div>
                </div>
            </div>
        </aside>

        <!-- Main Forum Content -->
        <main class="flex-1">
            <!-- Breadcrumbs -->
            <nav class="flex mb-4" aria-label="Breadcrumb">
                <ol class="inline-flex items-center space-x-1 md:space-x-3">
                    <li class="inline-flex items-center">
                        <a href="#" class="inline-flex items-center text-sm font-medium text-gray-700 hover:text-indigo-600">
                            <i class="fas fa-home mr-2"></i>
                            Home
                        </a>
                    </li>
                    <li>
                        <div class="flex items-center">
                            <i class="fas fa-chevron-right text-gray-400 mx-1"></i>
                            <a href="#" class="ml-1 text-sm font-medium text-gray-700 hover:text-indigo-600 md:ml-2">Development</a>
                        </div>
                    </li>
                    <li aria-current="page">
                        <div class="flex items-center">
                            <i class="fas fa-chevron-right text-gray-400 mx-1"></i>
                            <span class="ml-1 text-sm font-medium text-indigo-600 md:ml-2">JavaScript</span>
                        </div>
                    </li>
                </ol>
            </nav>

            <!-- Forum Header -->
            <div class="bg-white rounded-lg shadow-md p-4 mb-4">
                <div class="flex flex-col md:flex-row md:items-center md:justify-between">
                    <div>
                        <h2 class="text-2xl font-bold text-gray-800">JavaScript Discussions</h2>
                        <p class="text-gray-600">Ask questions and share knowledge about JavaScript and related technologies</p>
                    </div>
                    <button id="newThreadBtn" class="mt-4 md:mt-0 bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-2 rounded-md flex items-center">
                        <i class="fas fa-plus mr-2"></i> New Thread
                    </button>
                </div>
            </div>

            <!-- Thread Filters -->
            <div class="bg-white rounded-lg shadow-md p-4 mb-4">
                <div class="flex flex-col md:flex-row md:items-center md:justify-between gap-4">
                    <div class="flex items-center space-x-2">
                        <input type="checkbox" id="unreadOnly" class="custom-checkbox">
                        <label for="unreadOnly" class="text-sm text-gray-700">Unread only</label>
                    </div>
                    <div class="flex items-center space-x-4">
                        <div class="relative">
                            <select class="appearance-none bg-gray-100 border border-gray-300 text-gray-700 py-2 px-4 pr-8 rounded-md focus:outline-none focus:ring-2 focus:ring-indigo-500">
                                <option>All Threads</option>
                                <option>Your Threads</option>
                                <option>Subscribed</option>
                            </select>
                            <div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
                                <i class="fas fa-chevron-down"></i>
                            </div>
                        </div>
                        <div class="relative">
                            <select class="appearance-none bg-gray-100 border border-gray-300 text-gray-700 py-2 px-4 pr-8 rounded-md focus:outline-none focus:ring-2 focus:ring-indigo-500">
                                <option>Newest First</option>
                                <option>Oldest First</option>
                                <option>Most Replies</option>
                                <option>Most Viewed</option>
                            </select>
                            <div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
                                <i class="fas fa-chevron-down"></i>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Thread List -->
            <div class="bg-white rounded-lg shadow-md overflow-hidden">
                <div class="divide-y divide-gray-200">
                    <!-- Thread Item -->
                    <div class="p-4 hover:bg-gray-50 transition-colors duration-150 new-post">
                        <div class="flex items-start">
                            <div class="flex-shrink-0 pt-1">
                                <div class="w-10 h-10 rounded-full bg-indigo-100 flex items-center justify-center">
                                    <i class="fas fa-user text-indigo-600"></i>
                                </div>
                            </div>
                            <div class="ml-3 flex-1">
                                <div class="flex items-center justify-between">
                                    <div>
                                        <span class="text-sm font-medium text-gray-900">John Doe</span>
                                        <span class="ml-2 text-xs text-gray-500">2 hours ago</span>
                                    </div>
                                    <div class="flex items-center space-x-2">
                                        <span class="px-2 py-1 bg-indigo-100 text-indigo-800 text-xs rounded-full">New</span>
                                        <button class="text-gray-400 hover:text-gray-600">
                                            <i class="fas fa-bookmark"></i>
                                        </button>
                                    </div>
                                </div>
                                <h3 class="mt-1 text-lg font-medium text-indigo-600 hover:underline cursor-pointer">
                                    How to optimize React performance with useMemo?
                                </h3>
                                <p class="mt-1 text-sm text-gray-600">
                                    I'm working on a large React application and noticing some performance issues. When should I use useMemo versus useCallback? What are the best practices...
                                </p>
                                <div class="mt-2 flex items-center text-sm text-gray-500 space-x-4">
                                    <span class="flex items-center">
                                        <i class="fas fa-comment mr-1"></i> 14 replies
                                    </span>
                                    <span class="flex items-center">
                                        <i class="fas fa-eye mr-1"></i> 245 views
                                    </span>
                                    <span class="flex items-center">
                                        <i class="fas fa-heart mr-1 text-red-500"></i> 8 likes
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- Thread Item -->
                    <div class="p-4 hover:bg-gray-50 transition-colors duration-150">
                        <div class="flex items-start">
                            <div class="flex-shrink-0 pt-1">
                                <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="User" class="w-10 h-10 rounded-full">
                            </div>
                            <div class="ml-3 flex-1">
                                <div class="flex items-center justify-between">
                                    <div>
                                        <span class="text-sm font-medium text-gray-900">Michael Chen</span>
                                        <span class="ml-2 text-xs text-gray-500">1 day ago</span>
                                    </div>
                                    <button class="text-gray-400 hover:text-gray-600">
                                        <i class="fas fa-bookmark"></i>
                                    </button>
                                </div>
                                <h3 class="mt-1 text-lg font-medium text-indigo-600 hover:underline cursor-pointer">
                                    TypeScript vs JavaScript in 2023 - Which one to choose?
                                </h3>
                                <p class="mt-1 text-sm text-gray-600">
                                    With TypeScript gaining popularity, is it worth switching from JavaScript for new projects? What are the pros and cons for a medium-sized team?
                                </p>
                                <div class="mt-2 flex items-center text-sm text-gray-500 space-x-4">
                                    <span class="flex items-center">
                                        <i class="fas fa-comment mr-1"></i> 27 replies
                                    </span>
                                    <span class="flex items-center">
                                        <i class="fas fa-eye mr-1"></i> 512 views
                                    </span>
                                    <span class="flex items-center">
                                        <i class="fas fa-heart mr-1 text-red-500"></i> 15 likes
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- Thread Item -->
                    <div class="p-4 hover:bg-gray-50 transition-colors duration-150">
                        <div class="flex items-start">
                            <div class="flex-shrink-0 pt-1">
                                <div class="w-10 h-10 rounded-full bg-green-100 flex items-center justify-center">
                                    <i class="fas fa-user-tie text-green-600"></i>
                                </div>
                            </div>
                            <div class="ml-3 flex-1">
                                <div class="flex items-center justify-between">
                                    <div>
                                        <span class="text-sm font-medium text-gray-900">Admin</span>
                                        <span class="ml-2 text-xs text-gray-500">3 days ago</span>
                                    </div>
                                    <div class="flex items-center space-x-2">
                                        <span class="px-2 py-1 bg-green-100 text-green-800 text-xs rounded-full">Announcement</span>
                                        <button class="text-gray-400 hover:text-gray-600">
                                            <i class="fas fa-bookmark"></i>
                                        </button>
                                    </div>
                                </div>
                                <h3 class="mt-1 text-lg font-medium text-indigo-600 hover:underline cursor-pointer">
                                    Forum Rules Update - Please Read
                                </h3>
                                <p class="mt-1 text-sm text-gray-600">
                                    We've updated our community guidelines to ensure a better experience for everyone. Please review the changes before posting.
                                </p>
                                <div class="mt-2 flex items-center text-sm text-gray-500 space-x-4">
                                    <span class="flex items-center">
                                        <i class="fas fa-comment mr-1"></i> 5 replies
                                    </span>
                                    <span class="flex items-center">
                                        <i class="fas fa-eye mr-1"></i> 1,024 views
                                    </span>
                                    <span class="flex items-center">
                                        <i class="fas fa-heart mr-1 text-red-500"></i> 42 likes
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- Thread Item -->
                    <div class="p-4 hover:bg-gray-50 transition-colors duration-150">
                        <div class="flex items-start">
                            <div class="flex-shrink-0 pt-1">
                                <img src="https://randomuser.me/api/portraits/women/68.jpg" alt="User" class="w-10 h-10 rounded-full">
                            </div>
                            <div class="ml-3 flex-1">
                                <div class="flex items-center justify-between">
                                    <div>
                                        <span class="text-sm font-medium text-gray-900">Lisa Rodriguez</span>
                                        <span class="ml-2 text-xs text-gray-500">5 days ago</span>
                                    </div>
                                    <button class="text-gray-400 hover:text-gray-600">
                                        <i class="fas fa-bookmark"></i>
                                    </button>
                                </div>
                                <h3 class="mt-1 text-lg font-medium text-indigo-600 hover:underline cursor-pointer">
                                    Best practices for error handling in Node.js applications
                                </h3>
                                <p class="mt-1 text-sm text-gray-600">
                                    I'm building a Node.js backend and want to implement robust error handling. What are the current best practices for handling and logging errors?
                                </p>
                                <div class="mt-2 flex items-center text-sm text-gray-500 space-x-4">
                                    <span class="flex items-center">
                                        <i class="fas fa-comment mr-1"></i> 9 replies
                                    </span>
                                    <span class="flex items-center">
                                        <i class="fas fa-eye mr-1"></i> 187 views
                                    </span>
                                    <span class="flex items-center">
                                        <i class="fas fa-heart mr-1 text-red-500"></i> 6 likes
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Pagination -->
            <div class="mt-6 flex items-center justify-between">
                <div class="text-sm text-gray-600">
                    Showing <span class="font-medium">1</span> to <span class="font-medium">4</span> of <span class="font-medium">124</span> threads
                </div>
                <div class="flex space-x-2">
                    <button class="px-3 py-1 rounded-md bg-gray-200 text-gray-700 hover:bg-gray-300">
                        <i class="fas fa-chevron-left"></i>
                    </button>
                    <button class="px-3 py-1 rounded-md bg-indigo-600 text-white">1</button>
                    <button class="px-3 py-1 rounded-md bg-white text-gray-700 hover:bg-gray-100">2</button>
                    <button class="px-3 py-1 rounded-md bg-white text-gray-700 hover:bg-gray-100">3</button>
                    <span class="px-3 py-1">...</span>
                    <button class="px-3 py-1 rounded-md bg-white text-gray-700 hover:bg-gray-100">12</button>
                    <button class="px-3 py-1 rounded-md bg-gray-200 text-gray-700 hover:bg-gray-300">
                        <i class="fas fa-chevron-right"></i>
                    </button>
                </div>
            </div>
        </main>
    </div>

    <!-- New Thread Modal -->
    <div id="newThreadModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
        <div class="bg-white rounded-lg shadow-xl w-full max-w-2xl max-h-[90vh] overflow-y-auto">
            <div class="p-6">
                <div class="flex justify-between items-center mb-4">
                    <h3 class="text-xl font-bold text-gray-800">Create New Thread</h3>
                    <button id="closeModalBtn" class="text-gray-500 hover:text-gray-700">
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                <form id="threadForm">
                    <div class="mb-4">
                        <label for="threadTitle" class="block text-sm font-medium text-gray-700 mb-1">Title</label>
                        <input type="text" id="threadTitle" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-indigo-500" placeholder="Enter your thread title">
                    </div>
                    <div class="mb-4">
                        <label for="threadCategory" class="block text-sm font-medium text-gray-700 mb-1">Category</label>
                        <select id="threadCategory" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-indigo-500">
                            <option>JavaScript</option>
                            <option>React</option>
                            <option>Node.js</option>
                            <option>TypeScript</option>
                            <option>General Discussion</option>
                        </select>
                    </div>
                    <div class="mb-4">
                        <label for="threadContent" class="block text-sm font-medium text-gray-700 mb-1">Content</label>
                        <div class="border border-gray-300 rounded-md">
                            <div class="flex border-b border-gray-300 bg-gray-100 px-3 py-1">
                                <button type="button" class="p-1 text-gray-600 hover:text-gray-800">
                                    <i class="fas fa-bold"></i>
                                </button>
                                <button type="button" class="p-1 text-gray-600 hover:text-gray-800">
                                    <i class="fas fa-italic"></i>
                                </button>
                                <button type="button" class="p-1 text-gray-600 hover:text-gray-800">
                                    <i class="fas fa-link"></i>
                                </button>
                                <button type="button" class="p-1 text-gray-600 hover:text-gray-800">
                                    <i class="fas fa-code"></i>
                                </button>
                                <button type="button" class="p-1 text-gray-600 hover:text-gray-800">
                                    <i class="fas fa-image"></i>
                                </button>
                            </div>
                            <textarea id="threadContent" rows="8" class="w-full px-3 py-2 focus:outline-none resize-none" placeholder="Write your post here..."></textarea>
                        </div>
                    </div>
                    <div class="flex justify-between items-center">
                        <div class="flex items-center space-x-2">
                            <input type="checkbox" id="subscribeThread" class="custom-checkbox">
                            <label for="subscribeThread" class="text-sm text-gray-700">Subscribe to this thread</label>
                        </div>
                        <div class="space-x-2">
                            <button type="button" id="cancelThreadBtn" class="px-4 py-2 text-gray-700 bg-gray-100 rounded-md hover:bg-gray-200">Cancel</button>
                            <button type="submit" class="px-4 py-2 text-white bg-indigo-600 rounded-md hover:bg-indigo-700">Post Thread</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <!-- Footer -->
    <footer class="bg-gray-800 text-white py-8 mt-12">
        <div class="container mx-auto px-4">
            <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
                <div>
                    <h3 class="text-lg font-semibold mb-4">Community Forum</h3>
                    <p class="text-gray-400">A place to share knowledge and connect with other developers and designers.</p>
                </div>
                <div>
                    <h3 class="text-lg font-semibold mb-4">Quick Links</h3>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-gray-400 hover:text-white">Home</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white">Categories</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white">Popular Threads</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white">Members</a></li>
                    </ul>
                </div>
                <div>
                    <h3 class="text-lg font-semibold mb-4">Help</h3>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-gray-400 hover:text-white">FAQ</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white">Guidelines</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white">Contact Us</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white">Privacy Policy</a></li>
                    </ul>
                </div>
                <div>
                    <h3 class="text-lg font-semibold mb-4">Connect</h3>
                    <div class="flex space-x-4">
                        <a href="#" class="text-gray-400 hover:text-white text-xl"><i class="fab fa-twitter"></i></a>
                        <a href="#" class="text-gray-400 hover:text-white text-xl"><i class="fab fa-facebook"></i></a>
                        <a href="#" class="text-gray-400 hover:text-white text-xl"><i class="fab fa-github"></i></a>
                        <a href="#" class="text-gray-400 hover:text-white text-xl"><i class="fab fa-discord"></i></a>
                    </div>
                    <p class="mt-4 text-gray-400">Subscribe to our newsletter</p>
                    <div class="mt-2 flex">
                        <input type="email" placeholder="Your email" class="px-3 py-2 text-gray-800 rounded-l-md w-full focus:outline-none">
                        <button class="bg-indigo-600 px-4 py-2 rounded-r-md hover:bg-indigo-700">Join</button>
                    </div>
                </div>
            </div>
            <div class="border-t border-gray-700 mt-8 pt-6 text-center text-gray-400">
                <p>&copy; 2023 Community Forum. All rights reserved.</p>
            </div>
        </div>
    </footer>

    <script>
        // Modal functionality
        const newThreadBtn = document.getElementById('newThreadBtn');
        const newThreadModal = document.getElementById('newThreadModal');
        const closeModalBtn = document.getElementById('closeModalBtn');
        const cancelThreadBtn = document.getElementById('cancelThreadBtn');
        const threadForm = document.getElementById('threadForm');

        newThreadBtn.addEventListener('click', () => {
            newThreadModal.classList.remove('hidden');
        });

        closeModalBtn.addEventListener('click', () => {
            newThreadModal.classList.add('hidden');
        });

        cancelThreadBtn.addEventListener('click', () => {
            newThreadModal.classList.add('hidden');
        });

        threadForm.addEventListener('submit', (e) => {
            e.preventDefault();
            const title = document.getElementById('threadTitle').value;
            const category = document.getElementById('threadCategory').value;
            const content = document.getElementById('threadContent').value;
            
            // Here you would typically send this data to a server
            console.log('New thread submitted:', { title, category, content });
            
            // Show success message
            alert('Your thread has been posted successfully!');
            newThreadModal.classList.add('hidden');
            
            // Reset form
            threadForm.reset();
        });

        // Close modal when clicking outside
        window.addEventListener('click', (e) => {
            if (e.target === newThreadModal) {
                newThreadModal.classList.add('hidden');
            }
        });

        // Bookmark functionality
        const bookmarkButtons = document.querySelectorAll('.fa-bookmark');
        bookmarkButtons.forEach(button => {
            button.addEventListener('click', (e) => {
                e.stopPropagation();
                const icon = e.target;
                if (icon.classList.contains('far')) {
                    icon.classList.remove('far');
                    icon.classList.add('fas', 'text-yellow-500');
                } else {
                    icon.classList.remove('fas', 'text-yellow-500');
                    icon.classList.add('far');
                }
            });
        });

        // Like functionality
        const likeButtons = document.querySelectorAll('.fa-heart');
        likeButtons.forEach(button => {
            button.addEventListener('click', (e) => {
                e.stopPropagation();
                const icon = e.target;
                const countElement = icon.nextElementSibling;
                
                if (icon.classList.contains('far')) {
                    icon.classList.remove('far');
                    icon.classList.add('fas');
                    countElement.textContent = parseInt(countElement.textContent) + 1;
                } else {
                    icon.classList.remove('fas');
                    icon.classList.add('far');
                    countElement.textContent = parseInt(countElement.textContent) - 1;
                }
            });
        });

        // Thread click functionality
        const threadTitles = document.querySelectorAll('h3.text-indigo-600');
        threadTitles.forEach(title => {
            title.addEventListener('click', () => {
                // In a real app, this would navigate to the thread page
                alert('Navigating to thread: ' + title.textContent);
            });
        });
    </script>
<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=pierrelev/test-2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>