yasserrmd commited on
Commit
e076004
·
verified ·
1 Parent(s): 32261d5

Update static/index.html

Browse files
Files changed (1) hide show
  1. static/index.html +13 -2
static/index.html CHANGED
@@ -11,6 +11,7 @@
11
  --bg-secondary: #12142B;
12
  --accent-primary: #7B68EE;
13
  --accent-secondary: #00D4FF;
 
14
  --text-primary: #E2E8F0;
15
  --text-secondary: #94A3B8;
16
  --border-light: rgba(255, 255, 255, 0.08);
@@ -251,6 +252,10 @@
251
  .message.ai {
252
  border-left: 4px solid var(--accent-primary);
253
  }
 
 
 
 
254
 
255
  ::-webkit-scrollbar {
256
  width: 8px;
@@ -401,12 +406,16 @@ document.addEventListener('DOMContentLoaded', () => {
401
  addMessage(htmlContent, 'ai', true);
402
  } else if (message.type === 'image') {
403
  const img = document.createElement('img');
 
 
404
  if (img){
405
  img.src = `data:image/png;base64,${message.image}`; // Set Base64 as the image source
406
  img.alt = 'Generated Image';
407
  img.style.width = '100%';
408
- messages.appendChild(img);}
409
- else{
 
 
410
  const htmlContent = "The generated image might be inappropraite"; // Convert markdown to HTML
411
  addMessage(htmlContent, 'ai', true);
412
  }
@@ -501,6 +510,8 @@ document.addEventListener('DOMContentLoaded', () => {
501
  messages.appendChild(messageDiv);
502
  messages.scrollTop = messages.scrollHeight;
503
  }
 
 
504
  });
505
 
506
 
 
11
  --bg-secondary: #12142B;
12
  --accent-primary: #7B68EE;
13
  --accent-secondary: #00D4FF;
14
+ --accent-tertiary: #FF69B4;
15
  --text-primary: #E2E8F0;
16
  --text-secondary: #94A3B8;
17
  --border-light: rgba(255, 255, 255, 0.08);
 
252
  .message.ai {
253
  border-left: 4px solid var(--accent-primary);
254
  }
255
+ .message.img {
256
+ border-left: 4px solid var(--accent-tertiary);
257
+ }
258
+
259
 
260
  ::-webkit-scrollbar {
261
  width: 8px;
 
406
  addMessage(htmlContent, 'ai', true);
407
  } else if (message.type === 'image') {
408
  const img = document.createElement('img');
409
+ const messageDiv = document.createElement('div');
410
+ messageDiv.className = `message img`;
411
  if (img){
412
  img.src = `data:image/png;base64,${message.image}`; // Set Base64 as the image source
413
  img.alt = 'Generated Image';
414
  img.style.width = '100%';
415
+
416
+ messageDiv.appendChild(img);
417
+ messages.appendChild(messageDiv);
418
+ } else{
419
  const htmlContent = "The generated image might be inappropraite"; // Convert markdown to HTML
420
  addMessage(htmlContent, 'ai', true);
421
  }
 
510
  messages.appendChild(messageDiv);
511
  messages.scrollTop = messages.scrollHeight;
512
  }
513
+
514
+
515
  });
516
 
517