SoftDisquiet commited on
Commit
48b4962
·
verified ·
1 Parent(s): 157c10d

let's get a decked out version of hack.chat (like hach.chat or other 3rd party clone) to make a space easy to put into subdomains. I have a backend if needed but u should be babe to work out. make the admin username "satanic" pw tswifttoes and a user "phil" pw buttmunch -thanks - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +6 -4
  2. index.html +674 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Dark Chat
3
- emoji: 🌍
4
  colorFrom: red
5
- colorTo: pink
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: dark-chat
3
+ emoji: 🐳
4
  colorFrom: red
5
+ colorTo: red
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,674 @@
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="dark">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>DarkChat | Secure Minimal Chat</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ @keyframes pulse {
11
+ 0%, 100% { opacity: 1; }
12
+ 50% { opacity: 0.5; }
13
+ }
14
+ .animate-pulse-slow {
15
+ animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
16
+ }
17
+ .message-enter {
18
+ animation: messageEnter 0.3s ease-out forwards;
19
+ }
20
+ @keyframes messageEnter {
21
+ from {
22
+ opacity: 0;
23
+ transform: translateY(10px);
24
+ }
25
+ to {
26
+ opacity: 1;
27
+ transform: translateY(0);
28
+ }
29
+ }
30
+ .scrollbar-hide::-webkit-scrollbar {
31
+ display: none;
32
+ }
33
+ .scrollbar-hide {
34
+ -ms-overflow-style: none;
35
+ scrollbar-width: none;
36
+ }
37
+ .typing-indicator::after {
38
+ content: '...';
39
+ display: inline-block;
40
+ width: 0;
41
+ animation: typingDots 1.5s steps(3, end) infinite;
42
+ }
43
+ @keyframes typingDots {
44
+ 0% { width: 0; }
45
+ 100% { width: 3ch; }
46
+ }
47
+ </style>
48
+ </head>
49
+ <body class="bg-gray-900 text-gray-100 min-h-screen flex flex-col">
50
+ <!-- Header -->
51
+ <header class="bg-gray-800 border-b border-gray-700 py-4 px-6 flex items-center justify-between">
52
+ <div class="flex items-center space-x-3">
53
+ <div class="w-8 h-8 bg-purple-600 rounded-full flex items-center justify-center">
54
+ <i class="fas fa-bolt text-white"></i>
55
+ </div>
56
+ <h1 class="text-xl font-bold bg-gradient-to-r from-purple-400 to-pink-500 bg-clip-text text-transparent">DarkChat</h1>
57
+ </div>
58
+ <div class="flex items-center space-x-4">
59
+ <button id="themeToggle" class="p-2 rounded-full hover:bg-gray-700 transition-colors">
60
+ <i class="fas fa-moon text-yellow-300"></i>
61
+ </button>
62
+ <button id="settingsToggle" class="p-2 rounded-full hover:bg-gray-700 transition-colors">
63
+ <i class="fas fa-cog text-gray-400"></i>
64
+ </button>
65
+ </div>
66
+ </header>
67
+
68
+ <!-- Main Content -->
69
+ <main class="flex-1 flex flex-col md:flex-row">
70
+ <!-- Sidebar -->
71
+ <aside id="sidebar" class="w-full md:w-64 bg-gray-800 border-r border-gray-700 p-4 hidden md:block">
72
+ <div class="mb-6">
73
+ <h2 class="text-sm uppercase font-semibold text-gray-400 mb-2">Channels</h2>
74
+ <div class="space-y-1">
75
+ <button class="channel-btn w-full text-left px-3 py-2 rounded bg-gray-700 text-purple-300 flex items-center justify-between">
76
+ <span>#general</span>
77
+ <span class="text-xs bg-purple-900 px-2 py-1 rounded-full">42</span>
78
+ </button>
79
+ <button class="channel-btn w-full text-left px-3 py-2 rounded hover:bg-gray-700 text-gray-300 flex items-center justify-between">
80
+ <span>#random</span>
81
+ <span class="text-xs bg-gray-600 px-2 py-1 rounded-full">17</span>
82
+ </button>
83
+ <button class="channel-btn w-full text-left px-3 py-2 rounded hover:bg-gray-700 text-gray-300 flex items-center justify-between">
84
+ <span>#help</span>
85
+ <span class="text-xs bg-gray-600 px-2 py-1 rounded-full">8</span>
86
+ </button>
87
+ </div>
88
+ </div>
89
+
90
+ <div class="mb-6">
91
+ <h2 class="text-sm uppercase font-semibold text-gray-400 mb-2">Direct Messages</h2>
92
+ <div class="space-y-1">
93
+ <button class="dm-btn w-full text-left px-3 py-2 rounded hover:bg-gray-700 text-gray-300 flex items-center">
94
+ <div class="w-3 h-3 rounded-full bg-green-500 mr-2"></div>
95
+ <span>@satanic</span>
96
+ </button>
97
+ <button class="dm-btn w-full text-left px-3 py-2 rounded hover:bg-gray-700 text-gray-300 flex items-center">
98
+ <div class="w-3 h-3 rounded-full bg-green-500 mr-2"></div>
99
+ <span>@phil</span>
100
+ </button>
101
+ <button class="dm-btn w-full text-left px-3 py-2 rounded hover:bg-gray-700 text-gray-300 flex items-center">
102
+ <div class="w-3 h-3 rounded-full bg-gray-500 mr-2"></div>
103
+ <span>@bot</span>
104
+ </button>
105
+ </div>
106
+ </div>
107
+
108
+ <div class="mt-auto">
109
+ <div class="flex items-center space-x-2 p-2 bg-gray-700 rounded-lg">
110
+ <div class="w-8 h-8 rounded-full bg-gradient-to-br from-purple-500 to-pink-500 flex items-center justify-center text-white font-bold">
111
+ Y
112
+ </div>
113
+ <div class="flex-1 min-w-0">
114
+ <p class="text-sm font-medium truncate">You</p>
115
+ <p class="text-xs text-gray-400 truncate">Online</p>
116
+ </div>
117
+ <button class="p-1 rounded hover:bg-gray-600">
118
+ <i class="fas fa-sign-out-alt text-gray-400"></i>
119
+ </button>
120
+ </div>
121
+ </div>
122
+ </aside>
123
+
124
+ <!-- Chat Area -->
125
+ <div class="flex-1 flex flex-col">
126
+ <!-- Channel Header -->
127
+ <div class="bg-gray-800 border-b border-gray-700 p-4 flex items-center justify-between">
128
+ <div class="flex items-center space-x-3">
129
+ <button id="mobileSidebarToggle" class="md:hidden p-1 rounded hover:bg-gray-700">
130
+ <i class="fas fa-bars"></i>
131
+ </button>
132
+ <h2 class="text-lg font-semibold flex items-center">
133
+ <span>#general</span>
134
+ <span class="ml-2 text-xs bg-gray-700 px-2 py-1 rounded-full">42 online</span>
135
+ </h2>
136
+ </div>
137
+ <div class="flex items-center space-x-3">
138
+ <div class="relative">
139
+ <input type="text" placeholder="Search" class="bg-gray-700 text-sm rounded pl-8 pr-3 py-1 w-32 focus:w-48 transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-purple-500">
140
+ <i class="fas fa-search absolute left-2 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
141
+ </div>
142
+ <button class="p-1 rounded hover:bg-gray-700">
143
+ <i class="fas fa-user-plus text-gray-400"></i>
144
+ </button>
145
+ </div>
146
+ </div>
147
+
148
+ <!-- Messages -->
149
+ <div id="messages" class="flex-1 overflow-y-auto p-4 space-y-4 scrollbar-hide">
150
+ <div class="message-enter flex space-x-3">
151
+ <div class="flex-shrink-0">
152
+ <div class="w-8 h-8 rounded-full bg-gradient-to-br from-blue-500 to-teal-400 flex items-center justify-center text-white font-bold">
153
+ S
154
+ </div>
155
+ </div>
156
+ <div>
157
+ <div class="flex items-baseline space-x-2">
158
+ <span class="font-semibold text-blue-300">satanic</span>
159
+ <span class="text-xs text-gray-400">2:45 PM</span>
160
+ </div>
161
+ <p class="text-gray-100">Welcome to DarkChat! This is a secure, minimal chat platform.</p>
162
+ </div>
163
+ </div>
164
+
165
+ <div class="message-enter flex space-x-3">
166
+ <div class="flex-shrink-0">
167
+ <div class="w-8 h-8 rounded-full bg-gradient-to-br from-green-500 to-lime-400 flex items-center justify-center text-white font-bold">
168
+ P
169
+ </div>
170
+ </div>
171
+ <div>
172
+ <div class="flex items-baseline space-x-2">
173
+ <span class="font-semibold text-green-300">phil</span>
174
+ <span class="text-xs text-gray-400">2:46 PM</span>
175
+ </div>
176
+ <p class="text-gray-100">Hey everyone! Just joined. How's it going?</p>
177
+ </div>
178
+ </div>
179
+
180
+ <div class="message-enter flex space-x-3">
181
+ <div class="flex-shrink-0">
182
+ <div class="w-8 h-8 rounded-full bg-gradient-to-br from-purple-500 to-pink-400 flex items-center justify-center text-white font-bold">
183
+ Y
184
+ </div>
185
+ </div>
186
+ <div>
187
+ <div class="flex items-baseline space-x-2">
188
+ <span class="font-semibold text-purple-300">You</span>
189
+ <span class="text-xs text-gray-400">2:47 PM</span>
190
+ </div>
191
+ <p class="text-gray-100">Pretty good! Just setting things up.</p>
192
+ </div>
193
+ </div>
194
+
195
+ <div class="message-enter flex space-x-3">
196
+ <div class="flex-shrink-0">
197
+ <div class="w-8 h-8 rounded-full bg-gradient-to-br from-blue-500 to-teal-400 flex items-center justify-center text-white font-bold">
198
+ S
199
+ </div>
200
+ </div>
201
+ <div>
202
+ <div class="flex items-baseline space-x-2">
203
+ <span class="font-semibold text-blue-300">satanic</span>
204
+ <span class="text-xs text-gray-400">2:48 PM</span>
205
+ </div>
206
+ <p class="text-gray-100">Remember to check the rules in the pinned messages. Keep it clean folks.</p>
207
+ </div>
208
+ </div>
209
+
210
+ <div class="message-enter flex space-x-3">
211
+ <div class="flex-shrink-0">
212
+ <div class="w-8 h-8 rounded-full bg-gradient-to-br from-yellow-500 to-orange-400 flex items-center justify-center text-white font-bold">
213
+ B
214
+ </div>
215
+ </div>
216
+ <div>
217
+ <div class="flex items-baseline space-x-2">
218
+ <span class="font-semibold text-yellow-300">bot</span>
219
+ <span class="text-xs text-gray-400">2:49 PM</span>
220
+ </div>
221
+ <p class="text-gray-100 italic">User phil has been active for 5 minutes.</p>
222
+ </div>
223
+ </div>
224
+ </div>
225
+
226
+ <!-- Typing Indicator -->
227
+ <div id="typingIndicator" class="px-4 py-2 text-sm text-gray-400 hidden">
228
+ <span class="typing-indicator">phil is typing</span>
229
+ </div>
230
+
231
+ <!-- Message Input -->
232
+ <div class="bg-gray-800 border-t border-gray-700 p-4">
233
+ <div class="flex items-center space-x-2">
234
+ <button class="p-2 rounded-full hover:bg-gray-700">
235
+ <i class="fas fa-plus text-gray-400"></i>
236
+ </button>
237
+ <div class="flex-1 relative">
238
+ <input id="messageInput" type="text" placeholder="Message #general" class="w-full bg-gray-700 rounded-full px-4 py-2 focus:outline-none focus:ring-1 focus:ring-purple-500">
239
+ <div class="absolute right-2 top-1/2 transform -translate-y-1/2 flex space-x-1">
240
+ <button class="p-1 text-gray-400 hover:text-gray-200">
241
+ <i class="fas fa-smile"></i>
242
+ </button>
243
+ <button class="p-1 text-gray-400 hover:text-gray-200">
244
+ <i class="fas fa-paperclip"></i>
245
+ </button>
246
+ </div>
247
+ </div>
248
+ <button id="sendMessage" class="p-2 rounded-full bg-purple-600 hover:bg-purple-700 text-white">
249
+ <i class="fas fa-paper-plane"></i>
250
+ </button>
251
+ </div>
252
+ </div>
253
+ </div>
254
+ </main>
255
+
256
+ <!-- Login Modal -->
257
+ <div id="loginModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center p-4 z-50">
258
+ <div class="bg-gray-800 rounded-lg max-w-md w-full p-6 animate-pulse-slow border border-purple-900">
259
+ <div class="flex justify-between items-center mb-4">
260
+ <h2 class="text-xl font-bold bg-gradient-to-r from-purple-400 to-pink-500 bg-clip-text text-transparent">Welcome to DarkChat</h2>
261
+ <button id="closeLoginModal" class="text-gray-400 hover:text-gray-200">
262
+ <i class="fas fa-times"></i>
263
+ </button>
264
+ </div>
265
+
266
+ <div class="space-y-4">
267
+ <div>
268
+ <label for="username" class="block text-sm font-medium text-gray-300 mb-1">Username</label>
269
+ <input type="text" id="username" class="w-full bg-gray-700 border border-gray-600 rounded px-3 py-2 focus:outline-none focus:ring-1 focus:ring-purple-500">
270
+ </div>
271
+ <div>
272
+ <label for="password" class="block text-sm font-medium text-gray-300 mb-1">Password</label>
273
+ <input type="password" id="password" class="w-full bg-gray-700 border border-gray-600 rounded px-3 py-2 focus:outline-none focus:ring-1 focus:ring-purple-500">
274
+ </div>
275
+ <div class="flex items-center justify-between">
276
+ <div class="flex items-center">
277
+ <input type="checkbox" id="remember" class="h-4 w-4 text-purple-600 focus:ring-purple-500 border-gray-600 rounded bg-gray-700">
278
+ <label for="remember" class="ml-2 block text-sm text-gray-300">Remember me</label>
279
+ </div>
280
+ <a href="#" class="text-sm text-purple-400 hover:text-purple-300">Forgot password?</a>
281
+ </div>
282
+ <button id="loginButton" class="w-full bg-gradient-to-r from-purple-600 to-pink-600 text-white py-2 rounded font-medium hover:opacity-90 transition-opacity">
283
+ Sign In
284
+ </button>
285
+ <div class="text-center text-sm text-gray-400">
286
+ Don't have an account? <a href="#" class="text-purple-400 hover:text-purple-300">Register</a>
287
+ </div>
288
+ </div>
289
+
290
+ <div class="mt-6 pt-4 border-t border-gray-700">
291
+ <h3 class="text-sm font-medium text-gray-400 mb-2">Quick Login (Dev Only)</h3>
292
+ <div class="grid grid-cols-2 gap-2">
293
+ <button class="quick-login bg-gray-700 hover:bg-gray-600 text-sm py-1 px-3 rounded" data-username="satanic" data-password="tswifttoes">
294
+ Admin
295
+ </button>
296
+ <button class="quick-login bg-gray-700 hover:bg-gray-600 text-sm py-1 px-3 rounded" data-username="phil" data-password="buttmunch">
297
+ User
298
+ </button>
299
+ </div>
300
+ </div>
301
+ </div>
302
+ </div>
303
+
304
+ <!-- Settings Modal -->
305
+ <div id="settingsModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center p-4 z-50 hidden">
306
+ <div class="bg-gray-800 rounded-lg max-w-md w-full p-6 border border-gray-700">
307
+ <div class="flex justify-between items-center mb-4">
308
+ <h2 class="text-xl font-bold text-gray-100">Settings</h2>
309
+ <button id="closeSettingsModal" class="text-gray-400 hover:text-gray-200">
310
+ <i class="fas fa-times"></i>
311
+ </button>
312
+ </div>
313
+
314
+ <div class="space-y-6">
315
+ <div>
316
+ <h3 class="text-sm font-semibold text-gray-400 uppercase mb-2">Appearance</h3>
317
+ <div class="flex items-center space-x-4">
318
+ <button id="lightTheme" class="px-4 py-2 rounded border border-gray-600 hover:bg-gray-700">
319
+ <i class="fas fa-sun mr-2"></i> Light
320
+ </button>
321
+ <button id="darkTheme" class="px-4 py-2 rounded bg-gray-700 border border-purple-500">
322
+ <i class="fas fa-moon mr-2"></i> Dark
323
+ </button>
324
+ <button id="systemTheme" class="px-4 py-2 rounded border border-gray-600 hover:bg-gray-700">
325
+ <i class="fas fa-desktop mr-2"></i> System
326
+ </button>
327
+ </div>
328
+ </div>
329
+
330
+ <div>
331
+ <h3 class="text-sm font-semibold text-gray-400 uppercase mb-2">Notifications</h3>
332
+ <div class="space-y-2">
333
+ <div class="flex items-center justify-between">
334
+ <span class="text-gray-300">Message notifications</span>
335
+ <label class="relative inline-flex items-center cursor-pointer">
336
+ <input type="checkbox" class="sr-only peer" checked>
337
+ <div class="w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-purple-600"></div>
338
+ </label>
339
+ </div>
340
+ <div class="flex items-center justify-between">
341
+ <span class="text-gray-300">Sound effects</span>
342
+ <label class="relative inline-flex items-center cursor-pointer">
343
+ <input type="checkbox" class="sr-only peer" checked>
344
+ <div class="w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-purple-600"></div>
345
+ </label>
346
+ </div>
347
+ </div>
348
+ </div>
349
+
350
+ <div>
351
+ <h3 class="text-sm font-semibold text-gray-400 uppercase mb-2">Account</h3>
352
+ <div class="space-y-3">
353
+ <button class="w-full text-left px-3 py-2 rounded bg-gray-700 hover:bg-gray-600 text-gray-300">
354
+ Change Password
355
+ </button>
356
+ <button class="w-full text-left px-3 py-2 rounded bg-gray-700 hover:bg-gray-600 text-gray-300">
357
+ Privacy Settings
358
+ </button>
359
+ <button class="w-full text-left px-3 py-2 rounded bg-red-900 hover:bg-red-800 text-red-300">
360
+ Delete Account
361
+ </button>
362
+ </div>
363
+ </div>
364
+ </div>
365
+ </div>
366
+ </div>
367
+
368
+ <script>
369
+ // DOM Elements
370
+ const loginModal = document.getElementById('loginModal');
371
+ const closeLoginModal = document.getElementById('closeLoginModal');
372
+ const loginButton = document.getElementById('loginButton');
373
+ const quickLoginButtons = document.querySelectorAll('.quick-login');
374
+ const settingsModal = document.getElementById('settingsModal');
375
+ const settingsToggle = document.getElementById('settingsToggle');
376
+ const closeSettingsModal = document.getElementById('closeSettingsModal');
377
+ const themeToggle = document.getElementById('themeToggle');
378
+ const lightTheme = document.getElementById('lightTheme');
379
+ const darkTheme = document.getElementById('darkTheme');
380
+ const systemTheme = document.getElementById('systemTheme');
381
+ const messageInput = document.getElementById('messageInput');
382
+ const sendMessage = document.getElementById('sendMessage');
383
+ const messagesContainer = document.getElementById('messages');
384
+ const typingIndicator = document.getElementById('typingIndicator');
385
+ const mobileSidebarToggle = document.getElementById('mobileSidebarToggle');
386
+ const sidebar = document.getElementById('sidebar');
387
+
388
+ // Show login modal by default
389
+ loginModal.classList.remove('hidden');
390
+
391
+ // Close login modal
392
+ closeLoginModal.addEventListener('click', () => {
393
+ loginModal.classList.add('hidden');
394
+ });
395
+
396
+ // Quick login buttons
397
+ quickLoginButtons.forEach(button => {
398
+ button.addEventListener('click', () => {
399
+ const username = button.getAttribute('data-username');
400
+ const password = button.getAttribute('data-password');
401
+ document.getElementById('username').value = username;
402
+ document.getElementById('password').value = password;
403
+ });
404
+ });
405
+
406
+ // Login functionality
407
+ loginButton.addEventListener('click', () => {
408
+ const username = document.getElementById('username').value;
409
+ const password = document.getElementById('password').value;
410
+
411
+ // Check credentials (hardcoded for demo)
412
+ if ((username === 'satanic' && password === 'tswifttoes') ||
413
+ (username === 'phil' && password === 'buttmunch')) {
414
+ loginModal.classList.add('hidden');
415
+ // Update user display
416
+ const userDisplay = document.querySelector('.flex.items-center.space-x-2.p-2.bg-gray-700.rounded-lg .font-bold');
417
+ userDisplay.textContent = username.charAt(0).toUpperCase();
418
+ const userNameDisplay = document.querySelector('.flex.items-center.space-x-2.p-2.bg-gray-700.rounded-lg .text-sm.font-medium');
419
+ userNameDisplay.textContent = username;
420
+ } else {
421
+ alert('Invalid credentials. Try satanic/tswifttoes or phil/buttmunch');
422
+ }
423
+ });
424
+
425
+ // Settings modal toggle
426
+ settingsToggle.addEventListener('click', () => {
427
+ settingsModal.classList.remove('hidden');
428
+ });
429
+
430
+ closeSettingsModal.addEventListener('click', () => {
431
+ settingsModal.classList.add('hidden');
432
+ });
433
+
434
+ // Theme switching
435
+ themeToggle.addEventListener('click', () => {
436
+ const html = document.documentElement;
437
+ if (html.classList.contains('dark')) {
438
+ html.classList.remove('dark');
439
+ localStorage.setItem('theme', 'light');
440
+ themeToggle.innerHTML = '<i class="fas fa-sun text-yellow-500"></i>';
441
+ } else {
442
+ html.classList.add('dark');
443
+ localStorage.setItem('theme', 'dark');
444
+ themeToggle.innerHTML = '<i class="fas fa-moon text-yellow-300"></i>';
445
+ }
446
+ });
447
+
448
+ lightTheme.addEventListener('click', () => {
449
+ document.documentElement.classList.remove('dark');
450
+ localStorage.setItem('theme', 'light');
451
+ darkTheme.classList.remove('border-purple-500', 'bg-gray-700');
452
+ lightTheme.classList.add('border-purple-500', 'bg-gray-700');
453
+ systemTheme.classList.remove('border-purple-500', 'bg-gray-700');
454
+ themeToggle.innerHTML = '<i class="fas fa-sun text-yellow-500"></i>';
455
+ });
456
+
457
+ darkTheme.addEventListener('click', () => {
458
+ document.documentElement.classList.add('dark');
459
+ localStorage.setItem('theme', 'dark');
460
+ lightTheme.classList.remove('border-purple-500', 'bg-gray-700');
461
+ darkTheme.classList.add('border-purple-500', 'bg-gray-700');
462
+ systemTheme.classList.remove('border-purple-500', 'bg-gray-700');
463
+ themeToggle.innerHTML = '<i class="fas fa-moon text-yellow-300"></i>';
464
+ });
465
+
466
+ systemTheme.addEventListener('click', () => {
467
+ if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
468
+ document.documentElement.classList.add('dark');
469
+ themeToggle.innerHTML = '<i class="fas fa-moon text-yellow-300"></i>';
470
+ } else {
471
+ document.documentElement.classList.remove('dark');
472
+ themeToggle.innerHTML = '<i class="fas fa-sun text-yellow-500"></i>';
473
+ }
474
+ localStorage.removeItem('theme');
475
+ lightTheme.classList.remove('border-purple-500', 'bg-gray-700');
476
+ darkTheme.classList.remove('border-purple-500', 'bg-gray-700');
477
+ systemTheme.classList.add('border-purple-500', 'bg-gray-700');
478
+ });
479
+
480
+ // Check for saved theme preference or use system preference
481
+ const savedTheme = localStorage.getItem('theme');
482
+ if (savedTheme === 'light') {
483
+ document.documentElement.classList.remove('dark');
484
+ themeToggle.innerHTML = '<i class="fas fa-sun text-yellow-500"></i>';
485
+ lightTheme.classList.add('border-purple-500', 'bg-gray-700');
486
+ } else if (savedTheme === 'dark') {
487
+ document.documentElement.classList.add('dark');
488
+ themeToggle.innerHTML = '<i class="fas fa-moon text-yellow-300"></i>';
489
+ darkTheme.classList.add('border-purple-500', 'bg-gray-700');
490
+ } else if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
491
+ document.documentElement.classList.add('dark');
492
+ themeToggle.innerHTML = '<i class="fas fa-moon text-yellow-300"></i>';
493
+ systemTheme.classList.add('border-purple-500', 'bg-gray-700');
494
+ } else {
495
+ document.documentElement.classList.remove('dark');
496
+ themeToggle.innerHTML = '<i class="fas fa-sun text-yellow-500"></i>';
497
+ systemTheme.classList.add('border-purple-500', 'bg-gray-700');
498
+ }
499
+
500
+ // Chat functionality
501
+ messageInput.addEventListener('keypress', (e) => {
502
+ if (e.key === 'Enter' && messageInput.value.trim() !== '') {
503
+ sendMessageFunc();
504
+ }
505
+ });
506
+
507
+ sendMessage.addEventListener('click', () => {
508
+ if (messageInput.value.trim() !== '') {
509
+ sendMessageFunc();
510
+ }
511
+ });
512
+
513
+ function sendMessageFunc() {
514
+ const message = messageInput.value;
515
+ const now = new Date();
516
+ const timeString = now.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
517
+
518
+ const messageElement = document.createElement('div');
519
+ messageElement.className = 'message-enter flex space-x-3';
520
+ messageElement.innerHTML = `
521
+ <div class="flex-shrink-0">
522
+ <div class="w-8 h-8 rounded-full bg-gradient-to-br from-purple-500 to-pink-400 flex items-center justify-center text-white font-bold">
523
+ Y
524
+ </div>
525
+ </div>
526
+ <div>
527
+ <div class="flex items-baseline space-x-2">
528
+ <span class="font-semibold text-purple-300">You</span>
529
+ <span class="text-xs text-gray-400">${timeString}</span>
530
+ </div>
531
+ <p class="text-gray-100">${message}</p>
532
+ </div>
533
+ `;
534
+
535
+ messagesContainer.appendChild(messageElement);
536
+ messageInput.value = '';
537
+
538
+ // Scroll to bottom
539
+ messagesContainer.scrollTop = messagesContainer.scrollHeight;
540
+
541
+ // Simulate someone typing
542
+ if (Math.random() > 0.5) {
543
+ simulateTyping();
544
+ }
545
+ }
546
+
547
+ function simulateTyping() {
548
+ typingIndicator.classList.remove('hidden');
549
+
550
+ setTimeout(() => {
551
+ typingIndicator.classList.add('hidden');
552
+
553
+ // Simulate response
554
+ setTimeout(() => {
555
+ const now = new Date();
556
+ const timeString = now.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
557
+ const users = ['satanic', 'phil', 'bot'];
558
+ const randomUser = users[Math.floor(Math.random() * users.length)];
559
+ const colors = {
560
+ 'satanic': 'from-blue-500 to-teal-400 text-blue-300',
561
+ 'phil': 'from-green-500 to-lime-400 text-green-300',
562
+ 'bot': 'from-yellow-500 to-orange-400 text-yellow-300'
563
+ };
564
+ const responses = {
565
+ 'satanic': ['Interesting point.', 'I disagree.', 'Let me think about that...', 'Check the docs.', 'That violates rule #3.'],
566
+ 'phil': ['LOL', 'Same!', 'Anyone want to play a game?', 'I\'m hungry.', 'What are we talking about?'],
567
+ 'bot': ['Message received.', 'User activity logged.', 'System status: nominal.', 'Beep boop.', 'Error: joke module not found.']
568
+ };
569
+
570
+ const messageElement = document.createElement('div');
571
+ messageElement.className = 'message-enter flex space-x-3';
572
+ messageElement.innerHTML = `
573
+ <div class="flex-shrink-0">
574
+ <div class="w-8 h-8 rounded-full bg-gradient-to-br ${colors[randomUser]} flex items-center justify-center text-white font-bold">
575
+ ${randomUser.charAt(0).toUpperCase()}
576
+ </div>
577
+ </div>
578
+ <div>
579
+ <div class="flex items-baseline space-x-2">
580
+ <span class="font-semibold ${colors[randomUser].split(' ').pop()}">${randomUser}</span>
581
+ <span class="text-xs text-gray-400">${timeString}</span>
582
+ </div>
583
+ <p class="text-gray-100">${responses[randomUser][Math.floor(Math.random() * responses[randomUser].length)]}</p>
584
+ </div>
585
+ `;
586
+
587
+ messagesContainer.appendChild(messageElement);
588
+ messagesContainer.scrollTop = messagesContainer.scrollHeight;
589
+ }, 1000);
590
+ }, 2000 + Math.random() * 3000);
591
+ }
592
+
593
+ // Mobile sidebar toggle
594
+ mobileSidebarToggle.addEventListener('click', () => {
595
+ sidebar.classList.toggle('hidden');
596
+ });
597
+
598
+ // Channel buttons
599
+ document.querySelectorAll('.channel-btn').forEach(button => {
600
+ button.addEventListener('click', () => {
601
+ document.querySelectorAll('.channel-btn').forEach(btn => {
602
+ btn.classList.remove('bg-gray-700', 'text-purple-300');
603
+ btn.classList.add('hover:bg-gray-700', 'text-gray-300');
604
+ });
605
+ button.classList.add('bg-gray-700', 'text-purple-300');
606
+ button.classList.remove('hover:bg-gray-700', 'text-gray-300');
607
+
608
+ // Update channel header
609
+ const channelName = button.querySelector('span:first-child').textContent;
610
+ document.querySelector('.bg-gray-800.border-b.border-gray-700.p-4 .text-lg.font-semibold span:first-child').textContent = channelName;
611
+
612
+ // Clear and add some sample messages
613
+ messagesContainer.innerHTML = '';
614
+ const welcomeMessage = document.createElement('div');
615
+ welcomeMessage.className = 'message-enter flex space-x-3';
616
+ welcomeMessage.innerHTML = `
617
+ <div class="flex-shrink-0">
618
+ <div class="w-8 h-8 rounded-full bg-gradient-to-br from-blue-500 to-teal-400 flex items-center justify-center text-white font-bold">
619
+ S
620
+ </div>
621
+ </div>
622
+ <div>
623
+ <div class="flex items-baseline space-x-2">
624
+ <span class="font-semibold text-blue-300">satanic</span>
625
+ <span class="text-xs text-gray-400">Just now</span>
626
+ </div>
627
+ <p class="text-gray-100">Welcome to ${channelName}! This is a fresh start for this channel.</p>
628
+ </div>
629
+ `;
630
+ messagesContainer.appendChild(welcomeMessage);
631
+ });
632
+ });
633
+
634
+ // DM buttons
635
+ document.querySelectorAll('.dm-btn').forEach(button => {
636
+ button.addEventListener('click', () => {
637
+ document.querySelectorAll('.dm-btn').forEach(btn => {
638
+ btn.classList.remove('bg-gray-700', 'text-purple-300');
639
+ btn.classList.add('hover:bg-gray-700', 'text-gray-300');
640
+ });
641
+ button.classList.add('bg-gray-700', 'text-purple-300');
642
+ button.classList.remove('hover:bg-gray-700', 'text-gray-300');
643
+
644
+ // Update channel header to show DM
645
+ const userName = button.querySelector('span').textContent;
646
+ document.querySelector('.bg-gray-800.border-b.border-gray-700.p-4 .text-lg.font-semibold span:first-child').textContent = userName;
647
+
648
+ // Clear and add some sample messages
649
+ messagesContainer.innerHTML = '';
650
+ const welcomeMessage = document.createElement('div');
651
+ welcomeMessage.className = 'message-enter flex space-x-3';
652
+ welcomeMessage.innerHTML = `
653
+ <div class="flex-shrink-0">
654
+ <div class="w-8 h-8 rounded-full bg-gradient-to-br ${userName === '@satanic' ? 'from-blue-500 to-teal-400' : userName === '@phil' ? 'from-green-500 to-lime-400' : 'from-yellow-500 to-orange-400'} flex items-center justify-center text-white font-bold">
655
+ ${userName.charAt(1).toUpperCase()}
656
+ </div>
657
+ </div>
658
+ <div>
659
+ <div class="flex items-baseline space-x-2">
660
+ <span class="font-semibold ${userName === '@satanic' ? 'text-blue-300' : userName === '@phil' ? 'text-green-300' : 'text-yellow-300'}">${userName.substring(1)}</span>
661
+ <span class="text-xs text-gray-400">Just now</span>
662
+ </div>
663
+ <p class="text-gray-100">This is the start of your direct message history with ${userName.substring(1)}.</p>
664
+ </div>
665
+ `;
666
+ messagesContainer.appendChild(welcomeMessage);
667
+ });
668
+ });
669
+
670
+ // Initial scroll to bottom
671
+ messagesContainer.scrollTop = messagesContainer.scrollHeight;
672
+ </script>
673
+ <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=SoftDisquiet/dark-chat" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
674
+ </html>