theWitcher commited on
Commit
353b8f2
·
1 Parent(s): 489f090

update chatBubble

Browse files
Files changed (2) hide show
  1. index.html +30 -11
  2. style.css +38 -0
index.html CHANGED
@@ -417,17 +417,36 @@ https://chatgpt.com/c/67efa5ae-ab80-8005-a7d4-de3ced6ccec4
417
  <!-- /* --- Footer --- */ -->
418
  <footer class="fixed bottom-0 left-0 w-full z-50 backdrop-blur-md bg-white/80 shadow-xl border-t border-gray-200">
419
  <!-- הוספת כפתור צ'אט צף לקובץ index.html -->
420
- <div id="chatBubble" class="fixed bottom-6 right-6 z-[9999]">
421
- <button onclick="toggleChatWindow()" class="bg-gradient-to-r from-purple-500 to-indigo-600 hover:from-purple-600 hover:to-indigo-700 text-white px-4 py-3 rounded-full shadow-xl flex items-center space-x-2 space-x-reverse">
422
- <i class="fas fa-comment-dots"></i>
423
- <span>צ'אט</span>
424
- </button>
425
-
426
- <!-- חלון הצ'אט שנטען מהקובץ chatbot.html -->
427
- <div id="chatWindow" class="hidden mt-3 w-[360px] h-[500px] bg-white rounded-2xl shadow-2xl border border-gray-200 overflow-hidden relative">
428
- <iframe src="https://sagi-ba-sagi-ai-tools-chatbot-main-g1prqf.streamlit.app/?embed=true" class="w-full h-full border-none"></iframe>
429
- </div>
430
- <!-- <iframe src="https://sagi-ba-sagi-ai-tools-chatbot-main-g1prqf.streamlit.app/?embed=true" class="w-full h-full border-none"></iframe> -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
431
  </div>
432
 
433
  <script>
 
417
  <!-- /* --- Footer --- */ -->
418
  <footer class="fixed bottom-0 left-0 w-full z-50 backdrop-blur-md bg-white/80 shadow-xl border-t border-gray-200">
419
  <!-- הוספת כפתור צ'אט צף לקובץ index.html -->
420
+ <!-- Improved Chat Component -->
421
+ <div id="chatBubble" class="fixed bottom-8 right-5 z-[9999]">
422
+ <!-- Introductory message -->
423
+ <div id="chatIntro" class="bg-white p-3 rounded-lg shadow-md mb-2 text-sm max-w-xs chat-intro-enter hidden">
424
+ שלום! אני עוזר AI של שגיא. אשמח לעזור לך למצוא כלי AI מתאים או לענות על שאלות.
425
+ <button onclick="hideChatIntro()" class="text-gray-500 float-left">
426
+ <i class="fas fa-times"></i>
427
+ </button>
428
+ </div>
429
+
430
+ <!-- Chat Button -->
431
+ <button id="chatButton" onclick="toggleChatWindow()" class="chat-pulse bg-gradient-to-r from-purple-500 to-indigo-600 hover:from-purple-600 hover:to-indigo-700 text-white px-4 py-3 rounded-full shadow-xl flex items-center space-x-2 space-x-reverse">
432
+ <i class="fas fa-robot"></i>
433
+ <span>צ'אט</span>
434
+ </button>
435
+
436
+ <!-- Chat Window -->
437
+ <div id="chatWindow" class="hidden mt-3 w-[360px] h-[500px] bg-white rounded-2xl shadow-2xl border border-gray-200 overflow-hidden relative">
438
+ <!-- Chat Header -->
439
+ <div class="bg-gradient-to-r from-purple-500 to-indigo-600 text-white p-3 flex justify-between items-center">
440
+ <button onclick="toggleChatWindow()" class="text-white">
441
+ <i class="fas fa-times"></i>
442
+ </button>
443
+ <div class="font-medium">עוזר AI של שגיא</div>
444
+ <div class="w-6"></div> <!-- Spacer for balance -->
445
+ </div>
446
+
447
+ <!-- Chat iframe -->
448
+ <iframe src="https://sagi-ba-sagi-ai-tools-chatbot-main-g1prqf.streamlit.app/?embed=true" class="w-full h-full border-none"></iframe>
449
+ </div>
450
  </div>
451
 
452
  <script>
style.css CHANGED
@@ -31,3 +31,41 @@ p {
31
  overflow-y: auto;
32
  padding-bottom: 80px; /* כדי לא להיתקע מאחורי הפוטר */
33
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  overflow-y: auto;
32
  padding-bottom: 80px; /* כדי לא להיתקע מאחורי הפוטר */
33
  }
34
+ /* Chat animations and effects */
35
+ @keyframes pulse {
36
+ 0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7); }
37
+ 70% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
38
+ 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
39
+ }
40
+
41
+ .chat-pulse {
42
+ animation: pulse 2s infinite;
43
+ }
44
+
45
+ /* Smooth transitions */
46
+ #chatWindow {
47
+ transition: all 0.3s ease-in-out;
48
+ transform-origin: bottom right;
49
+ }
50
+
51
+ .chat-intro-enter {
52
+ animation: slideDown 0.3s forwards;
53
+ }
54
+
55
+ @keyframes slideDown {
56
+ from { transform: translateY(-20px); opacity: 0; }
57
+ to { transform: translateY(0); opacity: 1; }
58
+ }
59
+
60
+ /* Mobile adjustments */
61
+ @media (max-width: 640px) {
62
+ #chatWindow {
63
+ width: 90vw !important;
64
+ right: 5vw;
65
+ left: 5vw;
66
+ }
67
+
68
+ #chatBubble {
69
+ bottom: 75px; /* Move above footer on mobile */
70
+ }
71
+ }