mihailik commited on
Commit
1721caf
·
1 Parent(s): 8c89ee8

Layout adjustments.

Browse files
Files changed (1) hide show
  1. chat5.js +20 -20
chat5.js CHANGED
@@ -18,17 +18,31 @@ body {
18
  display: grid;
19
  grid-template: 1fr auto / 1fr;
20
  }
21
-
22
- .chat-log .milkdown {
23
- height: 100%;
 
24
  }
25
- .chat-input .milkdown {
26
  border-top: 1px solid #4c566a;
27
  }
28
  .prose-mirror {
29
- height: 100%;
30
- overflow-y: auto;
 
 
 
 
31
  }
 
 
 
 
 
 
 
 
 
32
  </style>
33
  `;
34
 
@@ -69,20 +83,6 @@ body {
69
  const chatInput = /** @type {HTMLElement|null} */ (document.querySelector('.chat-input'));
70
  if (chatLog) chatLog.textContent = 'Loading Milkdown...';
71
 
72
- // Inject a placeholder for the missing CSS
73
- const style = document.createElement('style');
74
- style.innerText = `
75
- /* Placeholder: ProseMirror CSS not found on CDN. Add your own for full styling. */
76
- .milkdown .ProseMirror {
77
- min-height: 200px;
78
- border: 1px solid #ccc;
79
- padding: 8px;
80
- font-family: inherit;
81
- background: #fff;
82
- }
83
- `;
84
- document.head.appendChild(style);
85
-
86
  // Clear chat-log and chat-input before initializing editors
87
  if (chatLog) chatLog.innerHTML = '';
88
  if (chatInput) chatInput.innerHTML = '';
 
18
  display: grid;
19
  grid-template: 1fr auto / 1fr;
20
  }
21
+
22
+ .chat-log {
23
+ display: grid;
24
+ grid-template: 1fr / 1fr;
25
  }
26
+ .chat-input {
27
  border-top: 1px solid #4c566a;
28
  }
29
  .prose-mirror {
30
+ overflow-y: auto;
31
+ }
32
+
33
+ .milkdown {
34
+ display: grid;
35
+ grid-template: 1fr / 1fr;
36
  }
37
+
38
+ .milkdown .ProseMirror {
39
+ min-height: 2em;
40
+ border: 1px solid #ccc;
41
+ padding: 8px;
42
+ font-family: inherit;
43
+ background: #fff;
44
+ }
45
+
46
  </style>
47
  `;
48
 
 
83
  const chatInput = /** @type {HTMLElement|null} */ (document.querySelector('.chat-input'));
84
  if (chatLog) chatLog.textContent = 'Loading Milkdown...';
85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  // Clear chat-log and chat-input before initializing editors
87
  if (chatLog) chatLog.innerHTML = '';
88
  if (chatInput) chatInput.innerHTML = '';