eaglelandsonce commited on
Commit
afdedbf
·
verified ·
1 Parent(s): 14b75eb

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +9 -8
index.html CHANGED
@@ -16,7 +16,8 @@
16
  display: flex;
17
  flex-direction: row;
18
  min-height: 100vh;
19
- background-color: #f0f0f0;
 
20
  }
21
  /* Sidebar styling */
22
  .sidebar {
@@ -55,7 +56,7 @@
55
  position: absolute;
56
  top: 0;
57
  width: 100%;
58
- background-color: #333;
59
  color: white;
60
  text-align: center;
61
  padding: 10px;
@@ -226,20 +227,20 @@
226
  fetchSlides();
227
 
228
  // Grok Chat script
229
- const API_KEY = "xai-hOb0j9QUXVVQMe86ULxWrvyWQQm2LqnWVdxh5hanvqsiVDsXcSPY9EA7YAM5uLCXaThgJscWxxFCHJFy";
230
- const BASE_URL = "https://api.x.ai/v1";
231
-
232
  const promptIcon = document.getElementById('promptIcon');
233
  const promptBox = document.getElementById('promptBox');
234
  const promptText = document.getElementById('promptText');
235
  const queryButton = document.getElementById('queryButton');
236
  const responseBox = document.getElementById('responseBox');
237
  const responseText = document.getElementById('responseText');
 
238
 
239
  promptIcon.addEventListener('click', () => {
240
- const slideText = slides[currentIndex]?.text || "Default prompt";
241
- promptBox.style.display = "block";
242
- promptText.value = slideText;
 
 
243
  });
244
 
245
  queryButton.addEventListener('click', async () => {
 
16
  display: flex;
17
  flex-direction: row;
18
  min-height: 100vh;
19
+ background-color: #000;
20
+ color: #fff;
21
  }
22
  /* Sidebar styling */
23
  .sidebar {
 
56
  position: absolute;
57
  top: 0;
58
  width: 100%;
59
+ background-color: #444;
60
  color: white;
61
  text-align: center;
62
  padding: 10px;
 
227
  fetchSlides();
228
 
229
  // Grok Chat script
 
 
 
230
  const promptIcon = document.getElementById('promptIcon');
231
  const promptBox = document.getElementById('promptBox');
232
  const promptText = document.getElementById('promptText');
233
  const queryButton = document.getElementById('queryButton');
234
  const responseBox = document.getElementById('responseBox');
235
  const responseText = document.getElementById('responseText');
236
+ let isPromptBoxVisible = false;
237
 
238
  promptIcon.addEventListener('click', () => {
239
+ isPromptBoxVisible = !isPromptBoxVisible;
240
+ promptBox.style.display = isPromptBoxVisible ? "block" : "none";
241
+ if (!isPromptBoxVisible) {
242
+ responseBox.style.display = "none";
243
+ }
244
  });
245
 
246
  queryButton.addEventListener('click', async () => {