T0adOG commited on
Commit
1528862
Β·
verified Β·
1 Parent(s): 429067a

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +1083 -19
index.html CHANGED
@@ -1,19 +1,1083 @@
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">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>IPY β€” Interactive Python Console</title>
7
+ <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/brython/3.11.0/brython.min.js"></script>
8
+ <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/brython/3.11.0/brython_stdlib.js"></script>
9
+ <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
10
+ <style>
11
+ :root {
12
+ /* ── Dark Theme (Default) ── */
13
+ --bg-base: #0b0f17;
14
+ --bg-surface: #111827;
15
+ --bg-elevated: #1a2235;
16
+ --bg-input: #0e1321;
17
+ --bg-hover: #1e2a45;
18
+ --border-subtle: #1e293b;
19
+ --border-default: #2d3a52;
20
+ --border-active: #3b82f6;
21
+ --text-primary: #e2e8f0;
22
+ --text-secondary: #8896a8;
23
+ --text-muted: #5a6b82;
24
+ --text-accent: #60a5fa;
25
+ --text-success: #34d399;
26
+ --text-warning: #fbbf24;
27
+ --text-danger: #f87171;
28
+ --accent: #3b82f6;
29
+ --accent-hover: #2563eb;
30
+ --accent-dim: rgba(59, 130, 246, 0.1);
31
+ --cell-num: #4ade80;
32
+ --scrollbar: #2d3a52;
33
+ --scrollbar-hover: #3b82f6;
34
+ --sidebar-w: 320px;
35
+ --header-h: 56px;
36
+ --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
37
+ --font-sans: 'Inter', -apple-system, sans-serif;
38
+ }
39
+
40
+ [data-theme="light"] {
41
+ --bg-base: #f8fafc;
42
+ --bg-surface: #ffffff;
43
+ --bg-elevated: #f1f5f9;
44
+ --bg-input: #f8fafc;
45
+ --bg-hover: #e2e8f0;
46
+ --border-subtle: #e2e8f0;
47
+ --border-default: #cbd5e1;
48
+ --border-active: #3b82f6;
49
+ --text-primary: #1e293b;
50
+ --text-secondary: #64748b;
51
+ --text-muted: #94a3b8;
52
+ --text-accent: #2563eb;
53
+ --text-success: #059669;
54
+ --text-warning: #d97706;
55
+ --text-danger: #dc2626;
56
+ --accent: #2563eb;
57
+ --accent-hover: #1d4ed8;
58
+ --accent-dim: rgba(37, 99, 235, 0.08);
59
+ --cell-num: #059669;
60
+ --scrollbar: #cbd5e1;
61
+ --scrollbar-hover: #2563eb;
62
+ }
63
+
64
+ * { margin: 0; padding: 0; box-sizing: border-box; }
65
+
66
+ html {
67
+ scrollbar-width: thin;
68
+ scrollbar-color: var(--scrollbar) transparent;
69
+ }
70
+
71
+ body {
72
+ font-family: var(--font-sans);
73
+ background: var(--bg-base);
74
+ color: var(--text-primary);
75
+ min-height: 100dvh;
76
+ display: flex;
77
+ flex-direction: column;
78
+ overflow-x: hidden;
79
+ transition: background 0.3s, color 0.3s;
80
+ }
81
+
82
+ /* ── Scrollbar ── */
83
+ ::-webkit-scrollbar { width: 6px; height: 6px; }
84
+ ::-webkit-scrollbar-track { background: transparent; }
85
+ ::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 3px; }
86
+ ::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); }
87
+
88
+ /* ═══════════════════════════════════════
89
+ TOP HEADER
90
+ ═══════════════════════════════════════ */
91
+ .topbar {
92
+ height: var(--header-h);
93
+ background: var(--bg-surface);
94
+ border-bottom: 1px solid var(--border-subtle);
95
+ display: flex;
96
+ align-items: center;
97
+ justify-content: space-between;
98
+ padding: 0 20px;
99
+ position: sticky;
100
+ top: 0;
101
+ z-index: 100;
102
+ transition: all 0.3s;
103
+ }
104
+
105
+ .topbar-left {
106
+ display: flex;
107
+ align-items: center;
108
+ gap: 18px;
109
+ }
110
+
111
+ .logo-group {
112
+ display: flex;
113
+ align-items: center;
114
+ gap: 10px;
115
+ cursor: default;
116
+ }
117
+
118
+ .logo-icon {
119
+ width: 32px;
120
+ height: 32px;
121
+ border-radius: 8px;
122
+ background: linear-gradient(135deg, #3b82f6, #8b5cf6);
123
+ display: flex;
124
+ align-items: center;
125
+ justify-content: center;
126
+ font-family: var(--font-mono);
127
+ font-weight: 700;
128
+ font-size: 13px;
129
+ color: #fff;
130
+ box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
131
+ transition: transform 0.2s;
132
+ }
133
+
134
+ .logo-icon:hover { transform: scale(1.05); }
135
+
136
+ .logo-text {
137
+ font-weight: 700;
138
+ font-size: 18px;
139
+ letter-spacing: -0.02em;
140
+ color: var(--text-primary);
141
+ }
142
+
143
+ .logo-text span {
144
+ font-weight: 400;
145
+ color: var(--text-muted);
146
+ font-size: 14px;
147
+ margin-left: 4px;
148
+ }
149
+
150
+ .sep {
151
+ width: 1px;
152
+ height: 24px;
153
+ background: var(--border-default);
154
+ }
155
+
156
+ .built-with {
157
+ font-size: 11px;
158
+ color: var(--text-muted);
159
+ letter-spacing: 0.02em;
160
+ }
161
+
162
+ .built-with a {
163
+ color: var(--text-accent);
164
+ text-decoration: none;
165
+ font-weight: 500;
166
+ transition: opacity 0.2s;
167
+ }
168
+
169
+ .built-with a:hover { opacity: 0.75; }
170
+
171
+ .topbar-right {
172
+ display: flex;
173
+ align-items: center;
174
+ gap: 6px;
175
+ }
176
+
177
+ .btn {
178
+ display: flex;
179
+ align-items: center;
180
+ gap: 6px;
181
+ padding: 7px 14px;
182
+ border: 1px solid var(--border-default);
183
+ border-radius: 8px;
184
+ background: var(--bg-surface);
185
+ color: var(--text-secondary);
186
+ font-family: var(--font-sans);
187
+ font-size: 12px;
188
+ font-weight: 500;
189
+ cursor: pointer;
190
+ transition: all 0.2s;
191
+ white-space: nowrap;
192
+ }
193
+
194
+ .btn:hover {
195
+ background: var(--bg-hover);
196
+ color: var(--text-primary);
197
+ border-color: var(--border-active);
198
+ }
199
+
200
+ .btn:active { transform: translateY(1px); }
201
+
202
+ .btn svg { width: 14px; height: 14px; flex-shrink: 0; }
203
+
204
+ .btn-primary {
205
+ background: var(--accent);
206
+ color: #fff;
207
+ border-color: var(--accent);
208
+ }
209
+
210
+ .btn-primary:hover {
211
+ background: var(--accent-hover);
212
+ color: #fff;
213
+ box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
214
+ }
215
+
216
+ .btn-danger {
217
+ background: rgba(248, 113, 113, 0.1);
218
+ color: var(--text-danger);
219
+ border-color: rgba(248, 113, 113, 0.2);
220
+ }
221
+
222
+ .btn-danger:hover {
223
+ background: rgba(248, 113, 113, 0.15);
224
+ border-color: rgba(248, 113, 113, 0.4);
225
+ }
226
+
227
+ /* ═══════════════════════════════════════
228
+ LAYOUT
229
+ ═══════════════════════════════════════ */
230
+ .main-wrap {
231
+ flex: 1;
232
+ display: grid;
233
+ grid-template-columns: 1fr var(--sidebar-w);
234
+ min-height: calc(100dvh - var(--header-h));
235
+ }
236
+
237
+ .console-area {
238
+ padding: 20px;
239
+ display: flex;
240
+ flex-direction: column;
241
+ gap: 16px;
242
+ overflow-y: auto;
243
+ max-height: calc(100dvh - var(--header-h));
244
+ }
245
+
246
+ /* ═══════════════════════════════════════
247
+ TOOLBAR
248
+ ═══════════════════════════════════════ */
249
+ .toolbar {
250
+ display: flex;
251
+ align-items: center;
252
+ justify-content: space-between;
253
+ flex-wrap: wrap;
254
+ gap: 10px;
255
+ }
256
+
257
+ .toolbar-left {
258
+ display: flex;
259
+ align-items: center;
260
+ gap: 8px;
261
+ flex-wrap: wrap;
262
+ }
263
+
264
+ .toolbar-right {
265
+ display: flex;
266
+ align-items: center;
267
+ gap: 6px;
268
+ }
269
+
270
+ .kernel-status {
271
+ display: flex;
272
+ align-items: center;
273
+ gap: 6px;
274
+ font-size: 11px;
275
+ color: var(--text-muted);
276
+ }
277
+
278
+ .status-dot {
279
+ width: 7px;
280
+ height: 7px;
281
+ border-radius: 50%;
282
+ background: var(--text-success);
283
+ position: relative;
284
+ }
285
+
286
+ .status-dot::after {
287
+ content: '';
288
+ position: absolute;
289
+ inset: -3px;
290
+ border-radius: 50%;
291
+ border: 1.5px solid var(--text-success);
292
+ opacity: 0.5;
293
+ animation: pulse-ring 2.5s infinite;
294
+ }
295
+
296
+ @keyframes pulse-ring {
297
+ 0%, 100% { transform: scale(1); opacity: 0.5; }
298
+ 50% { transform: scale(1.6); opacity: 0; }
299
+ }
300
+
301
+ .shortcut-badge {
302
+ font-family: var(--font-mono);
303
+ font-size: 10px;
304
+ padding: 2px 6px;
305
+ border-radius: 4px;
306
+ background: var(--bg-elevated);
307
+ border: 1px solid var(--border-subtle);
308
+ color: var(--text-muted);
309
+ }
310
+
311
+ /* ═══════════════════════════════════════
312
+ CELL
313
+ ═══════════════════════════════════════ */
314
+ .cell {
315
+ border: 1px solid var(--border-subtle);
316
+ border-radius: 14px;
317
+ overflow: hidden;
318
+ background: var(--bg-surface);
319
+ transition: border-color 0.2s, box-shadow 0.2s;
320
+ animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
321
+ }
322
+
323
+ @keyframes slideUp {
324
+ from { opacity: 0; transform: translateY(20px); }
325
+ to { opacity: 1; transform: translateY(0); }
326
+ }
327
+
328
+ .cell:focus-within {
329
+ border-color: var(--border-active);
330
+ box-shadow: 0 0 0 3px var(--accent-dim), 0 8px 32px rgba(0,0,0,0.1);
331
+ }
332
+
333
+ .cell-header {
334
+ display: flex;
335
+ align-items: center;
336
+ gap: 10px;
337
+ padding: 8px 14px;
338
+ border-bottom: 1px solid var(--border-subtle);
339
+ background: var(--bg-elevated);
340
+ user-select: none;
341
+ }
342
+
343
+ .cell-num {
344
+ font-family: var(--font-mono);
345
+ font-size: 11px;
346
+ font-weight: 600;
347
+ color: var(--cell-num);
348
+ min-width: 36px;
349
+ }
350
+
351
+ .cell-type {
352
+ font-size: 10px;
353
+ text-transform: uppercase;
354
+ letter-spacing: 0.08em;
355
+ color: var(--text-muted);
356
+ font-weight: 500;
357
+ }
358
+
359
+ .cell-actions {
360
+ margin-left: auto;
361
+ display: flex;
362
+ gap: 4px;
363
+ opacity: 0;
364
+ transition: opacity 0.2s;
365
+ }
366
+
367
+ .cell:hover .cell-actions { opacity: 1; }
368
+
369
+ .cell-action-btn {
370
+ width: 24px;
371
+ height: 24px;
372
+ border-radius: 6px;
373
+ border: none;
374
+ background: transparent;
375
+ color: var(--text-muted);
376
+ cursor: pointer;
377
+ display: flex;
378
+ align-items: center;
379
+ justify-content: center;
380
+ transition: all 0.2s;
381
+ }
382
+
383
+ .cell-action-btn:hover {
384
+ background: var(--bg-hover);
385
+ color: var(--text-primary);
386
+ }
387
+
388
+ .cell-action-btn svg { width: 13px; height: 13px; }
389
+
390
+ /* ── Code Input ── */
391
+ .cell-input {
392
+ display: flex;
393
+ align-items: stretch;
394
+ }
395
+
396
+ .line-nums {
397
+ width: 44px;
398
+ flex-shrink: 0;
399
+ padding: 14px 0;
400
+ text-align: right;
401
+ font-family: var(--font-mono);
402
+ font-size: 12px;
403
+ line-height: 1.65;
404
+ color: var(--text-muted);
405
+ user-select: none;
406
+ border-right: 1px solid var(--border-subtle);
407
+ background: var(--bg-elevated);
408
+ }
409
+
410
+ .line-num { padding-right: 10px; }
411
+
412
+ .code-editor {
413
+ flex: 1;
414
+ padding: 14px 16px;
415
+ font-family: var(--font-mono);
416
+ font-size: 13.5px;
417
+ line-height: 1.65;
418
+ color: var(--text-primary);
419
+ background: transparent;
420
+ border: none;
421
+ resize: none;
422
+ outline: none;
423
+ min-height: 72px;
424
+ tab-size: 4;
425
+ white-space: pre;
426
+ overflow: auto;
427
+ }
428
+
429
+ /* ── Output Area ── */
430
+ .cell-output {
431
+ border-top: 1px solid var(--border-subtle);
432
+ background: var(--bg-base);
433
+ padding: 14px 16px;
434
+ font-family: var(--font-mono);
435
+ font-size: 13px;
436
+ line-height: 1.6;
437
+ color: var(--text-primary);
438
+ white-space: pre-wrap;
439
+ word-break: break-word;
440
+ }
441
+
442
+ .cell-output:empty { display: none; }
443
+
444
+ .output-empty {
445
+ color: var(--text-muted);
446
+ font-style: italic;
447
+ font-family: var(--font-sans);
448
+ font-size: 12px;
449
+ }
450
+
451
+ .output-error {
452
+ color: var(--text-danger);
453
+ background: rgba(248, 113, 113, 0.05);
454
+ border-left: 2px solid var(--text-danger);
455
+ padding: 10px 14px;
456
+ margin: 4px -16px;
457
+ border-radius: 0 6px 6px 0;
458
+ }
459
+
460
+ .output-success {
461
+ color: var(--text-success);
462
+ }
463
+
464
+ /* ── Add Cell Bar ── */
465
+ .add-cell-bar {
466
+ display: flex;
467
+ align-items: center;
468
+ justify-content: center;
469
+ gap: 12px;
470
+ padding: 4px 0;
471
+ opacity: 0;
472
+ transition: opacity 0.2s;
473
+ }
474
+
475
+ .add-cell-btn {
476
+ font-size: 12px;
477
+ color: var(--text-muted);
478
+ background: none;
479
+ border: 1px dashed var(--border-default);
480
+ border-radius: 6px;
481
+ padding: 4px 14px;
482
+ cursor: pointer;
483
+ font-family: var(--font-sans);
484
+ transition: all 0.2s;
485
+ }
486
+
487
+ .add-cell-btn:hover {
488
+ color: var(--text-accent);
489
+ border-color: var(--text-accent);
490
+ background: var(--accent-dim);
491
+ }
492
+
493
+ /* ═══════════════════════════════════════
494
+ SIDEBAR
495
+ ═══════════════════════════════════════ */
496
+ .sidebar {
497
+ border-left: 1px solid var(--border-subtle);
498
+ background: var(--bg-surface);
499
+ display: flex;
500
+ flex-direction: column;
501
+ overflow: hidden;
502
+ }
503
+
504
+ .sidebar-header {
505
+ padding: 16px 18px;
506
+ border-bottom: 1px solid var(--border-subtle);
507
+ display: flex;
508
+ align-items: center;
509
+ justify-content: space-between;
510
+ }
511
+
512
+ .sidebar-title {
513
+ font-weight: 600;
514
+ font-size: 13px;
515
+ color: var(--text-primary);
516
+ text-transform: uppercase;
517
+ letter-spacing: 0.06em;
518
+ }
519
+
520
+ .sidebar-badge {
521
+ font-size: 10px;
522
+ padding: 2px 8px;
523
+ border-radius: 10px;
524
+ background: var(--bg-elevated);
525
+ color: var(--text-muted);
526
+ font-family: var(--font-mono);
527
+ }
528
+
529
+ .sidebar-body {
530
+ flex: 1;
531
+ overflow-y: auto;
532
+ padding: 10px 0;
533
+ }
534
+
535
+ /* ── History Entry ── */
536
+ .hist-entry {
537
+ padding: 10px 18px;
538
+ cursor: pointer;
539
+ border-left: 2px solid transparent;
540
+ transition: all 0.15s;
541
+ position: relative;
542
+ }
543
+
544
+ .hist-entry:hover {
545
+ background: var(--bg-elevated);
546
+ border-left-color: var(--accent);
547
+ }
548
+
549
+ .hist-time {
550
+ font-size: 10px;
551
+ color: var(--text-muted);
552
+ font-family: var(--font-mono);
553
+ margin-bottom: 4px;
554
+ }
555
+
556
+ .hist-code {
557
+ font-family: var(--font-mono);
558
+ font-size: 11.5px;
559
+ color: var(--text-secondary);
560
+ white-space: nowrap;
561
+ overflow: hidden;
562
+ text-overflow: ellipsis;
563
+ line-height: 1.5;
564
+ }
565
+
566
+ .hist-status {
567
+ position: absolute;
568
+ right: 14px;
569
+ top: 50%;
570
+ transform: translateY(-50%);
571
+ width: 6px;
572
+ height: 6px;
573
+ border-radius: 50%;
574
+ }
575
+
576
+ .hist-status.ok { background: var(--text-success); }
577
+ .hist-status.err { background: var(--text-danger); }
578
+
579
+ /* ── Snippets ── */
580
+ .snippets {
581
+ padding: 0 14px;
582
+ }
583
+
584
+ .snippet-card {
585
+ border: 1px solid var(--border-subtle);
586
+ border-radius: 10px;
587
+ padding: 12px 14px;
588
+ margin-bottom: 8px;
589
+ cursor: pointer;
590
+ transition: all 0.2s;
591
+ background: var(--bg-elevated);
592
+ }
593
+
594
+ .snippet-card:hover {
595
+ border-color: var(--accent);
596
+ background: var(--accent-dim);
597
+ transform: translateX(3px);
598
+ }
599
+
600
+ .snippet-title {
601
+ font-weight: 600;
602
+ font-size: 12px;
603
+ color: var(--text-primary);
604
+ margin-bottom: 4px;
605
+ display: flex;
606
+ align-items: center;
607
+ gap: 6px;
608
+ }
609
+
610
+ .snippet-desc {
611
+ font-size: 11px;
612
+ color: var(--text-muted);
613
+ line-height: 1.4;
614
+ }
615
+
616
+ /* ═══════════════════════════════════════
617
+ BOTTOM BAR
618
+ ═══════════════════════════════════════ */
619
+ .bottom-bar {
620
+ height: 36px;
621
+ background: var(--bg-elevated);
622
+ border-top: 1px solid var(--border-subtle);
623
+ display: flex;
624
+ align-items: center;
625
+ justify-content: space-between;
626
+ padding: 0 18px;
627
+ font-size: 11px;
628
+ color: var(--text-muted);
629
+ }
630
+
631
+ .bottom-left, .bottom-right {
632
+ display: flex;
633
+ align-items: center;
634
+ gap: 14px;
635
+ }
636
+
637
+ .bottom-item {
638
+ display: flex;
639
+ align-items: center;
640
+ gap: 5px;
641
+ }
642
+
643
+ .bottom-item svg { width: 12px; height: 12px; opacity: 0.6; }
644
+
645
+ .version-pill {
646
+ font-family: var(--font-mono);
647
+ background: var(--bg-surface);
648
+ border: 1px solid var(--border-subtle);
649
+ border-radius: 4px;
650
+ padding: 1px 7px;
651
+ font-size: 10px;
652
+ }
653
+
654
+ /* ═══════════════════════════════════════
655
+ ANIMATIONS & EFFECTS
656
+ ═══════════════════════════════════════ */
657
+ .fade-in { animation: fadeIn 0.3s ease; }
658
+
659
+ @keyframes fadeIn {
660
+ from { opacity: 0; }
661
+ to { opacity: 1; }
662
+ }
663
+
664
+ .run-spin {
665
+ animation: spin 0.7s linear infinite;
666
+ }
667
+
668
+ @keyframes spin {
669
+ to { transform: rotate(360deg); }
670
+ }
671
+
672
+ .typing-cursor::after {
673
+ content: '|';
674
+ animation: blink 1s step-end infinite;
675
+ color: var(--accent);
676
+ margin-left: 1px;
677
+ }
678
+
679
+ @keyframes blink {
680
+ 50% { opacity: 0; }
681
+ }
682
+
683
+ /* ═══════════════════════════════════════
684
+ RESPONSIVE
685
+ ═══════════════════════════════════════ */
686
+ @media (max-width: 900px) {
687
+ .main-wrap { grid-template-columns: 1fr; }
688
+ .sidebar { display: none; }
689
+ .sidebar.open { display: flex; position: fixed; right: 0; top: var(--header-h); bottom: 0; width: var(--sidebar-w); z-index: 90; }
690
+ .menu-toggle { display: flex !important; }
691
+ }
692
+
693
+ @media (max-width: 600px) {
694
+ .topbar { padding: 0 12px; }
695
+ .topbar-right .btn span { display: none; }
696
+ .logo-text span { display: none; }
697
+ .console-area { padding: 12px; }
698
+ .toolbar-left { gap: 4px; }
699
+ .toolbar-left .btn { padding: 6px 10px; font-size: 11px; }
700
+ }
701
+
702
+ .menu-toggle {
703
+ display: none;
704
+ }
705
+
706
+ /* ── Mobile sidebar overlay ── */
707
+ .sidebar-overlay {
708
+ display: none;
709
+ position: fixed;
710
+ inset: 0;
711
+ background: rgba(0,0,0,0.4);
712
+ z-index: 80;
713
+ backdrop-filter: blur(2px);
714
+ }
715
+ .sidebar-overlay.active { display: block; }
716
+
717
+ /* ═══════════════════════════════════════
718
+ WELCOME BANNER
719
+ ═══════════════════════════════════════ */
720
+ .welcome-banner {
721
+ background: linear-gradient(135deg, var(--accent-dim), transparent);
722
+ border: 1px solid var(--border-active);
723
+ border-radius: 12px;
724
+ padding: 20px 24px;
725
+ margin-bottom: 4px;
726
+ position: relative;
727
+ overflow: hidden;
728
+ }
729
+
730
+ .welcome-banner::before {
731
+ content: '';
732
+ position: absolute;
733
+ top: -50%;
734
+ right: -10%;
735
+ width: 200px;
736
+ height: 200px;
737
+ background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
738
+ opacity: 0.08;
739
+ pointer-events: none;
740
+ }
741
+
742
+ .welcome-title {
743
+ font-size: 18px;
744
+ font-weight: 700;
745
+ color: var(--text-primary);
746
+ margin-bottom: 6px;
747
+ position: relative;
748
+ }
749
+
750
+ .welcome-sub {
751
+ font-size: 13px;
752
+ color: var(--text-secondary);
753
+ line-height: 1.6;
754
+ position: relative;
755
+ }
756
+
757
+ .welcome-sub code {
758
+ font-family: var(--font-mono);
759
+ font-size: 11px;
760
+ padding: 1px 6px;
761
+ border-radius: 4px;
762
+ background: var(--bg-elevated);
763
+ color: var(--text-accent);
764
+ }
765
+
766
+ /* ═══════════════════════════════════════
767
+ DROPDOWN
768
+ ═══════════════════════════════════════ */
769
+ .dropdown-wrap { position: relative; }
770
+
771
+ .dropdown-menu {
772
+ position: absolute;
773
+ top: calc(100% + 6px);
774
+ right: 0;
775
+ background: var(--bg-surface);
776
+ border: 1px solid var(--border-subtle);
777
+ border-radius: 10px;
778
+ box-shadow: 0 10px 40px rgba(0,0,0,0.2);
779
+ min-width: 180px;
780
+ opacity: 0;
781
+ visibility: hidden;
782
+ transform: translateY(-4px);
783
+ transition: all 0.2s;
784
+ z-index: 200;
785
+ overflow: hidden;
786
+ }
787
+
788
+ .dropdown-wrap.open .dropdown-menu {
789
+ opacity: 1;
790
+ visibility: visible;
791
+ transform: translateY(0);
792
+ }
793
+
794
+ .dropdown-item {
795
+ display: flex;
796
+ align-items: center;
797
+ gap: 10px;
798
+ padding: 10px 14px;
799
+ font-size: 13px;
800
+ color: var(--text-secondary);
801
+ cursor: pointer;
802
+ transition: all 0.15s;
803
+ border: none;
804
+ background: none;
805
+ width: 100%;
806
+ text-align: left;
807
+ font-family: var(--font-sans);
808
+ }
809
+
810
+ .dropdown-item:hover {
811
+ background: var(--bg-hover);
812
+ color: var(--text-primary);
813
+ }
814
+
815
+ .dropdown-item svg { width: 14px; height: 14px; flex-shrink: 0; }
816
+
817
+ .dropdown-sep {
818
+ height: 1px;
819
+ background: var(--border-subtle);
820
+ margin: 4px 0;
821
+ }
822
+
823
+ /* ═══════════════════════════════════════
824
+ MODAL / DIALOG
825
+ ═══════════════════════════════════════ */
826
+ .modal-overlay {
827
+ display: none;
828
+ position: fixed;
829
+ inset: 0;
830
+ background: rgba(0,0,0,0.45);
831
+ z-index: 300;
832
+ align-items: center;
833
+ justify-content: center;
834
+ backdrop-filter: blur(3px);
835
+ }
836
+
837
+ .modal-overlay.active { display: flex; }
838
+
839
+ .modal-box {
840
+ background: var(--bg-surface);
841
+ border: 1px solid var(--border-subtle);
842
+ border-radius: 16px;
843
+ width: 90%;
844
+ max-width: 480px;
845
+ max-height: 80dvh;
846
+ overflow: hidden;
847
+ box-shadow: 0 24px 64px rgba(0,0,0,0.25);
848
+ animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
849
+ }
850
+
851
+ @keyframes modalPop {
852
+ from { opacity: 0; transform: scale(0.92) translateY(10px); }
853
+ to { opacity: 1; transform: scale(1) translateY(0); }
854
+ }
855
+
856
+ .modal-head {
857
+ padding: 18px 22px;
858
+ border-bottom: 1px solid var(--border-subtle);
859
+ display: flex;
860
+ align-items: center;
861
+ justify-content: space-between;
862
+ }
863
+
864
+ .modal-title {
865
+ font-weight: 700;
866
+ font-size: 16px;
867
+ color: var(--text-primary);
868
+ }
869
+
870
+ .modal-close {
871
+ width: 28px;
872
+ height: 28px;
873
+ border-radius: 8px;
874
+ border: none;
875
+ background: var(--bg-elevated);
876
+ color: var(--text-muted);
877
+ cursor: pointer;
878
+ display: flex;
879
+ align-items: center;
880
+ justify-content: center;
881
+ transition: all 0.2s;
882
+ }
883
+
884
+ .modal-close:hover {
885
+ background: var(--bg-hover);
886
+ color: var(--text-primary);
887
+ }
888
+
889
+ .modal-body {
890
+ padding: 18px 22px;
891
+ max-height: 60dvh;
892
+ overflow-y: auto;
893
+ }
894
+
895
+ .modal-foot {
896
+ padding: 14px 22px;
897
+ border-top: 1px solid var(--border-subtle);
898
+ display: flex;
899
+ justify-content: flex-end;
900
+ gap: 8px;
901
+ }
902
+
903
+ /* Settings row */
904
+ .setting-row {
905
+ display: flex;
906
+ align-items: center;
907
+ justify-content: space-between;
908
+ padding: 10px 0;
909
+ border-bottom: 1px solid var(--border-subtle);
910
+ }
911
+
912
+ .setting-row:last-child { border-bottom: none; }
913
+
914
+ .setting-label {
915
+ font-size: 13px;
916
+ color: var(--text-primary);
917
+ font-weight: 500;
918
+ }
919
+
920
+ .setting-desc {
921
+ font-size: 11px;
922
+ color: var(--text-muted);
923
+ margin-top: 2px;
924
+ }
925
+
926
+ /* Toggle */
927
+ .toggle {
928
+ width: 40px;
929
+ height: 22px;
930
+ border-radius: 11px;
931
+ background: var(--border-default);
932
+ position: relative;
933
+ cursor: pointer;
934
+ transition: background 0.2s;
935
+ flex-shrink: 0;
936
+ }
937
+
938
+ .toggle.on { background: var(--accent); }
939
+
940
+ .toggle-knob {
941
+ width: 18px;
942
+ height: 18px;
943
+ border-radius: 50%;
944
+ background: #fff;
945
+ position: absolute;
946
+ top: 2px;
947
+ left: 2px;
948
+ transition: transform 0.2s;
949
+ box-shadow: 0 1px 3px rgba(0,0,0,0.2);
950
+ }
951
+
952
+ .toggle.on .toggle-knob { transform: translateX(18px); }
953
+
954
+ /* Select */
955
+ .sel {
956
+ padding: 6px 10px;
957
+ border-radius: 8px;
958
+ border: 1px solid var(--border-default);
959
+ background: var(--bg-elevated);
960
+ color: var(--text-primary);
961
+ font-family: var(--font-sans);
962
+ font-size: 13px;
963
+ cursor: pointer;
964
+ outline: none;
965
+ }
966
+
967
+ .sel:focus { border-color: var(--accent); }
968
+
969
+ /* ═══════════════════════════════════════
970
+ TOAST
971
+ ═══════════════════════════════════════ */
972
+ .toast-wrap {
973
+ position: fixed;
974
+ bottom: 44px;
975
+ left: 50%;
976
+ transform: translateX(-50%);
977
+ z-index: 400;
978
+ display: flex;
979
+ flex-direction: column;
980
+ gap: 8px;
981
+ pointer-events: none;
982
+ }
983
+
984
+ .toast {
985
+ background: var(--bg-surface);
986
+ border: 1px solid var(--border-subtle);
987
+ border-radius: 10px;
988
+ padding: 10px 18px;
989
+ font-size: 13px;
990
+ color: var(--text-primary);
991
+ display: flex;
992
+ align-items: center;
993
+ gap: 10px;
994
+ box-shadow: 0 8px 24px rgba(0,0,0,0.2);
995
+ animation: toastSlide 0.3s ease;
996
+ pointer-events: auto;
997
+ }
998
+
999
+ @keyframes toastSlide {
1000
+ from { opacity: 0; transform: translateY(10px); }
1001
+ to { opacity: 1; transform: translateY(0); }
1002
+ }
1003
+
1004
+ .toast-out { animation: toastOut 0.3s ease forwards; }
1005
+
1006
+ @keyframes toastOut {
1007
+ to { opacity: 0; transform: translateY(10px); }
1008
+ }
1009
+
1010
+ .toast-icon { width: 16px; height: 16px; flex-shrink: 0; }
1011
+
1012
+ .toast-success .toast-icon { color: var(--text-success); }
1013
+ .toast-error .toast-icon { color: var(--text-danger); }
1014
+ </style>
1015
+ </head>
1016
+ <body onload="brython({debug:1, indexedDB: false})">
1017
+
1018
+ <!-- ═══════════════════════════════════════
1019
+ TOP BAR
1020
+ ═══════════════════════════════════════ -->
1021
+ <header class="topbar">
1022
+ <div class="topbar-left">
1023
+ <div class="logo-group">
1024
+ <div class="logo-icon">&gt;_</div>
1025
+ <div class="logo-text">IPY<span>Console</span></div>
1026
+ </div>
1027
+ <div class="sep"></div>
1028
+ <span class="built-with">
1029
+ Built with <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" rel="noopener">anycoder</a>
1030
+ </span>
1031
+ </div>
1032
+ <div class="topbar-right">
1033
+ <button class="btn menu-toggle" id="menuToggle" onclick="toggleSidebar()" title="Toggle sidebar">
1034
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="18" x2="21" y2="18"/></svg>
1035
+ </button>
1036
+ <div class="dropdown-wrap" id="settingsDropdown">
1037
+ <button class="btn" onclick="toggleDropdown('settingsDropdown')" title="Settings">
1038
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>
1039
+ <span>Settings</span>
1040
+ </button>
1041
+ <div class="dropdown-menu">
1042
+ <button class="dropdown-item" onclick="toggleTheme(); closeDropdown('settingsDropdown')">
1043
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>
1044
+ Toggle Theme
1045
+ </button>
1046
+ <button class="dropdown-item" onclick="clearHistory(); closeDropdown('settingsDropdown')">
1047
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>
1048
+ Clear History
1049
+ </button>
1050
+ <div class="dropdown-sep"></div>
1051
+ <button class="dropdown-item" onclick="showAbout(); closeDropdown('settingsDropdown')">
1052
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>
1053
+ About IPY
1054
+ </button>
1055
+ </div>
1056
+ </div>
1057
+ </div>
1058
+ </header>
1059
+
1060
+ <!-- ═══════════════════════════════════════
1061
+ MAIN LAYOUT
1062
+ ═══════════════════════════════════════ -->
1063
+ <div class="main-wrap">
1064
+ <div class="console-area" id="consoleArea">
1065
+
1066
+ <!-- Toolbar -->
1067
+ <div class="toolbar">
1068
+ <div class="toolbar-left">
1069
+ <button class="btn btn-primary" onclick="runAllCells()" id="runAllBtn">
1070
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3"/></svg>
1071
+ <span>Run All</span>
1072
+ </button>
1073
+ <button class="btn" onclick="clearAllOutputs()">
1074
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>
1075
+ <span>Clear Output</span>
1076
+ </button>
1077
+ <button class="btn" onclick="addCellAtEnd()">
1078
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
1079
+ <span>Add Cell</span>
1080
+ </button>
1081
+ <div class="sep" style="height: 20px;"></div>
1082
+ <span class="shortcut-badge">Ctrl+Enter</span>
1083
+ <span class="shortcut-badge">Shift+Enter</