sky-meilin commited on
Commit
e42e79a
·
verified ·
1 Parent(s): 3c3f51f

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +795 -19
index.html CHANGED
@@ -1,19 +1,795 @@
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="de">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>AI Control Center</title>
7
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
8
+ <style>
9
+ :root {
10
+ --primary-color: #4a6bff;
11
+ --secondary-color: #2a3f8f;
12
+ --accent-color: #ff6b6b;
13
+ --text-color: #333;
14
+ --light-bg: #f8f9fa;
15
+ --dark-bg: #1e1e1e;
16
+ --border-radius: 12px;
17
+ --transition: all 0.3s ease;
18
+ --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
19
+ --glow: 0 0 15px rgba(74, 107, 255, 0.4);
20
+ }
21
+
22
+ * {
23
+ margin: 0;
24
+ padding: 0;
25
+ box-sizing: border-box;
26
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
27
+ }
28
+
29
+ body {
30
+ background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
31
+ min-height: 100vh;
32
+ padding: 20px;
33
+ color: var(--text-color);
34
+ }
35
+
36
+ .container {
37
+ max-width: 1200px;
38
+ margin: 0 auto;
39
+ }
40
+
41
+ header {
42
+ display: flex;
43
+ justify-content: space-between;
44
+ align-items: center;
45
+ margin-bottom: 30px;
46
+ padding-bottom: 20px;
47
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
48
+ }
49
+
50
+ .logo {
51
+ font-size: 1.8rem;
52
+ font-weight: 700;
53
+ color: var(--primary-color);
54
+ display: flex;
55
+ align-items: center;
56
+ gap: 10px;
57
+ }
58
+
59
+ .logo i {
60
+ font-size: 2rem;
61
+ }
62
+
63
+ .header-right {
64
+ display: flex;
65
+ align-items: center;
66
+ gap: 20px;
67
+ }
68
+
69
+ .anycoder-link {
70
+ color: var(--primary-color);
71
+ text-decoration: none;
72
+ font-weight: 500;
73
+ transition: var(--transition);
74
+ }
75
+
76
+ .anycoder-link:hover {
77
+ color: var(--accent-color);
78
+ }
79
+
80
+ .user-profile {
81
+ display: flex;
82
+ align-items: center;
83
+ gap: 10px;
84
+ background: white;
85
+ padding: 8px 15px;
86
+ border-radius: var(--border-radius);
87
+ box-shadow: var(--shadow);
88
+ }
89
+
90
+ .user-avatar {
91
+ width: 35px;
92
+ height: 35px;
93
+ border-radius: 50%;
94
+ background: var(--primary-color);
95
+ display: flex;
96
+ align-items: center;
97
+ justify-content: center;
98
+ color: white;
99
+ font-weight: bold;
100
+ }
101
+
102
+ .main-grid {
103
+ display: grid;
104
+ grid-template-columns: 1fr 2fr;
105
+ gap: 30px;
106
+ margin-bottom: 30px;
107
+ }
108
+
109
+ .control-panel {
110
+ background: white;
111
+ border-radius: var(--border-radius);
112
+ padding: 25px;
113
+ box-shadow: var(--shadow);
114
+ display: flex;
115
+ flex-direction: column;
116
+ gap: 20px;
117
+ }
118
+
119
+ .control-panel h2 {
120
+ color: var(--primary-color);
121
+ margin-bottom: 15px;
122
+ font-size: 1.5rem;
123
+ }
124
+
125
+ .mode-selector {
126
+ display: flex;
127
+ gap: 10px;
128
+ margin-bottom: 20px;
129
+ }
130
+
131
+ .mode-btn {
132
+ flex: 1;
133
+ padding: 12px;
134
+ border: none;
135
+ border-radius: var(--border-radius);
136
+ background: var(--light-bg);
137
+ color: var(--text-color);
138
+ font-weight: 600;
139
+ cursor: pointer;
140
+ transition: var(--transition);
141
+ display: flex;
142
+ flex-direction: column;
143
+ align-items: center;
144
+ gap: 8px;
145
+ }
146
+
147
+ .mode-btn i {
148
+ font-size: 1.5rem;
149
+ }
150
+
151
+ .mode-btn.active {
152
+ background: var(--primary-color);
153
+ color: white;
154
+ box-shadow: var(--glow);
155
+ }
156
+
157
+ .mode-btn:not(.active):hover {
158
+ background: rgba(74, 107, 255, 0.1);
159
+ }
160
+
161
+ .control-section {
162
+ display: none;
163
+ flex-direction: column;
164
+ gap: 15px;
165
+ }
166
+
167
+ .control-section.active {
168
+ display: flex;
169
+ }
170
+
171
+ .input-group {
172
+ display: flex;
173
+ flex-direction: column;
174
+ gap: 8px;
175
+ }
176
+
177
+ .input-group label {
178
+ font-weight: 500;
179
+ color: var(--secondary-color);
180
+ }
181
+
182
+ .input-group input,
183
+ .input-group textarea,
184
+ .input-group select {
185
+ padding: 12px;
186
+ border: 1px solid #ddd;
187
+ border-radius: var(--border-radius);
188
+ font-size: 1rem;
189
+ transition: var(--transition);
190
+ }
191
+
192
+ .input-group input:focus,
193
+ .input-group textarea:focus,
194
+ .input-group select:focus {
195
+ outline: none;
196
+ border-color: var(--primary-color);
197
+ box-shadow: var(--glow);
198
+ }
199
+
200
+ .slider-container {
201
+ display: flex;
202
+ flex-direction: column;
203
+ gap: 10px;
204
+ }
205
+
206
+ .slider {
207
+ -webkit-appearance: none;
208
+ appearance: none;
209
+ height: 6px;
210
+ border-radius: 3px;
211
+ background: var(--light-bg);
212
+ outline: none;
213
+ }
214
+
215
+ .slider::-webkit-slider-thumb {
216
+ -webkit-appearance: none;
217
+ appearance: none;
218
+ width: 20px;
219
+ height: 20px;
220
+ border-radius: 50%;
221
+ background: var(--primary-color);
222
+ cursor: pointer;
223
+ }
224
+
225
+ .slider::-moz-range-thumb {
226
+ width: 20px;
227
+ height: 20px;
228
+ border-radius: 50%;
229
+ background: var(--primary-color);
230
+ cursor: pointer;
231
+ border: none;
232
+ }
233
+
234
+ .slider-value {
235
+ display: flex;
236
+ justify-content: space-between;
237
+ font-size: 0.9rem;
238
+ color: var(--secondary-color);
239
+ }
240
+
241
+ .output-preview {
242
+ flex: 1;
243
+ background: white;
244
+ border-radius: var(--border-radius);
245
+ padding: 25px;
246
+ box-shadow: var(--shadow);
247
+ display: flex;
248
+ flex-direction: column;
249
+ gap: 20px;
250
+ }
251
+
252
+ .preview-header {
253
+ display: flex;
254
+ justify-content: space-between;
255
+ align-items: center;
256
+ margin-bottom: 15px;
257
+ }
258
+
259
+ .preview-title {
260
+ font-size: 1.5rem;
261
+ color: var(--primary-color);
262
+ font-weight: 600;
263
+ }
264
+
265
+ .preview-actions {
266
+ display: flex;
267
+ gap: 10px;
268
+ }
269
+
270
+ .action-btn {
271
+ background: var(--light-bg);
272
+ border: none;
273
+ border-radius: 50%;
274
+ width: 35px;
275
+ height: 35px;
276
+ display: flex;
277
+ align-items: center;
278
+ justify-content: center;
279
+ cursor: pointer;
280
+ transition: var(--transition);
281
+ color: var(--text-color);
282
+ }
283
+
284
+ .action-btn:hover {
285
+ background: var(--primary-color);
286
+ color: white;
287
+ }
288
+
289
+ .preview-content {
290
+ flex: 1;
291
+ border: 1px dashed #ddd;
292
+ border-radius: var(--border-radius);
293
+ padding: 20px;
294
+ display: flex;
295
+ flex-direction: column;
296
+ align-items: center;
297
+ justify-content: center;
298
+ min-height: 300px;
299
+ background: var(--light-bg);
300
+ }
301
+
302
+ .preview-content.empty {
303
+ color: var(--secondary-color);
304
+ text-align: center;
305
+ }
306
+
307
+ .preview-content.empty i {
308
+ font-size: 3rem;
309
+ margin-bottom: 15px;
310
+ opacity: 0.5;
311
+ }
312
+
313
+ .generate-btn {
314
+ background: var(--primary-color);
315
+ color: white;
316
+ border: none;
317
+ padding: 15px 30px;
318
+ border-radius: var(--border-radius);
319
+ font-size: 1.1rem;
320
+ font-weight: 600;
321
+ cursor: pointer;
322
+ transition: var(--transition);
323
+ box-shadow: var(--shadow);
324
+ margin-top: auto;
325
+ }
326
+
327
+ .generate-btn:hover {
328
+ background: #3a5bef;
329
+ transform: translateY(-2px);
330
+ box-shadow: var(--glow);
331
+ }
332
+
333
+ .history-panel {
334
+ background: white;
335
+ border-radius: var(--border-radius);
336
+ padding: 25px;
337
+ box-shadow: var(--shadow);
338
+ }
339
+
340
+ .history-header {
341
+ display: flex;
342
+ justify-content: space-between;
343
+ align-items: center;
344
+ margin-bottom: 20px;
345
+ }
346
+
347
+ .history-title {
348
+ font-size: 1.5rem;
349
+ color: var(--primary-color);
350
+ font-weight: 600;
351
+ }
352
+
353
+ .clear-history {
354
+ background: none;
355
+ border: none;
356
+ color: var(--secondary-color);
357
+ cursor: pointer;
358
+ transition: var(--transition);
359
+ }
360
+
361
+ .clear-history:hover {
362
+ color: var(--accent-color);
363
+ }
364
+
365
+ .history-items {
366
+ display: flex;
367
+ flex-direction: column;
368
+ gap: 15px;
369
+ max-height: 400px;
370
+ overflow-y: auto;
371
+ }
372
+
373
+ .history-item {
374
+ display: flex;
375
+ justify-content: space-between;
376
+ align-items: center;
377
+ padding: 12px;
378
+ border-radius: var(--border-radius);
379
+ background: var(--light-bg);
380
+ transition: var(--transition);
381
+ cursor: pointer;
382
+ }
383
+
384
+ .history-item:hover {
385
+ background: rgba(74, 107, 255, 0.1);
386
+ }
387
+
388
+ .history-item i {
389
+ color: var(--primary-color);
390
+ margin-right: 10px;
391
+ }
392
+
393
+ .history-item .time {
394
+ color: var(--secondary-color);
395
+ font-size: 0.9rem;
396
+ }
397
+
398
+ .history-item .type {
399
+ padding: 4px 10px;
400
+ border-radius: 20px;
401
+ font-size: 0.8rem;
402
+ font-weight: 600;
403
+ }
404
+
405
+ .history-item .type.text {
406
+ background: rgba(74, 107, 255, 0.2);
407
+ color: var(--primary-color);
408
+ }
409
+
410
+ .history-item .type.image {
411
+ background: rgba(255, 107, 107, 0.2);
412
+ color: var(--accent-color);
413
+ }
414
+
415
+ .history-item .type.video {
416
+ background: rgba(107, 255, 107, 0.2);
417
+ color: #2ecc71;
418
+ }
419
+
420
+ @media (max-width: 900px) {
421
+ .main-grid {
422
+ grid-template-columns: 1fr;
423
+ }
424
+
425
+ .control-panel {
426
+ order: 1;
427
+ }
428
+
429
+ .output-preview {
430
+ order: 2;
431
+ }
432
+
433
+ .history-panel {
434
+ order: 3;
435
+ }
436
+ }
437
+
438
+ @media (max-width: 600px) {
439
+ .mode-selector {
440
+ flex-direction: column;
441
+ }
442
+
443
+ .mode-btn {
444
+ flex-direction: row;
445
+ justify-content: flex-start;
446
+ gap: 15px;
447
+ }
448
+
449
+ .header-right {
450
+ flex-direction: column;
451
+ align-items: flex-end;
452
+ gap: 10px;
453
+ }
454
+ }
455
+ </style>
456
+ </head>
457
+ <body>
458
+ <div class="container">
459
+ <header>
460
+ <div class="logo">
461
+ <i class="fas fa-robot"></i>
462
+ <span>AI Control Center</span>
463
+ </div>
464
+ <div class="header-right">
465
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" class="anycoder-link" target="_blank">Built with anycoder</a>
466
+ <div class="user-profile">
467
+ <div class="user-avatar">U</div>
468
+ <span>User</span>
469
+ </div>
470
+ </div>
471
+ </header>
472
+
473
+ <div class="main-grid">
474
+ <div class="control-panel">
475
+ <h2>Steuerungszentrale</h2>
476
+
477
+ <div class="mode-selector">
478
+ <button class="mode-btn active" data-mode="text">
479
+ <i class="fas fa-font"></i>
480
+ <span>Text</span>
481
+ </button>
482
+ <button class="mode-btn" data-mode="image">
483
+ <i class="fas fa-image"></i>
484
+ <span>Bild</span>
485
+ </button>
486
+ <button class="mode-btn" data-mode="video">
487
+ <i class="fas fa-video"></i>
488
+ <span>Video</span>
489
+ </button>
490
+ </div>
491
+
492
+ <!-- Text Controls -->
493
+ <div class="control-section active" id="text-controls">
494
+ <div class="input-group">
495
+ <label for="text-prompt">Eingabeaufforderung</label>
496
+ <textarea id="text-prompt" rows="4" placeholder="Beschreiben Sie den Text, den Sie generieren möchten..."></textarea>
497
+ </div>
498
+
499
+ <div class="input-group">
500
+ <label for="text-style">Stil</label>
501
+ <select id="text-style">
502
+ <option value="standard">Standard</option>
503
+ <option value="creative">Kreativ</option>
504
+ <option value="professional">Professionell</option>
505
+ <option value="casual">Lässig</option>
506
+ </select>
507
+ </div>
508
+
509
+ <div class="slider-container">
510
+ <label for="text-length">Länge (Wörter)</label>
511
+ <input type="range" id="text-length" class="slider" min="50" max="1000" value="300">
512
+ <div class="slider-value">
513
+ <span>50</span>
514
+ <span id="text-length-value">300</span>
515
+ </div>
516
+ </div>
517
+ </div>
518
+
519
+ <!-- Image Controls -->
520
+ <div class="control-section" id="image-controls">
521
+ <div class="input-group">
522
+ <label for="image-prompt">Bildbeschreibung</label>
523
+ <textarea id="image-prompt" rows="4" placeholder="Beschreiben Sie das Bild, das Sie generieren möchten..."></textarea>
524
+ </div>
525
+
526
+ <div class="input-group">
527
+ <label for="image-style">Stil</label>
528
+ <select id="image-style">
529
+ <option value="realistic">Realistisch</option>
530
+ <option value="cartoon">Cartoon</option>
531
+ <option value="watercolor">Aquarell</option>
532
+ <option value="cyberpunk">Cyberpunk</option>
533
+ <option value="fantasy">Fantasy</option>
534
+ </select>
535
+ </div>
536
+
537
+ <div class="slider-container">
538
+ <label for="image-resolution">Auflösung</label>
539
+ <input type="range" id="image-resolution" class="slider" min="256" max="2048" value="1024" step="256">
540
+ <div class="slider-value">
541
+ <span>256px</span>
542
+ <span id="image-resolution-value">1024px</span>
543
+ </div>
544
+ </div>
545
+ </div>
546
+
547
+ <!-- Video Controls -->
548
+ <div class="control-section" id="video-controls">
549
+ <div class="input-group">
550
+ <label for="video-prompt">Videobeschreibung</label>
551
+ <textarea id="video-prompt" rows="4" placeholder="Beschreiben Sie das Video, das Sie generieren möchten..."></textarea>
552
+ </div>
553
+
554
+ <div class="input-group">
555
+ <label for="video-style">Stil</label>
556
+ <select id="video-style">
557
+ <option value="cinematic">Kinematisch</option>
558
+ <option value="animation">Animation</option>
559
+ <option value="documentary">Dokumentation</option>
560
+ <option value="vlog">Vlog</option>
561
+ </select>
562
+ </div>
563
+
564
+ <div class="slider-container">
565
+ <label for="video-duration">Dauer (Sekunden)</label>
566
+ <input type="range" id="video-duration" class="slider" min="5" max="60" value="15">
567
+ <div class="slider-value">
568
+ <span>5s</span>
569
+ <span id="video-duration-value">15s</span>
570
+ </div>
571
+ </div>
572
+ </div>
573
+
574
+ <button class="generate-btn" id="generate-btn">
575
+ <i class="fas fa-magic"></i> Generieren
576
+ </button>
577
+ </div>
578
+
579
+ <div class="output-preview">
580
+ <div class="preview-header">
581
+ <h2 class="preview-title">Vorschau</h2>
582
+ <div class="preview-actions">
583
+ <button class="action-btn" title="Herunterladen">
584
+ <i class="fas fa-download"></i>
585
+ </button>
586
+ <button class="action-btn" title="Teilen">
587
+ <i class="fas fa-share-alt"></i>
588
+ </button>
589
+ <button class="action-btn" title="Vollbild">
590
+ <i class="fas fa-expand"></i>
591
+ </button>
592
+ </div>
593
+ </div>
594
+
595
+ <div class="preview-content empty" id="preview-content">
596
+ <i class="fas fa-robot"></i>
597
+ <p>Wählen Sie einen Modus und generieren Sie Inhalte</p>
598
+ </div>
599
+ </div>
600
+ </div>
601
+
602
+ <div class="history-panel">
603
+ <div class="history-header">
604
+ <h2 class="history-title">Verlauf</h2>
605
+ <button class="clear-history">
606
+ <i class="fas fa-trash"></i> Verlauf löschen
607
+ </button>
608
+ </div>
609
+
610
+ <div class="history-items" id="history-items">
611
+ <!-- History items will be added dynamically -->
612
+ </div>
613
+ </div>
614
+ </div>
615
+
616
+ <script>
617
+ document.addEventListener('DOMContentLoaded', function() {
618
+ // Mode switching
619
+ const modeBtns = document.querySelectorAll('.mode-btn');
620
+ const controlSections = document.querySelectorAll('.control-section');
621
+
622
+ modeBtns.forEach(btn => {
623
+ btn.addEventListener('click', () => {
624
+ // Remove active class from all buttons
625
+ modeBtns.forEach(b => b.classList.remove('active'));
626
+ // Add active class to clicked button
627
+ btn.classList.add('active');
628
+
629
+ // Hide all control sections
630
+ controlSections.forEach(section => section.classList.remove('active'));
631
+
632
+ // Show the selected control section
633
+ const mode = btn.dataset.mode;
634
+ document.getElementById(`${mode}-controls`).classList.add('active');
635
+
636
+ // Update preview title
637
+ const previewTitle = document.querySelector('.preview-title');
638
+ const modes = {
639
+ text: 'Textvorschau',
640
+ image: 'Bildvorschau',
641
+ video: 'Videovorschau'
642
+ };
643
+ previewTitle.textContent = modes[mode];
644
+ });
645
+ });
646
+
647
+ // Slider value updates
648
+ const sliders = document.querySelectorAll('.slider');
649
+ sliders.forEach(slider => {
650
+ const valueDisplay = document.getElementById(`${slider.id}-value`);
651
+
652
+ slider.addEventListener('input', () => {
653
+ valueDisplay.textContent = slider.value;
654
+
655
+ // Add unit if needed
656
+ if (slider.id === 'text-length') {
657
+ valueDisplay.textContent += ' Wörter';
658
+ } else if (slider.id === 'image-resolution') {
659
+ valueDisplay.textContent += 'px';
660
+ } else if (slider.id === 'video-duration') {
661
+ valueDisplay.textContent += 's';
662
+ }
663
+ });
664
+ });
665
+
666
+ // Generate button click handler
667
+ const generateBtn = document.getElementById('generate-btn');
668
+ const previewContent = document.getElementById('preview-content');
669
+ const historyItems = document.getElementById('history-items');
670
+
671
+ generateBtn.addEventListener('click', () => {
672
+ const activeMode = document.querySelector('.mode-btn.active').dataset.mode;
673
+ const prompt = document.getElementById(`${activeMode}-prompt`).value;
674
+
675
+ if (!prompt) {
676
+ alert('Bitte geben Sie eine Beschreibung ein');
677
+ return;
678
+ }
679
+
680
+ // Simulate generation
681
+ previewContent.classList.remove('empty');
682
+ previewContent.innerHTML = `
683
+ <div class="generating">
684
+ <i class="fas fa-spinner fa-spin fa-3x" style="color: var(--primary-color);"></i>
685
+ <p style="margin-top: 15px;">Inhalt wird generiert...</p>
686
+ </div>
687
+ `;
688
+
689
+ // Simulate completion after 2 seconds
690
+ setTimeout(() => {
691
+ const now = new Date();
692
+ const timeString = now.toLocaleTimeString('de-DE', { hour: '2-digit', minute: '2-digit' });
693
+
694
+ // Create preview content based on mode
695
+ let previewHTML = '';
696
+ let historyType = '';
697
+
698
+ switch(activeMode) {
699
+ case 'text':
700
+ previewHTML = `
701
+ <h3>Generierter Text</h3>
702
+ <div style="background: white; padding: 20px; border-radius: var(--border-radius); width: 100%; max-height: 250px; overflow-y: auto;">
703
+ <p style="line-height: 1.6; color: var(--text-color);">
704
+ ${generateSampleText(prompt)}
705
+ </p>
706
+ </div>
707
+ `;
708
+ historyType = 'text';
709
+ break;
710
+
711
+ case 'image':
712
+ previewHTML = `
713
+ <h3>Generiertes Bild</h3>
714
+ <div style="background: white; padding: 20px; border-radius: var(--border-radius); width: 100%; display: flex; justify-content: center;">
715
+ <div style="width: 300px; height: 200px; background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold;">
716
+ ${prompt.substring(0, 30)}...
717
+ </div>
718
+ </div>
719
+ `;
720
+ historyType = 'image';
721
+ break;
722
+
723
+ case 'video':
724
+ previewHTML = `
725
+ <h3>Generiertes Video</h3>
726
+ <div style="background: white; padding: 20px; border-radius: var(--border-radius); width: 100%; display: flex; justify-content: center;">
727
+ <div style="width: 300px; height: 200px; background: #333; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; position: relative;">
728
+ <i class="fas fa-play-circle" style="font-size: 3rem; opacity: 0.8;"></i>
729
+ <span style="position: absolute; bottom: 10px;">${prompt.substring(0, 20)}...</span>
730
+ </div>
731
+ </div>
732
+ `;
733
+ historyType = 'video';
734
+ break;
735
+ }
736
+
737
+ previewContent.innerHTML = previewHTML;
738
+
739
+ // Add to history
740
+ const historyItem = document.createElement('div');
741
+ historyItem.className = 'history-item';
742
+ historyItem.innerHTML = `
743
+ <div style="display: flex; align-items: center;">
744
+ <i class="fas ${getIconForMode(activeMode)}"></i>
745
+ <span>${prompt.substring(0, 30)}${prompt.length > 30 ? '...' : ''}</span>
746
+ </div>
747
+ <div style="display: flex; align-items: center; gap: 10px;">
748
+ <span class="time">${timeString}</span>
749
+ <span class="type ${activeMode}">${activeMode}</span>
750
+ </div>
751
+ `;
752
+
753
+ // Add click event to load history item
754
+ historyItem.addEventListener('click', () => {
755
+ // Load the history item into preview
756
+ previewContent.innerHTML = previewHTML;
757
+ });
758
+
759
+ historyItems.prepend(historyItem);
760
+
761
+ }, 2000);
762
+ });
763
+
764
+ // Clear history
765
+ document.querySelector('.clear-history').addEventListener('click', () => {
766
+ if (confirm('Möchten Sie den Verlauf wirklich löschen?')) {
767
+ historyItems.innerHTML = '';
768
+ }
769
+ });
770
+
771
+ // Helper functions
772
+ function generateSampleText(prompt) {
773
+ const styles = {
774
+ standard: 'Dies ist ein standardmäßiger, klar strukturierter Text, der die Eingabeaufforderung genau befolgt. Der Inhalt ist präzise formuliert und eignet sich für formelle oder informative Zwecke.',
775
+ creative: 'In einer Welt, in der die Fantasie keine Grenzen kennt, entfaltet sich diese kreative Interpretation Ihrer Eingabeaufforderung. Mit lebendigen Beschreibungen und unerwarteten Wendungen wird Ihre Idee zu einem einzigartigen Kunstwerk der Worte.',
776
+ professional: 'Gemäß den höchsten Standards professioneller Kommunikation präsentieren wir Ihnen diesen Text. Mit präziser Terminologie und strukturierter Argumentation eignet sich dieser Inhalt ideal für geschäftliche oder akademische Zwecke.',
777
+ casual: 'Hey! Hier ist eine lockere, freundliche Version deiner Idee. Ich hab einfach mal drauflos geschrieben, so wie man es beim Kaffee mit Freunden machen würde. Hoffentlich gefällt's dir!'
778
+ };
779
+
780
+ const selectedStyle = document.getElementById('text-style').value;
781
+ return `${prompt}\n\n${styles[selectedStyle]}`;
782
+ }
783
+
784
+ function getIconForMode(mode) {
785
+ const icons = {
786
+ text: 'fa-font',
787
+ image: 'fa-image',
788
+ video: 'fa-video'
789
+ };
790
+ return icons[mode];
791
+ }
792
+ });
793
+ </script>
794
+ </body>
795
+ </html>