TheFrogGod commited on
Commit
f181a51
·
verified ·
1 Parent(s): e6b7c34

Update web/past_data.html

Browse files
Files changed (1) hide show
  1. web/past_data.html +44 -0
web/past_data.html CHANGED
@@ -98,6 +98,50 @@
98
  </div>
99
  </div>
100
  </main>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
 
102
  <script type="module">
103
  import {
 
98
  </div>
99
  </div>
100
  </main>
101
+ <!-- Floating Chat Button -->
102
+ <button
103
+ id="chat-toggle"
104
+ class="fixed bottom-6 right-6 bg-[var(--tropical-indigo)] text-white px-5 py-3 rounded-full shadow-lg hover:scale-105 transition"
105
+ >
106
+ 💬 Chat
107
+ </button>
108
+
109
+ <!-- Chatbot Drawer -->
110
+ <div
111
+ id="chat-drawer"
112
+ class="fixed top-16 right-0 w-96 max-w-full h-[calc(100%-4rem)] bg-white shadow-lg border-l border-gray-200 transform translate-x-full transition-transform duration-300 ease-in-out z-40 flex flex-col"
113
+ >
114
+ <div class="flex justify-between items-center p-4 border-b">
115
+ <h3 class="text-lg font-semibold">Ask Chatbot</h3>
116
+ <button id="chat-close" class="text-gray-600 hover:text-black text-xl">
117
+
118
+ </button>
119
+ </div>
120
+ <div id="chat-output" class="flex-1 overflow-auto p-4 space-y-2 text-sm">
121
+ <p><strong>Chatbot:</strong> Ask me something about your report</p>
122
+ </div>
123
+ <div class="flex gap-2 p-4 border-t">
124
+ <input
125
+ type="text"
126
+ id="user-question"
127
+ placeholder="Ask a question..."
128
+ class="flex-1 rounded px-3 py-2 focus:outline-none border"
129
+ />
130
+ <button id="ask-btn" class="btn-primary px-4 py-2 rounded">Ask</button>
131
+ </div>
132
+ </div>
133
+
134
+ <script>
135
+ const chatDrawer = document.getElementById("chat-drawer");
136
+ const chatToggle = document.getElementById("chat-toggle");
137
+ const chatClose = document.getElementById("chat-close");
138
+ chatToggle.addEventListener("click", () =>
139
+ chatDrawer.classList.toggle("translate-x-full")
140
+ );
141
+ chatClose.addEventListener("click", () =>
142
+ chatDrawer.classList.add("translate-x-full")
143
+ );
144
+ </script>
145
 
146
  <script type="module">
147
  import {