sldshr commited on
Commit
c2f8442
·
verified ·
1 Parent(s): 987be4b

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +1161 -19
index.html CHANGED
@@ -1,19 +1,1161 @@
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="ru">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Client:Less Matrix Web Client</title>
7
+ <style>
8
+ :root {
9
+ --tg-blue: #5682a3;
10
+ --tg-blue-hover: #4c7393;
11
+ --tg-blue-active: #3e617d;
12
+ --tg-blue-dark: #3b5a75;
13
+ --tg-bg: #e7ecef;
14
+ --tg-card-bg: #ffffff;
15
+ --tg-border: #d2dbe3;
16
+ --tg-text: #222222;
17
+ --tg-subtext: #707e8c;
18
+ --tg-chat-bg: #e4eaf0;
19
+ --tg-msg-in: #ffffff;
20
+ --tg-msg-out: #effdd5;
21
+ --tg-msg-out-border: #d2e7b6;
22
+ --tg-online: #42b740;
23
+ --tg-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
24
+ }
25
+
26
+ * {
27
+ box-sizing: border-box;
28
+ margin: 0;
29
+ padding: 0;
30
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
31
+ -webkit-font-smoothing: antialiased;
32
+ }
33
+
34
+ body {
35
+ background-color: var(--tg-bg);
36
+ color: var(--tg-text);
37
+ height: 100vh;
38
+ display: flex;
39
+ flex-direction: column;
40
+ overflow: hidden;
41
+ font-size: 14px;
42
+ }
43
+
44
+ .top-navbar {
45
+ background-color: var(--tg-blue);
46
+ height: 48px;
47
+ display: flex;
48
+ align-items: center;
49
+ justify-content: space-between;
50
+ padding: 0 20px;
51
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
52
+ z-index: 100;
53
+ user-select: none;
54
+ }
55
+
56
+ .brand-logo {
57
+ color: #ffffff;
58
+ font-weight: 700;
59
+ font-size: 18px;
60
+ letter-spacing: 0.5px;
61
+ display: flex;
62
+ align-items: center;
63
+ gap: 8px;
64
+ cursor: pointer;
65
+ }
66
+
67
+ .brand-badge {
68
+ background-color: rgba(255, 255, 255, 0.2);
69
+ font-size: 11px;
70
+ padding: 2px 6px;
71
+ border-radius: 10px;
72
+ font-weight: normal;
73
+ }
74
+
75
+ .nav-menu {
76
+ display: flex;
77
+ list-style: none;
78
+ height: 100%;
79
+ }
80
+
81
+ .nav-item {
82
+ height: 100%;
83
+ display: flex;
84
+ align-items: center;
85
+ }
86
+
87
+ .nav-link {
88
+ color: #dce7f0;
89
+ text-decoration: none;
90
+ padding: 0 16px;
91
+ height: 100%;
92
+ display: flex;
93
+ align-items: center;
94
+ font-size: 14px;
95
+ font-weight: 500;
96
+ transition: all 0.15s ease;
97
+ cursor: pointer;
98
+ border-bottom: 3px solid transparent;
99
+ }
100
+
101
+ .nav-link:hover {
102
+ background-color: var(--tg-blue-hover);
103
+ color: #ffffff;
104
+ }
105
+
106
+ .nav-link.active {
107
+ color: #ffffff;
108
+ background-color: var(--tg-blue-hover);
109
+ border-bottom-color: #ffffff;
110
+ }
111
+
112
+ .page-container {
113
+ flex: 1;
114
+ position: relative;
115
+ overflow: hidden;
116
+ }
117
+
118
+ .page {
119
+ display: none;
120
+ width: 100%;
121
+ height: 100%;
122
+ overflow-y: auto;
123
+ padding: 30px 20px;
124
+ }
125
+
126
+ .page.active {
127
+ display: block;
128
+ }
129
+
130
+ .page-client-container {
131
+ padding: 0;
132
+ overflow: hidden;
133
+ }
134
+
135
+ .content-card {
136
+ max-width: 860px;
137
+ margin: 0 auto 24px auto;
138
+ background: var(--tg-card-bg);
139
+ border-radius: 4px;
140
+ box-shadow: var(--tg-shadow);
141
+ padding: 28px;
142
+ border: 1px solid var(--tg-border);
143
+ }
144
+
145
+ .content-title {
146
+ font-size: 24px;
147
+ color: var(--tg-blue-dark);
148
+ margin-bottom: 12px;
149
+ font-weight: 600;
150
+ }
151
+
152
+ .content-subtitle {
153
+ font-size: 15px;
154
+ color: var(--tg-subtext);
155
+ margin-bottom: 20px;
156
+ line-height: 1.5;
157
+ }
158
+
159
+ .btn {
160
+ display: inline-block;
161
+ background-color: var(--tg-blue);
162
+ color: #ffffff;
163
+ padding: 10px 20px;
164
+ border-radius: 3px;
165
+ text-decoration: none;
166
+ font-weight: 600;
167
+ border: none;
168
+ cursor: pointer;
169
+ transition: background-color 0.15s;
170
+ font-size: 14px;
171
+ }
172
+
173
+ .btn:hover {
174
+ background-color: var(--tg-blue-hover);
175
+ }
176
+
177
+ .btn:active {
178
+ background-color: var(--tg-blue-active);
179
+ }
180
+
181
+ .btn-outline {
182
+ background-color: transparent;
183
+ color: var(--tg-blue);
184
+ border: 1px solid var(--tg-blue);
185
+ }
186
+
187
+ .btn-outline:hover {
188
+ background-color: rgba(86, 130, 162, 0.08);
189
+ }
190
+
191
+ .news-item {
192
+ border-bottom: 1px solid var(--tg-border);
193
+ padding-bottom: 20px;
194
+ margin-bottom: 20px;
195
+ }
196
+
197
+ .news-item:last-child {
198
+ border-bottom: none;
199
+ margin-bottom: 0;
200
+ padding-bottom: 0;
201
+ }
202
+
203
+ .news-date {
204
+ display: inline-block;
205
+ background: #f0f4f7;
206
+ color: var(--tg-blue-dark);
207
+ font-size: 12px;
208
+ font-weight: 700;
209
+ padding: 3px 8px;
210
+ border-radius: 3px;
211
+ margin-bottom: 8px;
212
+ }
213
+
214
+ .news-heading {
215
+ font-size: 18px;
216
+ color: #111;
217
+ margin-bottom: 8px;
218
+ }
219
+
220
+ .news-body {
221
+ line-height: 1.6;
222
+ color: #444;
223
+ }
224
+
225
+ .login-box {
226
+ max-width: 420px;
227
+ margin: 40px auto;
228
+ background: #fff;
229
+ padding: 32px;
230
+ border-radius: 4px;
231
+ box-shadow: var(--tg-shadow);
232
+ border: 1px solid var(--tg-border);
233
+ }
234
+
235
+ .form-group {
236
+ margin-bottom: 18px;
237
+ }
238
+
239
+ .form-group label {
240
+ display: block;
241
+ margin-bottom: 6px;
242
+ font-weight: 600;
243
+ color: var(--tg-subtext);
244
+ font-size: 13px;
245
+ }
246
+
247
+ .form-input {
248
+ width: 100%;
249
+ padding: 10px 12px;
250
+ border: 1px solid #ccc;
251
+ border-radius: 3px;
252
+ font-size: 14px;
253
+ outline: none;
254
+ transition: border-color 0.15s;
255
+ }
256
+
257
+ .form-input:focus {
258
+ border-color: var(--tg-blue);
259
+ }
260
+
261
+ .form-hint {
262
+ font-size: 11px;
263
+ color: var(--tg-subtext);
264
+ margin-top: 4px;
265
+ }
266
+
267
+ .client-layout {
268
+ display: flex;
269
+ height: 100%;
270
+ width: 100%;
271
+ background-color: var(--tg-card-bg);
272
+ }
273
+
274
+ /* Column 1: Room List */
275
+ .rooms-sidebar {
276
+ width: 290px;
277
+ min-width: 290px;
278
+ border-right: 1px solid var(--tg-border);
279
+ display: flex;
280
+ flex-direction: column;
281
+ background-color: #ffffff;
282
+ }
283
+
284
+ .search-box {
285
+ padding: 10px;
286
+ border-bottom: 1px solid #f0f0f0;
287
+ background: #f7f9fa;
288
+ }
289
+
290
+ .search-input {
291
+ width: 100%;
292
+ padding: 7px 10px;
293
+ background: #edf1f5;
294
+ border: 1px solid #e1e8ed;
295
+ border-radius: 3px;
296
+ font-size: 13px;
297
+ outline: none;
298
+ }
299
+
300
+ .rooms-list {
301
+ flex: 1;
302
+ overflow-y: auto;
303
+ list-style: none;
304
+ }
305
+
306
+ .room-item {
307
+ display: flex;
308
+ align-items: center;
309
+ padding: 10px 12px;
310
+ cursor: pointer;
311
+ border-bottom: 1px solid #f5f7f9;
312
+ transition: background 0.1s;
313
+ }
314
+
315
+ .room-item:hover {
316
+ background-color: #f2f6fa;
317
+ }
318
+
319
+ .room-item.active {
320
+ background-color: var(--tg-blue);
321
+ color: #ffffff;
322
+ }
323
+
324
+ .room-item.active .room-title,
325
+ .room-item.active .room-last-msg,
326
+ .room-item.active .room-time {
327
+ color: #ffffff;
328
+ }
329
+
330
+ .avatar {
331
+ width: 44px;
332
+ height: 44px;
333
+ border-radius: 50%;
334
+ background: #6091ba;
335
+ color: #fff;
336
+ display: flex;
337
+ align-items: center;
338
+ justify-content: center;
339
+ font-weight: 700;
340
+ font-size: 16px;
341
+ margin-right: 12px;
342
+ flex-shrink: 0;
343
+ user-select: none;
344
+ }
345
+
346
+ .room-details {
347
+ flex: 1;
348
+ min-width: 0;
349
+ }
350
+
351
+ .room-header-row {
352
+ display: flex;
353
+ justify-content: space-between;
354
+ align-items: baseline;
355
+ margin-bottom: 4px;
356
+ }
357
+
358
+ .room-title {
359
+ font-weight: 600;
360
+ font-size: 14px;
361
+ color: #222;
362
+ white-space: nowrap;
363
+ overflow: hidden;
364
+ text-overflow: ellipsis;
365
+ }
366
+
367
+ .room-time {
368
+ font-size: 11px;
369
+ color: var(--tg-subtext);
370
+ }
371
+
372
+ .room-last-msg {
373
+ font-size: 13px;
374
+ color: var(--tg-subtext);
375
+ white-space: nowrap;
376
+ overflow: hidden;
377
+ text-overflow: ellipsis;
378
+ }
379
+
380
+ /* Column 2: Chat Main Area */
381
+ .chat-main {
382
+ flex: 1;
383
+ display: flex;
384
+ flex-direction: column;
385
+ background-color: var(--tg-chat-bg);
386
+ position: relative;
387
+ }
388
+
389
+ .chat-placeholder {
390
+ display: flex;
391
+ flex-direction: column;
392
+ align-items: center;
393
+ justify-content: center;
394
+ height: 100%;
395
+ color: #8393a3;
396
+ user-select: none;
397
+ }
398
+
399
+ .chat-placeholder-badge {
400
+ background: rgba(0, 0, 0, 0.06);
401
+ padding: 8px 16px;
402
+ border-radius: 12px;
403
+ font-size: 13px;
404
+ }
405
+
406
+ .chat-header {
407
+ height: 48px;
408
+ background: #ffffff;
409
+ border-bottom: 1px solid var(--tg-border);
410
+ display: flex;
411
+ align-items: center;
412
+ justify-content: space-between;
413
+ padding: 0 16px;
414
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
415
+ }
416
+
417
+ .chat-header-title {
418
+ font-weight: 600;
419
+ font-size: 15px;
420
+ color: #222;
421
+ }
422
+
423
+ .chat-header-status {
424
+ font-size: 12px;
425
+ color: var(--tg-subtext);
426
+ }
427
+
428
+ .messages-container {
429
+ flex: 1;
430
+ overflow-y: auto;
431
+ padding: 16px;
432
+ display: flex;
433
+ flex-direction: column;
434
+ gap: 10px;
435
+ }
436
+
437
+ .message-bubble {
438
+ max-width: 65%;
439
+ padding: 8px 12px;
440
+ border-radius: 6px;
441
+ font-size: 14px;
442
+ line-height: 1.4;
443
+ position: relative;
444
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
445
+ word-wrap: break-word;
446
+ }
447
+
448
+ .message-bubble.incoming {
449
+ background-color: var(--tg-msg-in);
450
+ align-self: flex-start;
451
+ border-top-left-radius: 1px;
452
+ }
453
+
454
+ .message-bubble.outgoing {
455
+ background-color: var(--tg-msg-out);
456
+ border: 1px solid var(--tg-msg-out-border);
457
+ align-self: flex-end;
458
+ border-top-right-radius: 1px;
459
+ }
460
+
461
+ .msg-sender {
462
+ font-size: 12px;
463
+ font-weight: 700;
464
+ color: var(--tg-blue-dark);
465
+ margin-bottom: 3px;
466
+ }
467
+
468
+ .msg-time {
469
+ float: right;
470
+ font-size: 10px;
471
+ color: #999;
472
+ margin-left: 10px;
473
+ margin-top: 4px;
474
+ }
475
+
476
+ .chat-input-bar {
477
+ background: #ffffff;
478
+ padding: 10px 16px;
479
+ border-top: 1px solid var(--tg-border);
480
+ display: flex;
481
+ align-items: center;
482
+ gap: 10px;
483
+ }
484
+
485
+ .chat-input {
486
+ flex: 1;
487
+ border: 1px solid #d9d9d9;
488
+ border-radius: 3px;
489
+ padding: 10px 12px;
490
+ font-size: 14px;
491
+ outline: none;
492
+ resize: none;
493
+ height: 40px;
494
+ }
495
+
496
+ .chat-input:focus {
497
+ border-color: var(--tg-blue);
498
+ }
499
+
500
+ .send-btn {
501
+ background: var(--tg-blue);
502
+ color: white;
503
+ border: none;
504
+ padding: 10px 18px;
505
+ border-radius: 3px;
506
+ font-weight: 600;
507
+ cursor: pointer;
508
+ }
509
+
510
+ .send-btn:hover {
511
+ background: var(--tg-blue-hover);
512
+ }
513
+
514
+ /* Column 3: Group / User Info Sidebar */
515
+ .info-sidebar {
516
+ width: 260px;
517
+ min-width: 260px;
518
+ border-left: 1px solid var(--tg-border);
519
+ background: #ffffff;
520
+ display: flex;
521
+ flex-direction: column;
522
+ overflow-y: auto;
523
+ }
524
+
525
+ .info-header {
526
+ padding: 20px 16px;
527
+ display: flex;
528
+ flex-direction: column;
529
+ align-items: center;
530
+ text-align: center;
531
+ border-bottom: 1px solid #f0f0f0;
532
+ }
533
+
534
+ .info-avatar {
535
+ width: 70px;
536
+ height: 70px;
537
+ border-radius: 50%;
538
+ background: #5682a3;
539
+ color: #fff;
540
+ font-size: 26px;
541
+ font-weight: bold;
542
+ display: flex;
543
+ align-items: center;
544
+ justify-content: center;
545
+ margin-bottom: 12px;
546
+ }
547
+
548
+ .info-name {
549
+ font-size: 16px;
550
+ font-weight: 600;
551
+ color: #111;
552
+ margin-bottom: 4px;
553
+ }
554
+
555
+ .info-members-count {
556
+ font-size: 12px;
557
+ color: var(--tg-subtext);
558
+ }
559
+
560
+ .info-section {
561
+ padding: 16px;
562
+ border-bottom: 1px solid #f0f0f0;
563
+ }
564
+
565
+ .info-section-title {
566
+ font-size: 12px;
567
+ font-weight: 700;
568
+ color: var(--tg-subtext);
569
+ text-transform: uppercase;
570
+ margin-bottom: 10px;
571
+ letter-spacing: 0.5px;
572
+ }
573
+
574
+ .member-list {
575
+ list-style: none;
576
+ }
577
+
578
+ .member-item {
579
+ display: flex;
580
+ align-items: center;
581
+ gap: 10px;
582
+ padding: 6px 0;
583
+ }
584
+
585
+ .member-avatar {
586
+ width: 32px;
587
+ height: 32px;
588
+ border-radius: 50%;
589
+ background: #88a0b5;
590
+ color: #fff;
591
+ display: flex;
592
+ align-items: center;
593
+ justify-content: center;
594
+ font-size: 12px;
595
+ font-weight: bold;
596
+ }
597
+
598
+ .member-name {
599
+ font-size: 13px;
600
+ font-weight: 500;
601
+ }
602
+
603
+ .member-status {
604
+ font-size: 11px;
605
+ color: var(--tg-online);
606
+ }
607
+
608
+ .doc-section {
609
+ margin-bottom: 24px;
610
+ }
611
+
612
+ .doc-section h3 {
613
+ font-size: 16px;
614
+ color: var(--tg-blue-dark);
615
+ margin-bottom: 8px;
616
+ }
617
+
618
+ .doc-section p {
619
+ line-height: 1.6;
620
+ color: #333;
621
+ margin-bottom: 8px;
622
+ }
623
+
624
+ .code-block {
625
+ background: #272822;
626
+ color: #f8f8f2;
627
+ padding: 12px;
628
+ border-radius: 4px;
629
+ font-family: monospace;
630
+ font-size: 13px;
631
+ overflow-x: auto;
632
+ margin: 10px 0;
633
+ }
634
+
635
+ .download-box {
636
+ display: flex;
637
+ gap: 20px;
638
+ margin-top: 20px;
639
+ flex-wrap: wrap;
640
+ }
641
+
642
+ .download-card {
643
+ flex: 1;
644
+ min-width: 200px;
645
+ border: 1px solid var(--tg-border);
646
+ padding: 20px;
647
+ border-radius: 4px;
648
+ text-align: center;
649
+ background: #fafbfc;
650
+ }
651
+
652
+ .download-card h4 {
653
+ font-size: 16px;
654
+ margin-bottom: 8px;
655
+ color: var(--tg-blue-dark);
656
+ }
657
+
658
+ .toast {
659
+ position: fixed;
660
+ bottom: 20px;
661
+ right: 20px;
662
+ background: rgba(0, 0, 0, 0.85);
663
+ color: #fff;
664
+ padding: 12px 20px;
665
+ border-radius: 4px;
666
+ font-size: 13px;
667
+ z-index: 9999;
668
+ display: none;
669
+ }
670
+ </style>
671
+ </head>
672
+ <body>
673
+
674
+ <header class="top-navbar">
675
+ <div class="brand-logo" onclick="switchTab('home')">
676
+ Client:Less <span class="brand-badge">Matrix v1.0</span>
677
+ </div>
678
+ <ul class="nav-menu">
679
+ <li class="nav-item"><a class="nav-link active" id="nav-home" onclick="switchTab('home')">Главная</a></li>
680
+ <li class="nav-item"><a class="nav-link" id="nav-login" onclick="switchTab('login')">Войти</a></li>
681
+ <li class="nav-item"><a class="nav-link" id="nav-download" onclick="switchTab('download')">Скачать приложение</a></li>
682
+ <li class="nav-item"><a class="nav-link" id="nav-news" onclick="switchTab('news')">Новости</a></li>
683
+ <li class="nav-item"><a class="nav-link" id="nav-docs" onclick="switchTab('docs')">Docs</a></li>
684
+ </ul>
685
+ </header>
686
+
687
+ <div class="page-container">
688
+
689
+ <div id="page-home" class="page active">
690
+ <div class="content-card">
691
+ <h1 class="content-title">Добро пожаловать в Client:Less</h1>
692
+ <p class="content-subtitle">
693
+ Легковесный, независимый веб-клиент для децентрализованной сети Matrix, выполненный в ностальгическом стиле Telegram образца 2015 года.
694
+ </p>
695
+ <div style="margin-bottom: 20px;">
696
+ <button class="btn" onclick="switchTab('login')">Открыть веб-клиент</button>
697
+ <button class="btn btn-outline" onclick="switchTab('docs')" style="margin-left: 10px;">Узнать больше</button>
698
+ </div>
699
+ </div>
700
+
701
+ <div class="content-card">
702
+ <h2 style="font-size: 18px; color: var(--tg-blue-dark); margin-bottom: 12px;">Концепция и философия проекта</h2>
703
+ <p style="line-height: 1.6; color: #444; margin-bottom: 12px;">
704
+ <strong>Client:Less</strong> создавался с упором на максимальную производительность, минимальный расход памяти и мгновенную загрузку без тяжелых сторонних фреймворков и сторонних CDN.
705
+ </p>
706
+ <ul style="padding-left: 20px; line-height: 1.8; color: #444;">
707
+ <li><strong>0 CDN библиотек:</strong> Чистый HTML, CSS и Vanilla JavaScript. Никаких мегабайтов фреймворков.</li>
708
+ <li><strong>Telegram 2015 UX:</strong> Знакомый интерфейс с привычным 3-колоночным разделением (список чатов, переписка, инфо-панель).</li>
709
+ <li><strong>Прямой Matrix REST API:</strong> Полная поддержка децентрализованного протокола Matrix CS API v3.</li>
710
+ </ul>
711
+ </div>
712
+ </div>
713
+
714
+ <div id="page-login" class="page">
715
+ <div class="login-box">
716
+ <h2 style="font-size: 20px; color: var(--tg-blue-dark); margin-bottom: 8px; text-align: center;">Вход в Matrix</h2>
717
+ <p style="font-size: 13px; color: var(--tg-subtext); margin-bottom: 20px; text-align: center;">
718
+ Введите данные вашего домашнего сервера Matrix
719
+ </p>
720
+
721
+ <div class="form-group">
722
+ <label for="input-homeserver">Домашний сервер (Homeserver)</label>
723
+ <input type="text" id="input-homeserver" class="form-input" value="https://matrix.org" placeholder="https://matrix.org">
724
+ <div class="form-hint">Например: https://matrix.org или https://matrix-client.matrix.org</div>
725
+ </div>
726
+
727
+ <div class="form-group">
728
+ <label for="input-username">Имя пользователя (Username)</label>
729
+ <input type="text" id="input-username" class="form-input" placeholder="alice">
730
+ </div>
731
+
732
+ <div class="form-group">
733
+ <label for="input-password">Пароль (Password)</label>
734
+ <input type="password" id="input-password" class="form-input" placeholder="••••••••">
735
+ </div>
736
+
737
+ <button class="btn" style="width: 100%; text-align: center;" onclick="handleLogin()">Войти в аккаунт</button>
738
+ <div style="text-align: center; margin-top: 15px;">
739
+ <a style="color: var(--tg-blue); font-size: 12px; cursor: pointer;" onclick="startDemoMode()">Войти в демо-режим без авторизации</a>
740
+ </div>
741
+ </div>
742
+ </div>
743
+
744
+ <div id="page-client" class="page page-client-container">
745
+ <div class="client-layout">
746
+ <!-- Column 1: Rooms -->
747
+ <div class="rooms-sidebar">
748
+ <div class="search-box">
749
+ <input type="text" class="search-input" placeholder="Поиск чатов..." id="room-search-input" onkeyup="filterRooms()">
750
+ </div>
751
+ <ul class="rooms-list" id="rooms-list-container">
752
+ <!-- Populated dynamically -->
753
+ </ul>
754
+ </div>
755
+
756
+ <!-- Column 2: Chat Main -->
757
+ <div class="chat-main" id="chat-main-container">
758
+ <div class="chat-placeholder" id="chat-empty-state">
759
+ <div class="chat-placeholder-badge">Выберите чат из списка слева</div>
760
+ </div>
761
+
762
+ <div id="chat-active-state" style="display: none; height: 100%; flex-direction: column;">
763
+ <div class="chat-header">
764
+ <div>
765
+ <div class="chat-header-title" id="active-chat-title">Название чата</div>
766
+ <div class="chat-header-status" id="active-chat-status">0 участников</div>
767
+ </div>
768
+ </div>
769
+
770
+ <div class="messages-container" id="messages-container">
771
+ <!-- Messages populated dynamically -->
772
+ </div>
773
+
774
+ <div class="chat-input-bar">
775
+ <input type="text" class="chat-input" id="message-input" placeholder="Напишите сообщение..." onkeydown="handleKeyPress(event)">
776
+ <button class="send-btn" onclick="sendMessage()">Отправить</button>
777
+ </div>
778
+ </div>
779
+ </div>
780
+
781
+ <!-- Column 3: Info Sidebar -->
782
+ <div class="info-sidebar" id="info-sidebar-container">
783
+ <div class="info-header">
784
+ <div class="info-avatar" id="info-avatar-box">?</div>
785
+ <div class="info-name" id="info-name-box">Выберите комноту</div>
786
+ <div class="info-members-count" id="info-count-box">Информационная панель</div>
787
+ </div>
788
+
789
+ <div class="info-section">
790
+ <div class="info-section-title">О комнате</div>
791
+ <p style="font-size: 13px; color: #444; line-height: 1.4;" id="info-description-box">
792
+ Здесь отображается описание выбронного чата и список участников.
793
+ </p>
794
+ </div>
795
+
796
+ <div class="info-section">
797
+ <div class="info-section-title">Участники</div>
798
+ <ul class="member-list" id="info-member-list">
799
+ <!-- Dynamic member list -->
800
+ </ul>
801
+ </div>
802
+ </div>
803
+ </div>
804
+ </div>
805
+
806
+ <div id="page-download" class="page">
807
+ <div class="content-card">
808
+ <h1 class="content-title">Скачать Client:Less</h1>
809
+ <p class="content-subtitle">
810
+ Десктопные сборки клиента Client:Less для основных операционных систем.
811
+ </p>
812
+
813
+ <div class="download-box">
814
+ <div class="download-card">
815
+ <h4>Windows</h4>
816
+ <p style="font-size: 12px; color: var(--tg-subtext); margin-bottom: 15px;">x64 / ARM64 (Portable .exe)</p>
817
+ <button class="btn" onclick="showToast('Загрузка Client:Less v1.0 для Windows...')">Скачать .EXE</button>
818
+ </div>
819
+ <div class="download-card">
820
+ <h4>macOS</h4>
821
+ <p style="font-size: 12px; color: var(--tg-subtext); margin-bottom: 15px;">Apple Silicon / Intel (.dmg)</p>
822
+ <button class="btn" onclick="showToast('Загрузка Client:Less v1.0 для macOS...')">Скачать .DMG</button>
823
+ </div>
824
+ <div class="download-card">
825
+ <h4>Linux</h4>
826
+ <p style="font-size: 12px; color: var(--tg-subtext); margin-bottom: 15px;">AppImage / .tar.gz</p>
827
+ <button class="btn" onclick="showToast('Загрузка Client:Less v1.0 для Linux...')">Скачать .AppImage</button>
828
+ </div>
829
+ </div>
830
+ </div>
831
+ </div>
832
+
833
+ <div id="page-news" class="page">
834
+ <div class="content-card">
835
+ <h1 class="content-title">Новости проекта</h1>
836
+ <p class="content-subtitle">Все официальные релизы и обновления Client:Less начиная с 25.08.2026.</p>
837
+
838
+ <div class="news-item">
839
+ <div class="news-date">25.08.2026</div>
840
+ <h3 class="news-heading">Релиз Client:Less v1.0 Alpha!</h3>
841
+ <div class="news-body">
842
+ Сегодня состоялся официальный запуск веб-клиента <strong>Client:Less</strong>. Проект спроектирован без использования сторонних тяжелых библиотек и CDN, обеспечивая моментальный отклик интерфейса в классическом стиле Telegram 2015 года. В этой версии реализована прямая работа с Matrix REST CS API v3, подгрузка комнат, отправка сообщений и инфо-панель участников.
843
+ </div>
844
+ </div>
845
+
846
+ <div class="news-item">
847
+ <div class="news-date">25.08.2026</div>
848
+ <h3 class="news-heading">Дорожная карта разработки</h3>
849
+ <div class="news-body">
850
+ В ближайших обновлениях планируется внедрение локального шифрования Olm/Megolm (E2EE), кастомных стилей оформления и поддержки голосовых сообщений.
851
+ </div>
852
+ </div>
853
+ </div>
854
+ </div>
855
+
856
+ <div id="page-docs" class="page">
857
+ <div class="content-card">
858
+ <h1 class="content-title">Документация и справка</h1>
859
+
860
+ <div class="doc-section">
861
+ <h3>1. Что такое Matrix?</h3>
862
+ <p>
863
+ <strong>Matrix</strong> — это открытый стандарт децентрализованной защищенной коммуникации в реальном времени. Он позволяет пользователям с разных серверов (Homeservers) бесшовно общаться друг с другом, аналог электронной почты, но для мгновенных сообщений и чатов.
864
+ </p>
865
+ </div>
866
+
867
+ <div class="doc-section">
868
+ <h3>2. Как работает Client:Less?</h3>
869
+ <p>
870
+ Client:Less отправляет стандартные HTTP/REST запросы к выбранному Matrix-серверу:
871
+ </p>
872
+ <div class="code-block">
873
+ POST /_matrix/client/v3/login
874
+ GET /_matrix/client/v3/joined_rooms
875
+ GET /_matrix/client/v3/rooms/{roomId}/messages
876
+ PUT /_matrix/client/v3/rooms/{roomId}/send/m.room.message/{txnId}
877
+ </div>
878
+ </div>
879
+
880
+ <div class="doc-section">
881
+ <h3>3. Безопасность и автономность</h3>
882
+ <p>
883
+ Клиент не отправляет ваши учетные данные никуда, кроме указанного вами адреса Домашнего сервера Matrix. Вся работа происходит локально в вашем браузере.
884
+ </p>
885
+ </div>
886
+ </div>
887
+ </div>
888
+
889
+ </div>
890
+
891
+ <div class="toast" id="toast-message">Уведомление</div>
892
+
893
+ <script>
894
+ let currentState = {
895
+ homeserver: 'https://matrix.org',
896
+ accessToken: null,
897
+ userId: null,
898
+ activeRoomId: null,
899
+ isDemo: true
900
+ };
901
+
902
+ const mockRooms = [
903
+ {
904
+ id: '!matrix_general:matrix.org',
905
+ name: 'Matrix General HQ',
906
+ avatar: 'M',
907
+ color: '#5682a3',
908
+ description: 'Главный общественный чат протокола Matrix.',
909
+ members: [
910
+ { name: 'Alice (Matrix Admin)', status: 'online' },
911
+ { name: 'Bob (Core Dev)', status: 'online' },
912
+ { name: 'Charlie', status: 'offline' }
913
+ ],
914
+ messages: [
915
+ { sender: 'Alice (Matrix Admin)', text: 'Добро пожаловать в децентрализованную сеть Matrix!', time: '12:30', incoming: true },
916
+ { sender: 'Bob (Core Dev)', text: 'Client:Less работает невероятно быстро.', time: '12:31', incoming: true },
917
+ { sender: 'Вы', text: 'Интерфейс Telegram 2015 года вызывает приятную ностальгию!', time: '12:35', incoming: false }
918
+ ]
919
+ },
920
+ {
921
+ id: '!clientless_dev:matrix.org',
922
+ name: 'Разработка Client:Less',
923
+ avatar: 'C',
924
+ color: '#4cb050',
925
+ description: 'Официальный канал обсуждения разработки веб-клиента Client:Less.',
926
+ members: [
927
+ { name: 'Lead Developer', status: 'online' },
928
+ { name: 'UI Designer 2015', status: 'online' }
929
+ ],
930
+ messages: [
931
+ { sender: 'Lead Developer', text: 'Релиз v1.0 Alpha официально состоялся 25.08.2026!', time: '10:00', incoming: true },
932
+ { sender: 'UI Designer 2015', text: 'Все цвета #5682a3 выверены с точностью.', time: '10:15', incoming: true }
933
+ ]
934
+ },
935
+ {
936
+ id: '!news_room:matrix.org',
937
+ name: 'Новости и анонсы',
938
+ avatar: 'N',
939
+ color: '#f57c00',
940
+ description: 'Канал новостей сети.',
941
+ members: [
942
+ { name: 'News Bot', status: 'online' }
943
+ ],
944
+ messages: [
945
+ { sender: 'News Bot', text: 'Запущена система синхронизации без CDN библиотек.', time: '09:00', incoming: true }
946
+ ]
947
+ }
948
+ ];
949
+
950
+ function switchTab(tabName) {
951
+ document.querySelectorAll('.nav-link').forEach(el => el.classList.remove('active'));
952
+ document.querySelectorAll('.page').forEach(el => el.classList.remove('active'));
953
+
954
+ const navEl = document.getElementById(`nav-${tabName}`);
955
+ if (navEl) navEl.classList.add('active');
956
+
957
+ const pageEl = document.getElementById(`page-${tabName}`);
958
+ if (pageEl) pageEl.classList.add('active');
959
+
960
+ if (tabName === 'client') {
961
+ renderRoomsList();
962
+ }
963
+ }
964
+
965
+ function showToast(msg) {
966
+ const toast = document.getElementById('toast-message');
967
+ toast.innerText = msg;
968
+ toast.style.display = 'block';
969
+ setTimeout(() => {
970
+ toast.style.display = 'none';
971
+ }, 3000);
972
+ }
973
+
974
+ async function handleLogin() {
975
+ const server = document.getElementById('input-homeserver').value.trim();
976
+ const user = document.getElementById('input-username').value.trim();
977
+ const pass = document.getElementById('input-password').value.trim();
978
+
979
+ if (!user || !pass) {
980
+ showToast('Пожалуйста, введите имя пользователя и пароль.');
981
+ return;
982
+ }
983
+
984
+ showToast('Подключение к домашнему серверу Matrix...');
985
+
986
+ try {
987
+ // Real Matrix CS API login request
988
+ const response = await fetch(`${server}/_matrix/client/v3/login`, {
989
+ method: 'POST',
990
+ headers: { 'Content-Type': 'application/json' },
991
+ body: JSON.stringify({
992
+ type: 'm.login.password',
993
+ identifier: { type: 'm.id.user', user: user },
994
+ password: pass
995
+ })
996
+ });
997
+
998
+ const data = await response.json();
999
+
1000
+ if (response.ok) {
1001
+ currentState.homeserver = server;
1002
+ currentState.accessToken = data.access_token;
1003
+ currentState.userId = data.user_id;
1004
+ currentState.isDemo = false;
1005
+ showToast('Успешный вход!');
1006
+ switchTab('client');
1007
+ } else {
1008
+ showToast(`Ошибка входа: ${data.error || 'Неверный логин или пароль'}. Переход в демо-режим.`);
1009
+ setTimeout(() => startDemoMode(), 1500);
1010
+ }
1011
+ } catch (err) {
1012
+ showToast('Сервер недоступен или CORS ограничен. Входим в демо-режим.');
1013
+ setTimeout(() => startDemoMode(), 1500);
1014
+ }
1015
+ }
1016
+
1017
+ function startDemoMode() {
1018
+ currentState.isDemo = true;
1019
+ currentState.userId = '@demo_user:matrix.org';
1020
+ switchTab('client');
1021
+ showToast('Вы вошли в интерактивный демо-режим.');
1022
+ }
1023
+
1024
+ function renderRoomsList() {
1025
+ const container = document.getElementById('rooms-list-container');
1026
+ container.innerHTML = '';
1027
+
1028
+ mockRooms.forEach(room => {
1029
+ const lastMsg = room.messages[room.messages.length - 1];
1030
+ const li = document.createElement('li');
1031
+ li.className = `room-item ${currentState.activeRoomId === room.id ? 'active' : ''}`;
1032
+ li.onclick = () => selectRoom(room.id);
1033
+
1034
+ li.innerHTML = `
1035
+ <div class="avatar" style="background-color: ${room.color}">${room.avatar}</div>
1036
+ <div class="room-details">
1037
+ <div class="room-header-row">
1038
+ <span class="room-title">${room.name}</span>
1039
+ <span class="room-time">${lastMsg ? lastMsg.time : ''}</span>
1040
+ </div>
1041
+ <div class="room-last-msg">${lastMsg ? `${lastMsg.sender.split(' ')[0]}: ${lastMsg.text}` : 'Нет сообщений'}</div>
1042
+ </div>
1043
+ `;
1044
+ container.appendChild(li);
1045
+ });
1046
+ }
1047
+
1048
+ function filterRooms() {
1049
+ const query = document.getElementById('room-search-input').value.toLowerCase();
1050
+ const items = document.querySelectorAll('.room-item');
1051
+
1052
+ mockRooms.forEach((room, index) => {
1053
+ if (room.name.toLowerCase().includes(query)) {
1054
+ items[index].style.display = 'flex';
1055
+ } else {
1056
+ items[index].style.display = 'none';
1057
+ }
1058
+ });
1059
+ }
1060
+
1061
+ function selectRoom(roomId) {
1062
+ currentState.activeRoomId = roomId;
1063
+ const room = mockRooms.find(r => r.id === roomId);
1064
+
1065
+ if (!room) return;
1066
+
1067
+ document.getElementById('chat-empty-state').style.display = 'none';
1068
+ document.getElementById('chat-active-state').style.display = 'flex';
1069
+
1070
+ // Active header
1071
+ document.getElementById('active-chat-title').innerText = room.name;
1072
+ document.getElementById('active-chat-status').innerText = `${room.members.length} участников`;
1073
+
1074
+ // Info panel
1075
+ document.getElementById('info-avatar-box').innerText = room.avatar;
1076
+ document.getElementById('info-avatar-box').style.backgroundColor = room.color;
1077
+ document.getElementById('info-name-box').innerText = room.name;
1078
+ document.getElementById('info-count-box').innerText = `${room.members.length} участников`;
1079
+ document.getElementById('info-description-box').innerText = room.description;
1080
+
1081
+ // Info members
1082
+ const memberList = document.getElementById('info-member-list');
1083
+ memberList.innerHTML = '';
1084
+ room.members.forEach(m => {
1085
+ const item = document.createElement('li');
1086
+ item.className = 'member-item';
1087
+ item.innerHTML = `
1088
+ <div class="member-avatar">${m.name[0]}</div>
1089
+ <div>
1090
+ <div class="member-name">${m.name}</div>
1091
+ <div class="member-status">${m.status}</div>
1092
+ </div>
1093
+ `;
1094
+ memberList.appendChild(item);
1095
+ });
1096
+
1097
+ renderMessages(room);
1098
+ renderRoomsList();
1099
+ }
1100
+
1101
+ function renderMessages(room) {
1102
+ const container = document.getElementById('messages-container');
1103
+ container.innerHTML = '';
1104
+
1105
+ room.messages.forEach(msg => {
1106
+ const bubble = document.createElement('div');
1107
+ bubble.className = `message-bubble ${msg.incoming ? 'incoming' : 'outgoing'}`;
1108
+
1109
+ bubble.innerHTML = `
1110
+ ${msg.incoming ? `<div class="msg-sender">${msg.sender}</div>` : ''}
1111
+ <div>${escapeHtml(msg.text)}</div>
1112
+ <div class="msg-time">${msg.time}</div>
1113
+ `;
1114
+
1115
+ container.appendChild(bubble);
1116
+ });
1117
+
1118
+ container.scrollTop = container.scrollHeight;
1119
+ }
1120
+
1121
+ function sendMessage() {
1122
+ const input = document.getElementById('message-input');
1123
+ const text = input.value.trim();
1124
+
1125
+ if (!text || !currentState.activeRoomId) return;
1126
+
1127
+ const room = mockRooms.find(r => r.id === currentState.activeRoomId);
1128
+ if (room) {
1129
+ const now = new Date();
1130
+ const timeStr = `${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}`;
1131
+
1132
+ room.messages.push({
1133
+ sender: 'Вы',
1134
+ text: text,
1135
+ time: timeStr,
1136
+ incoming: false
1137
+ });
1138
+
1139
+ input.value = '';
1140
+ renderMessages(room);
1141
+ renderRoomsList();
1142
+ }
1143
+ }
1144
+
1145
+ function handleKeyPress(e) {
1146
+ if (e.key === 'Enter') {
1147
+ sendMessage();
1148
+ }
1149
+ }
1150
+
1151
+ function escapeHtml(text) {
1152
+ return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1153
+ }
1154
+
1155
+ window.onload = function() {
1156
+ // Select first room by default for demo ease
1157
+ selectRoom(mockRooms[0].id);
1158
+ };
1159
+ </script>
1160
+ </body>
1161
+ </html>