Update app.css
Browse files
app.css
CHANGED
@@ -34,10 +34,38 @@ body {
|
|
34 |
line-height: 1.5;
|
35 |
}
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
/* ์ฐ์ธก ํจ๋ ํฌ๊ธฐ ์กฐ์ */
|
38 |
.right_panel {
|
39 |
position: relative;
|
40 |
-
height: 600px;
|
41 |
min-height: 400px;
|
42 |
max-height: 800px;
|
43 |
resize: vertical;
|
@@ -47,29 +75,29 @@ body {
|
|
47 |
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
48 |
}
|
49 |
|
50 |
-
/*
|
51 |
-
.right_panel::after {
|
52 |
-
content: '';
|
53 |
-
position: absolute;
|
54 |
-
bottom: 0;
|
55 |
-
left: 0;
|
56 |
-
right: 0;
|
57 |
-
height: 6px;
|
58 |
-
background: var(--neutral-200);
|
59 |
-
cursor: ns-resize;
|
60 |
-
}
|
61 |
-
|
62 |
-
/* ๋ ๋๋ง ์์ญ */
|
63 |
.html_content {
|
64 |
height: calc(100% - 30px);
|
65 |
width: 100%;
|
66 |
background: var(--surface);
|
|
|
67 |
}
|
68 |
|
69 |
.html_content iframe {
|
70 |
width: 100%;
|
71 |
height: 100%;
|
72 |
border: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
}
|
74 |
|
75 |
/* ๋ ๋๋ง ํค๋ */
|
@@ -81,6 +109,9 @@ body {
|
|
81 |
align-items: center;
|
82 |
padding: 0 12px;
|
83 |
gap: 6px;
|
|
|
|
|
|
|
84 |
}
|
85 |
|
86 |
.header_btn {
|
@@ -89,16 +120,143 @@ body {
|
|
89 |
border-radius: 50%;
|
90 |
}
|
91 |
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
right: 0;
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
}
|
103 |
|
104 |
/* ๋ฐ์ํ ์กฐ์ */
|
@@ -107,36 +265,153 @@ body {
|
|
107 |
height: 400px;
|
108 |
margin: 10px;
|
109 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
}
|
111 |
|
112 |
-
/*
|
113 |
-
.
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
border: 1px solid var(--neutral-200);
|
124 |
-
text-align: center;
|
125 |
-
margin-bottom: 2rem;
|
126 |
}
|
127 |
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
</style>
|
131 |
|
132 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
document.addEventListener('DOMContentLoaded', function() {
|
134 |
const panel = document.querySelector('.right_panel');
|
135 |
let isResizing = false;
|
136 |
let startY;
|
137 |
let startHeight;
|
138 |
|
139 |
-
// ๋ฆฌ์ฌ์ด์ฆ ์ด๋ฒคํธ
|
140 |
panel.addEventListener('mousedown', function(e) {
|
141 |
if (e.offsetY > panel.offsetHeight - 6) {
|
142 |
isResizing = true;
|
@@ -170,4 +445,9 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
170 |
}
|
171 |
});
|
172 |
});
|
|
|
|
|
|
|
|
|
|
|
173 |
</script>
|
|
|
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 |
/* ์ฐ์ธก ํจ๋ ํฌ๊ธฐ ์กฐ์ */
|
66 |
.right_panel {
|
67 |
position: relative;
|
68 |
+
height: 600px;
|
69 |
min-height: 400px;
|
70 |
max-height: 800px;
|
71 |
resize: vertical;
|
|
|
75 |
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
76 |
}
|
77 |
|
78 |
+
/* iframe์ด ์ฐ์ธก ํจ๋์ ๊ฝ ์ฑ์ฐ๋๋ก ์์ */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
.html_content {
|
80 |
height: calc(100% - 30px);
|
81 |
width: 100%;
|
82 |
background: var(--surface);
|
83 |
+
overflow: hidden;
|
84 |
}
|
85 |
|
86 |
.html_content iframe {
|
87 |
width: 100%;
|
88 |
height: 100%;
|
89 |
border: none;
|
90 |
+
display: block;
|
91 |
+
}
|
92 |
+
|
93 |
+
/* ๋ ๋๋ง๋ ์ฝํ
์ธ ๊ฐ iframe ๋ด์์ ์ ์ฒด ์์ญ์ ์ฌ์ฉํ๋๋ก */
|
94 |
+
.html_content iframe html,
|
95 |
+
.html_content iframe body {
|
96 |
+
margin: 0;
|
97 |
+
padding: 0;
|
98 |
+
height: 100%;
|
99 |
+
width: 100%;
|
100 |
+
overflow: auto;
|
101 |
}
|
102 |
|
103 |
/* ๋ ๋๋ง ํค๋ */
|
|
|
109 |
align-items: center;
|
110 |
padding: 0 12px;
|
111 |
gap: 6px;
|
112 |
+
position: sticky;
|
113 |
+
top: 0;
|
114 |
+
z-index: 10;
|
115 |
}
|
116 |
|
117 |
.header_btn {
|
|
|
120 |
border-radius: 50%;
|
121 |
}
|
122 |
|
123 |
+
.render_header > .header_btn:nth-child(1) {
|
124 |
+
background-color: var(--error);
|
125 |
+
}
|
126 |
+
|
127 |
+
.render_header > .header_btn:nth-child(2) {
|
128 |
+
background-color: var(--warning);
|
129 |
+
}
|
130 |
+
|
131 |
+
.render_header > .header_btn:nth-child(3) {
|
132 |
+
background-color: var(--success);
|
133 |
+
}
|
134 |
+
|
135 |
+
/* ์คํ๋์ ๋น ์ํ ํ์๋ฅผ ์ค์์ ๋ฐฐ์น */
|
136 |
+
.right_content {
|
137 |
+
height: 100%;
|
138 |
+
display: flex;
|
139 |
+
justify-content: center;
|
140 |
+
align-items: center;
|
141 |
+
background: var(--surface);
|
142 |
+
}
|
143 |
+
|
144 |
+
/* ํญ ์ปจํ
์ธ ๊ฐ ์ ์ฒด ๋์ด๋ฅผ ์ฌ์ฉํ๋๋ก */
|
145 |
+
.ant-tabs-content {
|
146 |
+
height: 100%;
|
147 |
+
}
|
148 |
+
|
149 |
+
.ant-tabs-tabpane {
|
150 |
+
height: 100%;
|
151 |
+
}
|
152 |
+
|
153 |
+
/* ๋ก๋ฉ ์ํ์ ๋น ์ํ์ ์ปจํ
์ด๋ */
|
154 |
+
.ant-empty,
|
155 |
+
.ant-spin-container {
|
156 |
+
height: 100%;
|
157 |
+
display: flex;
|
158 |
+
justify-content: center;
|
159 |
+
align-items: center;
|
160 |
+
}
|
161 |
+
|
162 |
+
.history_chatbot button {
|
163 |
+
background: none;
|
164 |
+
border: none;
|
165 |
+
}
|
166 |
+
|
167 |
+
footer, .footer, div[class*="footer"], #footer {
|
168 |
+
display: none !important;
|
169 |
+
}
|
170 |
+
|
171 |
+
#component-0 textarea,
|
172 |
+
.gradio-container textarea,
|
173 |
+
.ant-input-textarea-large textarea {
|
174 |
+
height: 300px !important;
|
175 |
+
min-height: 300px !important;
|
176 |
+
resize: vertical !important;
|
177 |
+
border: 2px solid var(--neutral-200);
|
178 |
+
border-radius: 12px;
|
179 |
+
transition: all 0.3s;
|
180 |
+
background: var(--surface);
|
181 |
+
color: var(--text-primary);
|
182 |
+
padding: 1rem;
|
183 |
+
}
|
184 |
+
|
185 |
+
#component-0 textarea:focus,
|
186 |
+
.gradio-container textarea:focus,
|
187 |
+
.ant-input-textarea-large textarea:focus {
|
188 |
+
border-color: var(--accent);
|
189 |
+
box-shadow: 0 0 0 3px rgba(102, 163, 255, 0.2);
|
190 |
+
}
|
191 |
+
|
192 |
+
.setting-buttons {
|
193 |
+
position: sticky;
|
194 |
+
top: 1rem;
|
195 |
right: 0;
|
196 |
+
z-index: 1000;
|
197 |
+
display: flex;
|
198 |
+
gap: 8px;
|
199 |
+
padding: 12px;
|
200 |
+
background: rgba(255, 255, 255, 0.9);
|
201 |
+
backdrop-filter: blur(8px);
|
202 |
+
border-radius: 12px;
|
203 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
204 |
+
border: 1px solid var(--neutral-200);
|
205 |
+
}
|
206 |
+
|
207 |
+
.ant-btn {
|
208 |
+
flex: 1;
|
209 |
+
min-width: 80px;
|
210 |
+
border-radius: 8px;
|
211 |
+
font-weight: 500;
|
212 |
+
transition: all 0.3s;
|
213 |
+
height: 40px;
|
214 |
+
display: flex;
|
215 |
+
align-items: center;
|
216 |
+
justify-content: center;
|
217 |
+
}
|
218 |
+
|
219 |
+
.ant-btn-primary {
|
220 |
+
background: linear-gradient(to right, var(--primary), var(--secondary));
|
221 |
+
border: none;
|
222 |
+
color: white;
|
223 |
+
}
|
224 |
+
|
225 |
+
.ant-btn-primary:hover {
|
226 |
+
transform: translateY(-2px);
|
227 |
+
box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
|
228 |
+
}
|
229 |
+
|
230 |
+
.ant-btn-default {
|
231 |
+
background: var(--surface);
|
232 |
+
border: 1px solid var(--primary);
|
233 |
+
color: var(--primary);
|
234 |
+
}
|
235 |
+
|
236 |
+
.ant-btn-default:hover {
|
237 |
+
color: var(--secondary);
|
238 |
+
border-color: var(--secondary);
|
239 |
+
transform: translateY(-2px);
|
240 |
+
box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
|
241 |
+
}
|
242 |
+
|
243 |
+
/* ์คํฌ๋กค๋ฐ ์คํ์ผ๋ง */
|
244 |
+
::-webkit-scrollbar {
|
245 |
+
width: 8px;
|
246 |
+
height: 8px;
|
247 |
+
}
|
248 |
+
|
249 |
+
::-webkit-scrollbar-track {
|
250 |
+
background: var(--neutral-100);
|
251 |
+
}
|
252 |
+
|
253 |
+
::-webkit-scrollbar-thumb {
|
254 |
+
background: var(--neutral-300);
|
255 |
+
border-radius: 4px;
|
256 |
+
}
|
257 |
+
|
258 |
+
::-webkit-scrollbar-thumb:hover {
|
259 |
+
background: var(--neutral-400);
|
260 |
}
|
261 |
|
262 |
/* ๋ฐ์ํ ์กฐ์ */
|
|
|
265 |
height: 400px;
|
266 |
margin: 10px;
|
267 |
}
|
268 |
+
|
269 |
+
.setting-buttons {
|
270 |
+
flex-wrap: wrap;
|
271 |
+
}
|
272 |
+
|
273 |
+
.ant-btn {
|
274 |
+
min-width: 60px;
|
275 |
+
font-size: 0.9rem;
|
276 |
+
}
|
277 |
}
|
278 |
|
279 |
+
/* ๋ฆฌ์ฌ์ด์ฆ ํธ๋ค */
|
280 |
+
.right_panel::after {
|
281 |
+
content: '';
|
282 |
+
position: absolute;
|
283 |
+
bottom: 0;
|
284 |
+
left: 0;
|
285 |
+
right: 0;
|
286 |
+
height: 6px;
|
287 |
+
background: var(--neutral-200);
|
288 |
+
cursor: ns-resize;
|
289 |
+
}
|
290 |
+
|
291 |
+
/* Drawer customization */
|
292 |
+
.ant-drawer-content-wrapper {
|
293 |
+
border-radius: 16px 0 0 16px;
|
294 |
+
}
|
295 |
+
|
296 |
+
.ant-drawer-header {
|
297 |
+
background: var(--primary);
|
298 |
+
color: white;
|
299 |
+
border-radius: 16px 0 0 0;
|
300 |
+
}
|
301 |
+
|
302 |
+
.ant-drawer-title {
|
303 |
+
color: white;
|
304 |
+
font-weight: 500;
|
305 |
+
}
|
306 |
+
|
307 |
+
.ant-drawer-close {
|
308 |
+
color: white;
|
309 |
+
}
|
310 |
+
|
311 |
+
.ant-drawer-body {
|
312 |
+
background: var(--surface);
|
313 |
+
}
|
314 |
+
|
315 |
+
/* ํ
ํ๋ฆฟ ๊ด๋ จ ์คํ์ผ */
|
316 |
+
.session-drawer .chatbot {
|
317 |
+
height: calc(100vh - 200px);
|
318 |
+
overflow-y: auto;
|
319 |
+
}
|
320 |
+
|
321 |
+
.session-history {
|
322 |
+
height: 700px;
|
323 |
+
overflow-y: auto;
|
324 |
+
padding: 1rem;
|
325 |
+
}
|
326 |
+
|
327 |
+
.prompt-grid {
|
328 |
+
display: grid;
|
329 |
+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
330 |
+
gap: 1.5rem;
|
331 |
+
padding: 1.5rem;
|
332 |
+
}
|
333 |
+
|
334 |
+
.prompt-card {
|
335 |
+
background: var(--surface);
|
336 |
+
border-radius: 16px;
|
337 |
+
padding: 1.25rem;
|
338 |
+
cursor: pointer;
|
339 |
+
transition: all 0.3s;
|
340 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
341 |
border: 1px solid var(--neutral-200);
|
|
|
|
|
342 |
}
|
343 |
|
344 |
+
.prompt-card:hover {
|
345 |
+
transform: translateY(-4px);
|
346 |
+
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
|
347 |
+
}
|
348 |
+
|
349 |
+
.card-image {
|
350 |
+
width: 100%;
|
351 |
+
height: 200px;
|
352 |
+
object-fit: cover;
|
353 |
+
border-radius: 12px;
|
354 |
+
margin-bottom: 1rem;
|
355 |
+
}
|
356 |
+
|
357 |
+
.card-name {
|
358 |
+
font-weight: 600;
|
359 |
+
margin-bottom: 0.8rem;
|
360 |
+
font-size: 1.1rem;
|
361 |
+
color: var(--text-primary);
|
362 |
+
}
|
363 |
|
364 |
+
.card-prompt {
|
365 |
+
font-size: 0.9rem;
|
366 |
+
color: var(--text-secondary);
|
367 |
+
background: var(--neutral-100);
|
368 |
+
padding: 0.8rem;
|
369 |
+
border-radius: 8px;
|
370 |
+
line-height: 1.5;
|
371 |
+
}
|
372 |
</style>
|
373 |
|
374 |
<script>
|
375 |
+
// iframe ๋ด๋ถ ์ฝํ
์ธ ํฌ๊ธฐ ์กฐ์ ์ ์ํ ์คํฌ๋ฆฝํธ
|
376 |
+
function adjustIframeContent() {
|
377 |
+
const iframes = document.querySelectorAll('.html_content iframe');
|
378 |
+
iframes.forEach(iframe => {
|
379 |
+
try {
|
380 |
+
iframe.onload = function() {
|
381 |
+
const iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
|
382 |
+
const style = iframeDoc.createElement('style');
|
383 |
+
style.textContent = `
|
384 |
+
html, body {
|
385 |
+
margin: 0;
|
386 |
+
padding: 0;
|
387 |
+
height: 100%;
|
388 |
+
width: 100%;
|
389 |
+
overflow: auto;
|
390 |
+
}
|
391 |
+
body > * {
|
392 |
+
max-width: 100%;
|
393 |
+
}
|
394 |
+
`;
|
395 |
+
iframeDoc.head.appendChild(style);
|
396 |
+
|
397 |
+
const resizeObserver = new ResizeObserver(() => {
|
398 |
+
iframe.style.height = '100%';
|
399 |
+
});
|
400 |
+
resizeObserver.observe(iframe);
|
401 |
+
};
|
402 |
+
} catch (e) {
|
403 |
+
console.error('iframe ์กฐ์ ์ค ์ค๋ฅ:', e);
|
404 |
+
}
|
405 |
+
});
|
406 |
+
}
|
407 |
+
|
408 |
+
// ๋ฆฌ์ฌ์ด์ฆ ๊ธฐ๋ฅ
|
409 |
document.addEventListener('DOMContentLoaded', function() {
|
410 |
const panel = document.querySelector('.right_panel');
|
411 |
let isResizing = false;
|
412 |
let startY;
|
413 |
let startHeight;
|
414 |
|
|
|
415 |
panel.addEventListener('mousedown', function(e) {
|
416 |
if (e.offsetY > panel.offsetHeight - 6) {
|
417 |
isResizing = true;
|
|
|
445 |
}
|
446 |
});
|
447 |
});
|
448 |
+
|
449 |
+
// ํ์ด์ง ๋ก๋ ๋ฐ ๋์ ์ฝํ
์ธ ๋ณ๊ฒฝ ์ ์คํ
|
450 |
+
document.addEventListener('DOMContentLoaded', adjustIframeContent);
|
451 |
+
const observer = new MutationObserver(adjustIframeContent);
|
452 |
+
observer.observe(document.body, { childList: true, subtree: true });
|
453 |
</script>
|