yasirme commited on
Commit
d88bc0c
·
1 Parent(s): 267ef71

Minor Changes

Browse files
application/static/css/style.css CHANGED
@@ -270,9 +270,10 @@ code{
270
  left: 50%;
271
  transform: translate(-50%,-50%);
272
  width: 320px;
273
- height: 300px;
274
  display: flex;
275
  flex-direction: column;
 
276
  color: #d8d8d8;
277
  background-color: #222222;
278
  box-shadow: 6px 6px rgb(41, 41, 41) ;
@@ -281,12 +282,12 @@ code{
281
  }
282
  .alert p{
283
  float: left;
284
- padding: 10px;
285
  font-family: 'Inter';
286
  font-weight: 300;
287
  font-size: 15px;
288
  color: #cfcfcf;
289
  opacity: 0.9;
 
290
  }
291
  .closeAlert{
292
  margin-left: auto;
@@ -298,12 +299,25 @@ code{
298
  border-radius: 10px;
299
  color: #ffffff;
300
  }
 
 
 
 
 
 
 
 
 
 
 
 
301
  .note{
302
  text-align: center;
303
  background-color: rgba(119, 16, 238, 0.55);
304
  box-shadow: 6px 6px rgb(32, 32, 32) ;
305
  margin: auto;
306
  width: 70px;
 
307
  }
308
 
309
  @media screen and (max-width: 780px){
 
270
  left: 50%;
271
  transform: translate(-50%,-50%);
272
  width: 320px;
273
+ height: 320px;
274
  display: flex;
275
  flex-direction: column;
276
+ gap: 0px;
277
  color: #d8d8d8;
278
  background-color: #222222;
279
  box-shadow: 6px 6px rgb(41, 41, 41) ;
 
282
  }
283
  .alert p{
284
  float: left;
 
285
  font-family: 'Inter';
286
  font-weight: 300;
287
  font-size: 15px;
288
  color: #cfcfcf;
289
  opacity: 0.9;
290
+ padding-left: 10px;
291
  }
292
  .closeAlert{
293
  margin-left: auto;
 
299
  border-radius: 10px;
300
  color: #ffffff;
301
  }
302
+ .discord {
303
+ margin: 10px;
304
+ text-decoration: none;
305
+ color: rgb(211, 211, 211);
306
+ padding: 7.5px;
307
+ border-radius: 10px;
308
+ background: linear-gradient(to right, #4A148C, #9c18e3);
309
+ cursor: pointer;
310
+ display: inline-block;
311
+ font-size: 13px;
312
+ max-width: 77px;
313
+ }
314
  .note{
315
  text-align: center;
316
  background-color: rgba(119, 16, 238, 0.55);
317
  box-shadow: 6px 6px rgb(32, 32, 32) ;
318
  margin: auto;
319
  width: 70px;
320
+ padding: 10px;
321
  }
322
 
323
  @media screen and (max-width: 780px){
application/static/js/components/renderSymbols.js CHANGED
@@ -26,20 +26,36 @@ class RenderSymbols{
26
  elem.innerHTML = elem.innerHTML.replace(/\n/g, '<br>');
27
  }
28
  renderCode(element) {
29
- let content = element.innerHTML;
 
30
  if (content.includes("```") && content.split("```").length >= 3) {
31
  content = content.replace(/```(\w*)<br>([\s\S]*?)```/g, (match, language, code) => {
32
  code = code.replace(/<br>/g, '\n').trim();
33
- language = language.trim() || 'text';
 
 
34
  return `<pre class="code-block"><code class="language-${language}">${code}</code></pre>`;
35
  });
36
-
37
  element.innerHTML = content;
 
38
  element.querySelectorAll('code:not(.hljs)').forEach(block => {
39
  hljs.highlightElement(block);
40
  });
41
  }
42
  }
 
 
 
 
 
 
 
 
 
 
 
 
43
 
44
  }
45
  export default RenderSymbols
 
26
  elem.innerHTML = elem.innerHTML.replace(/\n/g, '<br>');
27
  }
28
  renderCode(element) {
29
+ let content = element.innerHTML;
30
+
31
  if (content.includes("```") && content.split("```").length >= 3) {
32
  content = content.replace(/```(\w*)<br>([\s\S]*?)```/g, (match, language, code) => {
33
  code = code.replace(/<br>/g, '\n').trim();
34
+ language = language.trim() || 'text';
35
+ code = this.escapeHTML(code);
36
+
37
  return `<pre class="code-block"><code class="language-${language}">${code}</code></pre>`;
38
  });
39
+
40
  element.innerHTML = content;
41
+
42
  element.querySelectorAll('code:not(.hljs)').forEach(block => {
43
  hljs.highlightElement(block);
44
  });
45
  }
46
  }
47
+ escapeHTML(str) {
48
+ return str.replace(/[&<>"']/g, function (char) {
49
+ const map = {
50
+ '&': '&amp;',
51
+ '<': '&lt;',
52
+ '>': '&gt;',
53
+ '"': '&quot;',
54
+ "'": '&#39;',
55
+ };
56
+ return map[char] || char;
57
+ });
58
+ }
59
 
60
  }
61
  export default RenderSymbols
application/templates/index.html CHANGED
@@ -40,8 +40,9 @@
40
  <div class="alert" id="alert">
41
  <div class="closeAlert" id="closeAlert">X</div>
42
  <p class="note">Note</p>
43
- <p>You can easily use your own API provider to run this application; just update the pipeline.json file</p>
44
- <p>The file/image attachment feature for the vision model has not been implemented yet.</p>
 
45
  </div>
46
  <div class="textCustomization">
47
  <div class="colors"></div>
 
40
  <div class="alert" id="alert">
41
  <div class="closeAlert" id="closeAlert">X</div>
42
  <p class="note">Note</p>
43
+ <p>---> You can easily use your own API provider to run this application; just update the pipeline.json file</p>
44
+ <p>---> The file/image attachment feature for the vision model has not been implemented yet.</p>
45
+ <a href="https://discord.gg/tRC7hNXfPH" class="discord" `target="_blank"> Join Discord </a>
46
  </div>
47
  <div class="textCustomization">
48
  <div class="colors"></div>