openfree commited on
Commit
a86eee6
ยท
verified ยท
1 Parent(s): 68bded6

Update app.css

Browse files
Files changed (1) hide show
  1. app.css +21 -417
app.css CHANGED
@@ -1,4 +1,3 @@
1
- <style>
2
  /* Modern color scheme */
3
  :root {
4
  /* ์ฃผ์š” ๋ธŒ๋žœ๋“œ ์ปฌ๋Ÿฌ */
@@ -32,341 +31,8 @@ body {
32
  background: var(--background);
33
  color: var(--text-primary);
34
  line-height: 1.5;
35
- }
36
-
37
- .left_header {
38
- display: flex;
39
- flex-direction: column;
40
- justify-content: center;
41
- align-items: center;
42
- background: linear-gradient(135deg, var(--surface), var(--neutral-100));
43
- backdrop-filter: blur(10px);
44
- border-radius: 24px;
45
- padding: 2rem;
46
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
47
- border: 1px solid var(--neutral-200);
48
- text-align: center;
49
- margin-bottom: 2rem;
50
- }
51
-
52
- .left_header img {
53
- width: 180px;
54
- margin-bottom: 1rem;
55
- border-radius: 12px;
56
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
57
- }
58
-
59
- .left_header h1 {
60
- margin: 0.5rem 0;
61
- font-weight: 600;
62
- color: var(--text-primary);
63
- }
64
-
65
- .right_panel {
66
- position: relative;
67
- height: 100%; /* ์ „์ฒด ํ™”๋ฉด์„ ์ฐจ์ง€ํ•˜๋„๋ก ๋ณ€๊ฒฝ */
68
- display: flex;
69
- flex-direction: column;
70
- }
71
-
72
- .html_content {
73
- flex: 1; /* ๋ถ€๋ชจ ์•ˆ์—์„œ ๋‚จ์€ ๊ณต๊ฐ„์„ ๋ชจ๋‘ ์ฐจ์ง€ */
74
- display: flex;
75
- flex-direction: column;
76
- height: 100%; /* ๋†’์ด๋ฅผ 100%๋กœ */
77
- }
78
-
79
- .html_content iframe {
80
- flex: 1; /* ๋‚จ์€ ๊ณต๊ฐ„์„ ๋ชจ๋‘ ์‚ฌ์šฉ */
81
- width: 100%;
82
- height: 100%; /* ๋†’์ด ์„ค์ • */
83
- border: none;
84
- display: block;
85
- }
86
-
87
- /* iframe ๋‚ด๋ถ€ ์Šคํƒ€์ผ์„ ์œ„ํ•œ ์ถ”๊ฐ€ */
88
- .html_content iframe html,
89
- .html_content iframe body {
90
  margin: 0;
91
  padding: 0;
92
- height: 100%;
93
- width: 100%;
94
- overflow: auto;
95
- }
96
-
97
- .render_header {
98
- height: 30px;
99
- background: var(--neutral-100);
100
- border-radius: 8px 8px 0 0;
101
- display: flex;
102
- align-items: center;
103
- padding: 0 12px;
104
- gap: 6px;
105
- flex-shrink: 0;
106
- }
107
-
108
- .header_btn {
109
- width: 12px;
110
- height: 12px;
111
- border-radius: 50%;
112
- }
113
-
114
- .render_header > .header_btn:nth-child(1) {
115
- background-color: var(--error);
116
- }
117
-
118
- .render_header > .header_btn:nth-child(2) {
119
- background-color: var(--warning);
120
- }
121
-
122
- .render_header > .header_btn:nth-child(3) {
123
- background-color: var(--success);
124
- }
125
-
126
- .right_content {
127
- flex: 1;
128
- display: flex;
129
- justify-content: center;
130
- align-items: center;
131
- background: var(--surface);
132
- }
133
-
134
- .ant-tabs-content {
135
- height: 100%;
136
- display: flex;
137
- flex-direction: column;
138
- }
139
-
140
- .ant-tabs-tabpane {
141
- flex: 1;
142
- display: flex;
143
- flex-direction: column;
144
- }
145
-
146
- .ant-empty,
147
- .ant-spin-container {
148
- flex: 1;
149
- display: flex;
150
- justify-content: center;
151
- align-items: center;
152
- }
153
-
154
- .history_chatbot button {
155
- background: none;
156
- border: none;
157
- }
158
-
159
- footer, .footer, div[class*="footer"], #footer {
160
- display: none !important;
161
- }
162
-
163
- #component-0 textarea,
164
- .gradio-container textarea,
165
- .ant-input-textarea-large textarea {
166
- height: 300px !important;
167
- min-height: 300px !important;
168
- resize: vertical !important;
169
- border: 2px solid var(--neutral-200);
170
- border-radius: 12px;
171
- transition: all 0.3s;
172
- background: var(--surface);
173
- color: var(--text-primary);
174
- padding: 1rem;
175
- }
176
-
177
- #component-0 textarea:focus,
178
- .gradio-container textarea:focus,
179
- .ant-input-textarea-large textarea:focus {
180
- border-color: var(--accent);
181
- box-shadow: 0 0 0 3px rgba(102, 163, 255, 0.2);
182
- }
183
-
184
- .setting-buttons {
185
- position: sticky;
186
- top: 1rem;
187
- right: 0;
188
- z-index: 1000;
189
- display: flex;
190
- gap: 8px;
191
- padding: 12px;
192
- background: rgba(255, 255, 255, 0.9);
193
- backdrop-filter: blur(8px);
194
- border-radius: 12px;
195
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
196
- border: 1px solid var(--neutral-200);
197
- }
198
-
199
- .ant-btn {
200
- flex: 1;
201
- min-width: 80px;
202
- border-radius: 8px;
203
- font-weight: 500;
204
- transition: all 0.3s;
205
- height: 40px;
206
- display: flex;
207
- align-items: center;
208
- justify-content: center;
209
- }
210
-
211
- .ant-btn-primary {
212
- background: linear-gradient(to right, var(--primary), var(--secondary));
213
- border: none;
214
- color: white;
215
- }
216
-
217
- .ant-btn-primary:hover {
218
- transform: translateY(-2px);
219
- box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
220
- }
221
-
222
- .ant-btn-default {
223
- background: var(--surface);
224
- border: 1px solid var(--primary);
225
- color: var(--primary);
226
- }
227
-
228
- .ant-btn-default:hover {
229
- color: var(--secondary);
230
- border-color: var(--secondary);
231
- transform: translateY(-2px);
232
- box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
233
- }
234
-
235
- ::-webkit-scrollbar {
236
- width: 8px;
237
- height: 8px;
238
- }
239
-
240
- ::-webkit-scrollbar-track {
241
- background: var(--neutral-100);
242
- }
243
-
244
- ::-webkit-scrollbar-thumb {
245
- background: var(--neutral-300);
246
- border-radius: 4px;
247
- }
248
-
249
- ::-webkit-scrollbar-thumb:hover {
250
- background: var(--neutral-400);
251
- }
252
-
253
- @media (max-width: 768px) {
254
- .right_panel {
255
- height: 400px;
256
- margin: 10px;
257
- }
258
-
259
- .setting-buttons {
260
- flex-wrap: wrap;
261
- }
262
-
263
- .ant-btn {
264
- min-width: 60px;
265
- font-size: 0.9rem;
266
- }
267
- }
268
-
269
- .right_panel::after {
270
- content: '';
271
- position: absolute;
272
- bottom: 0;
273
- left: 0;
274
- right: 0;
275
- height: 6px;
276
- background: var(--neutral-200);
277
- cursor: ns-resize;
278
- }
279
-
280
- .ant-drawer-content-wrapper {
281
- border-radius: 16px 0 0 16px;
282
- }
283
-
284
- .ant-drawer-header {
285
- background: var(--primary);
286
- color: white;
287
- border-radius: 16px 0 0 0;
288
- }
289
-
290
- .ant-drawer-title {
291
- color: white;
292
- font-weight: 500;
293
- }
294
-
295
- .ant-drawer-close {
296
- color: white;
297
- }
298
-
299
- .ant-drawer-body {
300
- background: var(--surface);
301
- }
302
-
303
- .session-drawer .chatbot {
304
- height: calc(100vh - 200px);
305
- overflow-y: auto;
306
- }
307
-
308
- .session-history {
309
- height: 700px;
310
- overflow-y: auto;
311
- padding: 1rem;
312
- }
313
-
314
- .prompt-grid {
315
- display: grid;
316
- grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
317
- gap: 1.5rem;
318
- padding: 1.5rem;
319
- }
320
-
321
- .prompt-card {
322
- background: var(--surface);
323
- border-radius: 16px;
324
- padding: 1.25rem;
325
- cursor: pointer;
326
- transition: all 0.3s;
327
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
328
- border: 1px solid var(--neutral-200);
329
- }
330
-
331
- .prompt-card:hover {
332
- transform: translateY(-4px);
333
- box-shadow: 0
334
-
335
-
336
- <style>
337
- /* Modern color scheme */
338
- :root {
339
- /* ์ฃผ์š” ๋ธŒ๋žœ๋“œ ์ปฌ๋Ÿฌ */
340
- --primary: #0066cc; /* ๋ฉ”์ธ ๋ธŒ๋žœ๋“œ ์ปฌ๋Ÿฌ */
341
- --secondary: #3385ff; /* ๋ฐ์€ ์•ก์„ผํŠธ */
342
- --accent: #66a3ff; /* ๋ถ€๋“œ๋Ÿฌ์šด ํฌ์ธํŠธ ์ปฌ๋Ÿฌ */
343
-
344
- /* ๋ฐฐ๊ฒฝ ์ปฌ๋Ÿฌ */
345
- --background: #f7f9fc; /* ๋ฉ”์ธ ๋ฐฐ๊ฒฝ */
346
- --surface: #ffffff; /* ์นด๋“œ ๋ฐฐ๊ฒฝ */
347
-
348
- /* ํ…์ŠคํŠธ ์ปฌ๋Ÿฌ */
349
- --text-primary: #2c3e50; /* ์ฃผ์š” ํ…์ŠคํŠธ */
350
- --text-secondary: #546e7a; /* ๋ถ€๊ฐ€ ํ…์ŠคํŠธ */
351
- --text-tertiary: #78909c; /* ๋œ ์ค‘์š”ํ•œ ํ…์ŠคํŠธ */
352
-
353
- /* ๊ธฐ๋Šฅ์„ฑ ์ปฌ๋Ÿฌ */
354
- --success: #34c759; /* ์„ฑ๊ณต/ํ™•์ธ */
355
- --warning: #ff9500; /* ๊ฒฝ๊ณ /์ฃผ์˜ */
356
- --error: #ff3b30; /* ์˜ค๋ฅ˜/์‚ญ์ œ */
357
-
358
- /* ์ค‘๋ฆฝ ์ปฌ๋Ÿฌ */
359
- --neutral-100: #f8f9fa;
360
- --neutral-200: #e9ecef;
361
- --neutral-300: #dee2e6;
362
- --neutral-400: #ced4da;
363
- }
364
-
365
- body {
366
- font-family: 'Inter', system-ui, sans-serif;
367
- background: var(--background);
368
- color: var(--text-primary);
369
- line-height: 1.5;
370
  }
371
 
372
  .left_header {
@@ -375,6 +41,7 @@ body {
375
  justify-content: center;
376
  align-items: center;
377
  background: linear-gradient(135deg, var(--surface), var(--neutral-100));
 
378
  backdrop-filter: blur(10px);
379
  border-radius: 24px;
380
  padding: 2rem;
@@ -399,36 +66,26 @@ body {
399
 
400
  .right_panel {
401
  position: relative;
402
- height: 100%; /* ์ „์ฒด ํ™”๋ฉด์„ ์ฐจ์ง€ํ•˜๋„๋ก ๋ณ€๊ฒฝ */
403
  display: flex;
404
  flex-direction: column;
405
  }
406
 
407
  .html_content {
408
- flex: 1; /* ๋ถ€๋ชจ ์•ˆ์—์„œ ๋‚จ์€ ๊ณต๊ฐ„์„ ๋ชจ๋‘ ์ฐจ์ง€ */
409
  display: flex;
410
  flex-direction: column;
411
- height: 100%; /* ๋†’์ด๋ฅผ 100%๋กœ */
412
  }
413
 
414
  .html_content iframe {
415
- flex: 1; /* ๋‚จ์€ ๊ณต๊ฐ„์„ ๋ชจ๋‘ ์‚ฌ์šฉ */
416
  width: 100%;
417
- height: 100%; /* ๋†’์ด ์„ค์ • */
418
  border: none;
419
  display: block;
420
  }
421
 
422
- /* iframe ๋‚ด๋ถ€ ์Šคํƒ€์ผ์„ ์œ„ํ•œ ์ถ”๊ฐ€ */
423
- .html_content iframe html,
424
- .html_content iframe body {
425
- margin: 0;
426
- padding: 0;
427
- height: 100%;
428
- width: 100%;
429
- overflow: auto;
430
- }
431
-
432
  .render_header {
433
  height: 30px;
434
  background: var(--neutral-100);
@@ -489,6 +146,7 @@ body {
489
  .history_chatbot button {
490
  background: none;
491
  border: none;
 
492
  }
493
 
494
  footer, .footer, div[class*="footer"], #footer {
@@ -503,7 +161,7 @@ footer, .footer, div[class*="footer"], #footer {
503
  resize: vertical !important;
504
  border: 2px solid var(--neutral-200);
505
  border-radius: 12px;
506
- transition: all 0.3s;
507
  background: var(--surface);
508
  color: var(--text-primary);
509
  padding: 1rem;
@@ -514,6 +172,7 @@ footer, .footer, div[class*="footer"], #footer {
514
  .ant-input-textarea-large textarea:focus {
515
  border-color: var(--accent);
516
  box-shadow: 0 0 0 3px rgba(102, 163, 255, 0.2);
 
517
  }
518
 
519
  .setting-buttons {
@@ -525,6 +184,7 @@ footer, .footer, div[class*="footer"], #footer {
525
  gap: 8px;
526
  padding: 12px;
527
  background: rgba(255, 255, 255, 0.9);
 
528
  backdrop-filter: blur(8px);
529
  border-radius: 12px;
530
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
@@ -536,11 +196,12 @@ footer, .footer, div[class*="footer"], #footer {
536
  min-width: 80px;
537
  border-radius: 8px;
538
  font-weight: 500;
539
- transition: all 0.3s;
540
  height: 40px;
541
  display: flex;
542
  align-items: center;
543
  justify-content: center;
 
544
  }
545
 
546
  .ant-btn-primary {
@@ -658,7 +319,7 @@ footer, .footer, div[class*="footer"], #footer {
658
  border-radius: 16px;
659
  padding: 1.25rem;
660
  cursor: pointer;
661
- transition: all 0.3s;
662
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
663
  border: 1px solid var(--neutral-200);
664
  }
@@ -691,69 +352,12 @@ footer, .footer, div[class*="footer"], #footer {
691
  border-radius: 8px;
692
  line-height: 1.5;
693
  }
694
- </style>
695
-
696
- <script>
697
- // iframe ๋‚ด๋ถ€ ์ฝ˜ํ…์ธ  ํฌ๊ธฐ ์กฐ์ •์„ ์œ„ํ•œ ์Šคํฌ๋ฆฝํŠธ
698
- function adjustIframeContent() {
699
- const iframes = document.querySelectorAll('.html_content iframe');
700
- iframes.forEach(iframe => {
701
- iframe.onload = function() {
702
- const iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
703
-
704
- // ์Šคํƒ€์ผ ์š”์†Œ ์ƒ์„ฑ
705
- const style = iframeDoc.createElement('style');
706
- style.textContent = `
707
- html, body {
708
- margin: 0;
709
- padding: 0;
710
- height: 100%;
711
- width: 100%;
712
- overflow: auto;
713
- }
714
- body {
715
- display: flex;
716
- flex-direction: column;
717
- }
718
- body > * {
719
- width: 100%;
720
- }
721
- `;
722
-
723
- if (iframeDoc.head) {
724
- iframeDoc.head.appendChild(style);
725
- }
726
-
727
- // iframe ํฌ๊ธฐ ์„ค์ •
728
- iframe.style.height = '100%';
729
- };
730
- });
731
- }
732
-
733
- // ํŽ˜์ด์ง€ ๋กœ๋“œ ์‹œ ์‹คํ–‰
734
- document.addEventListener('DOMContentLoaded', function() {
735
- adjustIframeContent();
736
-
737
- // DOM ๋ณ€ํ™” ๊ฐ์ง€ํ•˜์—ฌ ์ƒˆ๋กœ์šด iframe์—๋„ ์ ์šฉ
738
- const observer = new MutationObserver(function(mutations) {
739
- mutations.forEach(function(mutation) {
740
- if (mutation.addedNodes.length) {
741
- adjustIframeContent();
742
- }
743
- });
744
- });
745
-
746
- observer.observe(document.body, {
747
- childList: true,
748
- subtree: true
749
- });
750
- });
751
-
752
- // send_to_sandbox ํ•จ์ˆ˜ ์ˆ˜์ •
753
- function send_to_sandbox(code) {
754
- const encoded_html = btoa(unescape(encodeURIComponent(code)));
755
- const data_uri = `data:text/html;base64,${encoded_html}`;
756
- return `<div class="render_content"><iframe src="${data_uri}" style="width:100%;height:100%;border:none;"></iframe></div>`;
757
- }
758
- </script>
759
 
 
 
1
  /* Modern color scheme */
2
  :root {
3
  /* ์ฃผ์š” ๋ธŒ๋žœ๋“œ ์ปฌ๋Ÿฌ */
 
31
  background: var(--background);
32
  color: var(--text-primary);
33
  line-height: 1.5;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  margin: 0;
35
  padding: 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  }
37
 
38
  .left_header {
 
41
  justify-content: center;
42
  align-items: center;
43
  background: linear-gradient(135deg, var(--surface), var(--neutral-100));
44
+ -webkit-backdrop-filter: blur(10px);
45
  backdrop-filter: blur(10px);
46
  border-radius: 24px;
47
  padding: 2rem;
 
66
 
67
  .right_panel {
68
  position: relative;
69
+ height: 100%;
70
  display: flex;
71
  flex-direction: column;
72
  }
73
 
74
  .html_content {
75
+ flex: 1;
76
  display: flex;
77
  flex-direction: column;
78
+ height: 100%;
79
  }
80
 
81
  .html_content iframe {
82
+ flex: 1;
83
  width: 100%;
84
+ height: 100%;
85
  border: none;
86
  display: block;
87
  }
88
 
 
 
 
 
 
 
 
 
 
 
89
  .render_header {
90
  height: 30px;
91
  background: var(--neutral-100);
 
146
  .history_chatbot button {
147
  background: none;
148
  border: none;
149
+ cursor: pointer;
150
  }
151
 
152
  footer, .footer, div[class*="footer"], #footer {
 
161
  resize: vertical !important;
162
  border: 2px solid var(--neutral-200);
163
  border-radius: 12px;
164
+ transition: all 0.3s ease;
165
  background: var(--surface);
166
  color: var(--text-primary);
167
  padding: 1rem;
 
172
  .ant-input-textarea-large textarea:focus {
173
  border-color: var(--accent);
174
  box-shadow: 0 0 0 3px rgba(102, 163, 255, 0.2);
175
+ outline: none;
176
  }
177
 
178
  .setting-buttons {
 
184
  gap: 8px;
185
  padding: 12px;
186
  background: rgba(255, 255, 255, 0.9);
187
+ -webkit-backdrop-filter: blur(8px);
188
  backdrop-filter: blur(8px);
189
  border-radius: 12px;
190
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
 
196
  min-width: 80px;
197
  border-radius: 8px;
198
  font-weight: 500;
199
+ transition: all 0.3s ease;
200
  height: 40px;
201
  display: flex;
202
  align-items: center;
203
  justify-content: center;
204
+ cursor: pointer;
205
  }
206
 
207
  .ant-btn-primary {
 
319
  border-radius: 16px;
320
  padding: 1.25rem;
321
  cursor: pointer;
322
+ transition: all 0.3s ease;
323
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
324
  border: 1px solid var(--neutral-200);
325
  }
 
352
  border-radius: 8px;
353
  line-height: 1.5;
354
  }
355
+
356
+ .error {
357
+ color: var(--error);
358
+ padding: 1rem;
359
+ text-align: center;
360
+ background: rgba(255, 59, 48, 0.1);
361
+ border-radius: 8px;
362
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363