Enhance - Follow Up Deployment
Browse files- index.html +203 -14
index.html
CHANGED
|
@@ -7,18 +7,30 @@
|
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
.gradient-bg {
|
| 11 |
-
background:
|
| 12 |
}
|
|
|
|
| 13 |
.bot-message {
|
| 14 |
background-color: #f0f2f5;
|
| 15 |
border-radius: 18px 18px 18px 0;
|
|
|
|
| 16 |
}
|
|
|
|
| 17 |
.user-message {
|
| 18 |
background-color: #1877f2;
|
| 19 |
color: white;
|
| 20 |
border-radius: 18px 18px 0 18px;
|
|
|
|
| 21 |
}
|
|
|
|
| 22 |
.typing-indicator span {
|
| 23 |
display: inline-block;
|
| 24 |
width: 8px;
|
|
@@ -28,22 +40,127 @@
|
|
| 28 |
margin: 0 2px;
|
| 29 |
animation: bounce 1.4s infinite ease-in-out;
|
| 30 |
}
|
|
|
|
| 31 |
.typing-indicator span:nth-child(2) {
|
| 32 |
animation-delay: 0.2s;
|
| 33 |
}
|
|
|
|
| 34 |
.typing-indicator span:nth-child(3) {
|
| 35 |
animation-delay: 0.4s;
|
| 36 |
}
|
|
|
|
| 37 |
@keyframes bounce {
|
| 38 |
0%, 60%, 100% { transform: translateY(0); }
|
| 39 |
30% { transform: translateY(-5px); }
|
| 40 |
}
|
|
|
|
| 41 |
.profile-pic {
|
| 42 |
-
transition:
|
| 43 |
}
|
|
|
|
| 44 |
.profile-pic:hover {
|
| 45 |
transform: scale(1.05);
|
| 46 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
</style>
|
| 48 |
</head>
|
| 49 |
<body class="bg-gray-100 font-sans">
|
|
@@ -56,7 +173,11 @@
|
|
| 56 |
<h1 class="text-xl font-bold">SocialBot Pro</h1>
|
| 57 |
</div>
|
| 58 |
<div class="flex items-center space-x-4">
|
| 59 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
data-size="large"
|
| 61 |
data-button-type="login_with"
|
| 62 |
data-layout="default"
|
|
@@ -65,17 +186,39 @@
|
|
| 65 |
onclick="FB.login()">
|
| 66 |
<i class="fas fa-sign-in-alt mr-2"></i>Login with Facebook
|
| 67 |
</button>
|
| 68 |
-
<button class="bg-green-500 text-white px-4 py-1 rounded-full font-medium hover:bg-green-600 transition">
|
| 69 |
<i class="fas fa-user-plus mr-2"></i>Register
|
| 70 |
</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
</div>
|
| 72 |
</div>
|
| 73 |
</header>
|
| 74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
<!-- Main Content -->
|
| 76 |
-
<main class="flex-1 container mx-auto px-4 py-6 flex flex-col lg:flex-row gap-6">
|
| 77 |
<!-- Left Sidebar - Bot Controls -->
|
| 78 |
-
<div class="w-full lg:w-1/4 bg-white rounded-lg shadow-md p-4 bot-controls">
|
| 79 |
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
|
| 80 |
<i class="fas fa-robot text-blue-500 mr-2"></i> Bot Controls
|
| 81 |
</h2>
|
|
@@ -183,7 +326,7 @@
|
|
| 183 |
</div>
|
| 184 |
|
| 185 |
<!-- Main Chat Area -->
|
| 186 |
-
<div class="w-full lg:w-2/4 bg-white rounded-lg shadow-md p-4 flex flex-col">
|
| 187 |
<div class="flex items-center border-b pb-3 mb-3">
|
| 188 |
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="w-10 h-10 rounded-full mr-3 profile-pic">
|
| 189 |
<div>
|
|
@@ -273,7 +416,7 @@
|
|
| 273 |
</div>
|
| 274 |
|
| 275 |
<!-- Right Sidebar - Analytics -->
|
| 276 |
-
<div class="w-full lg:w-1/4 bg-white rounded-lg shadow-md p-4">
|
| 277 |
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
|
| 278 |
<i class="fas fa-chart-line text-blue-500 mr-2"></i> Analytics
|
| 279 |
</h2>
|
|
@@ -446,6 +589,43 @@
|
|
| 446 |
const messageInput = document.querySelector('input[type="text"]');
|
| 447 |
const sendButton = document.querySelector('.fa-paper-plane').parentNode;
|
| 448 |
const botToggle = document.getElementById('botToggle');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 449 |
|
| 450 |
// Scroll to bottom of chat initially
|
| 451 |
chatContainer.scrollTop = chatContainer.scrollHeight;
|
|
@@ -456,7 +636,7 @@
|
|
| 456 |
const timeString = now.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
|
| 457 |
|
| 458 |
const messageDiv = document.createElement('div');
|
| 459 |
-
messageDiv.className = isUser ? 'flex justify-end' : 'flex items-start';
|
| 460 |
|
| 461 |
messageDiv.innerHTML = isUser ? `
|
| 462 |
<div class="user-message px-3 py-2 max-w-xs">
|
|
@@ -502,7 +682,11 @@
|
|
| 502 |
"Great point! Have you considered this perspective?",
|
| 503 |
"Thanks for sharing that with me!",
|
| 504 |
"I'd love to hear more about your thoughts on this.",
|
| 505 |
-
"That reminds me of something similar I read recently."
|
|
|
|
|
|
|
|
|
|
|
|
|
| 506 |
];
|
| 507 |
return responses[Math.floor(Math.random() * responses.length)];
|
| 508 |
}
|
|
@@ -535,12 +719,13 @@
|
|
| 535 |
botToggle.addEventListener('change', function() {
|
| 536 |
const status = this.checked ? 'activated' : 'deactivated';
|
| 537 |
const statusDiv = document.createElement('div');
|
| 538 |
-
statusDiv.className = 'text-center text-sm p-2 bg-gray-100 rounded-lg my-2';
|
| 539 |
statusDiv.textContent = `Bot ${status}! Automated activities will ${this.checked ? 'begin' : 'stop'}.`;
|
| 540 |
document.querySelector('.bot-controls').prepend(statusDiv);
|
| 541 |
|
| 542 |
setTimeout(() => {
|
| 543 |
-
statusDiv.
|
|
|
|
| 544 |
}, 3000);
|
| 545 |
});
|
| 546 |
|
|
@@ -549,12 +734,13 @@
|
|
| 549 |
button.addEventListener('click', function() {
|
| 550 |
const action = this.textContent.trim();
|
| 551 |
const actionDiv = document.createElement('div');
|
| 552 |
-
actionDiv.className = 'text-center text-sm p-2 bg-blue-50 text-blue-600 rounded-lg my-2';
|
| 553 |
actionDiv.textContent = `${action} mode activated!`;
|
| 554 |
document.querySelector('.bot-controls').prepend(actionDiv);
|
| 555 |
|
| 556 |
setTimeout(() => {
|
| 557 |
-
actionDiv.
|
|
|
|
| 558 |
}, 3000);
|
| 559 |
});
|
| 560 |
});
|
|
@@ -565,6 +751,9 @@
|
|
| 565 |
typingIndicator.remove();
|
| 566 |
addMessage("Sounds like a plan! Let me check my schedule and get back to you. 😊");
|
| 567 |
}, 3000);
|
|
|
|
|
|
|
|
|
|
| 568 |
});
|
| 569 |
</script>
|
| 570 |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Madhatterappz/automaticallybotfb" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
|
|
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
<style>
|
| 10 |
+
:root {
|
| 11 |
+
--primary-gradient: linear-gradient(135deg, #1877f2 0%, #4267B2 100%);
|
| 12 |
+
--secondary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 13 |
+
--shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 14 |
+
--transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
.gradient-bg {
|
| 18 |
+
background: var(--primary-gradient);
|
| 19 |
}
|
| 20 |
+
|
| 21 |
.bot-message {
|
| 22 |
background-color: #f0f2f5;
|
| 23 |
border-radius: 18px 18px 18px 0;
|
| 24 |
+
transition: var(--transition);
|
| 25 |
}
|
| 26 |
+
|
| 27 |
.user-message {
|
| 28 |
background-color: #1877f2;
|
| 29 |
color: white;
|
| 30 |
border-radius: 18px 18px 0 18px;
|
| 31 |
+
transition: var(--transition);
|
| 32 |
}
|
| 33 |
+
|
| 34 |
.typing-indicator span {
|
| 35 |
display: inline-block;
|
| 36 |
width: 8px;
|
|
|
|
| 40 |
margin: 0 2px;
|
| 41 |
animation: bounce 1.4s infinite ease-in-out;
|
| 42 |
}
|
| 43 |
+
|
| 44 |
.typing-indicator span:nth-child(2) {
|
| 45 |
animation-delay: 0.2s;
|
| 46 |
}
|
| 47 |
+
|
| 48 |
.typing-indicator span:nth-child(3) {
|
| 49 |
animation-delay: 0.4s;
|
| 50 |
}
|
| 51 |
+
|
| 52 |
@keyframes bounce {
|
| 53 |
0%, 60%, 100% { transform: translateY(0); }
|
| 54 |
30% { transform: translateY(-5px); }
|
| 55 |
}
|
| 56 |
+
|
| 57 |
.profile-pic {
|
| 58 |
+
transition: var(--transition);
|
| 59 |
}
|
| 60 |
+
|
| 61 |
.profile-pic:hover {
|
| 62 |
transform: scale(1.05);
|
| 63 |
}
|
| 64 |
+
|
| 65 |
+
/* Dark mode styles */
|
| 66 |
+
.dark-mode {
|
| 67 |
+
--bg-primary: #1a2236;
|
| 68 |
+
--bg-secondary: #243049;
|
| 69 |
+
--text-primary: #f8fafc;
|
| 70 |
+
--text-secondary: #cbd5e1;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
.dark-mode .bg-white {
|
| 74 |
+
background-color: var(--bg-secondary);
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
.dark-mode .bg-gray-50 {
|
| 78 |
+
background-color: rgba(30, 41, 59, 0.5);
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
.dark-mode .text-gray-800 {
|
| 82 |
+
color: var(--text-primary);
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
.dark-mode .text-gray-500 {
|
| 86 |
+
color: var(--text-secondary);
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
.dark-mode .border-gray-200 {
|
| 90 |
+
border-color: rgba(255, 255, 255, 0.1);
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
.dark-mode .bot-message {
|
| 94 |
+
background-color: #2d3748;
|
| 95 |
+
color: var(--text-primary);
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
.dark-mode .user-message {
|
| 99 |
+
background-color: #1877f2;
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
/* Animation classes */
|
| 103 |
+
.fade-in {
|
| 104 |
+
animation: fadeIn 0.5s ease-in;
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
.slide-up {
|
| 108 |
+
animation: slideUp 0.3s ease-out;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
@keyframes fadeIn {
|
| 112 |
+
from { opacity: 0; }
|
| 113 |
+
to { opacity: 1; }
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
@keyframes slideUp {
|
| 117 |
+
from {
|
| 118 |
+
opacity: 0;
|
| 119 |
+
transform: translateY(20px);
|
| 120 |
+
}
|
| 121 |
+
to {
|
| 122 |
+
opacity: 1;
|
| 123 |
+
transform: translateY(0);
|
| 124 |
+
}
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
/* Responsive improvements */
|
| 128 |
+
@media (max-width: 768px) {
|
| 129 |
+
.flex-col-mobile {
|
| 130 |
+
flex-direction: column;
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
.w-full-mobile {
|
| 134 |
+
width: 100%;
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
.hidden-mobile {
|
| 138 |
+
display: none;
|
| 139 |
+
}
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
/* Custom scrollbar */
|
| 143 |
+
::-webkit-scrollbar {
|
| 144 |
+
width: 6px;
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
::-webkit-scrollbar-track {
|
| 148 |
+
background: #f1f1f1;
|
| 149 |
+
border-radius: 10px;
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
::-webkit-scrollbar-thumb {
|
| 153 |
+
background: #c1c1c1;
|
| 154 |
+
border-radius: 10px;
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
.dark-mode ::-webkit-scrollbar-track {
|
| 158 |
+
background: #2d3748;
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
.dark-mode ::-webkit-scrollbar-thumb {
|
| 162 |
+
background: #4a5568;
|
| 163 |
+
}
|
| 164 |
</style>
|
| 165 |
</head>
|
| 166 |
<body class="bg-gray-100 font-sans">
|
|
|
|
| 173 |
<h1 class="text-xl font-bold">SocialBot Pro</h1>
|
| 174 |
</div>
|
| 175 |
<div class="flex items-center space-x-4">
|
| 176 |
+
<!-- Dark mode toggle -->
|
| 177 |
+
<button id="darkModeToggle" class="p-2 text-white hover:bg-white hover:bg-opacity-20 rounded-full transition">
|
| 178 |
+
<i class="fas fa-moon"></i>
|
| 179 |
+
</button>
|
| 180 |
+
<button class="bg-white text-blue-600 px-4 py-1 rounded-full font-medium hover:bg-gray-100 transition fb-login-button hidden-mobile"
|
| 181 |
data-size="large"
|
| 182 |
data-button-type="login_with"
|
| 183 |
data-layout="default"
|
|
|
|
| 186 |
onclick="FB.login()">
|
| 187 |
<i class="fas fa-sign-in-alt mr-2"></i>Login with Facebook
|
| 188 |
</button>
|
| 189 |
+
<button class="bg-green-500 text-white px-4 py-1 rounded-full font-medium hover:bg-green-600 transition hidden-mobile">
|
| 190 |
<i class="fas fa-user-plus mr-2"></i>Register
|
| 191 |
</button>
|
| 192 |
+
<!-- Mobile menu button -->
|
| 193 |
+
<button id="mobileMenuButton" class="p-2 text-white hover:bg-white hover:bg-opacity-20 rounded-full transition lg:hidden">
|
| 194 |
+
<i class="fas fa-bars"></i>
|
| 195 |
+
</button>
|
| 196 |
</div>
|
| 197 |
</div>
|
| 198 |
</header>
|
| 199 |
|
| 200 |
+
<!-- Mobile Menu -->
|
| 201 |
+
<div id="mobileMenu" class="hidden gradient-bg text-white p-4 shadow-lg">
|
| 202 |
+
<div class="container mx-auto flex flex-col space-y-3">
|
| 203 |
+
<button class="bg-white text-blue-600 px-4 py-2 rounded-full font-medium hover:bg-gray-100 transition fb-login-button w-full"
|
| 204 |
+
data-size="large"
|
| 205 |
+
data-button-type="login_with"
|
| 206 |
+
data-layout="default"
|
| 207 |
+
data-auto-logout-link="false"
|
| 208 |
+
data-use-continue-as="false"
|
| 209 |
+
onclick="FB.login()">
|
| 210 |
+
<i class="fas fa-sign-in-alt mr-2"></i>Login with Facebook
|
| 211 |
+
</button>
|
| 212 |
+
<button class="bg-green-500 text-white px-4 py-2 rounded-full font-medium hover:bg-green-600 transition w-full">
|
| 213 |
+
<i class="fas fa-user-plus mr-2"></i>Register
|
| 214 |
+
</button>
|
| 215 |
+
</div>
|
| 216 |
+
</div>
|
| 217 |
+
|
| 218 |
<!-- Main Content -->
|
| 219 |
+
<main class="flex-1 container mx-auto px-4 py-6 flex flex-col lg:flex-row gap-6 fade-in">
|
| 220 |
<!-- Left Sidebar - Bot Controls -->
|
| 221 |
+
<div class="w-full lg:w-1/4 bg-white rounded-lg shadow-md p-4 bot-controls slide-up">
|
| 222 |
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
|
| 223 |
<i class="fas fa-robot text-blue-500 mr-2"></i> Bot Controls
|
| 224 |
</h2>
|
|
|
|
| 326 |
</div>
|
| 327 |
|
| 328 |
<!-- Main Chat Area -->
|
| 329 |
+
<div class="w-full lg:w-2/4 bg-white rounded-lg shadow-md p-4 flex flex-col slide-up" style="min-height: 600px;">
|
| 330 |
<div class="flex items-center border-b pb-3 mb-3">
|
| 331 |
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="w-10 h-10 rounded-full mr-3 profile-pic">
|
| 332 |
<div>
|
|
|
|
| 416 |
</div>
|
| 417 |
|
| 418 |
<!-- Right Sidebar - Analytics -->
|
| 419 |
+
<div class="w-full lg:w-1/4 bg-white rounded-lg shadow-md p-4 slide-up">
|
| 420 |
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
|
| 421 |
<i class="fas fa-chart-line text-blue-500 mr-2"></i> Analytics
|
| 422 |
</h2>
|
|
|
|
| 589 |
const messageInput = document.querySelector('input[type="text"]');
|
| 590 |
const sendButton = document.querySelector('.fa-paper-plane').parentNode;
|
| 591 |
const botToggle = document.getElementById('botToggle');
|
| 592 |
+
const darkModeToggle = document.getElementById('darkModeToggle');
|
| 593 |
+
const mobileMenuButton = document.getElementById('mobileMenuButton');
|
| 594 |
+
const mobileMenu = document.getElementById('mobileMenu');
|
| 595 |
+
|
| 596 |
+
// Dark mode functionality
|
| 597 |
+
darkModeToggle.addEventListener('click', function() {
|
| 598 |
+
document.body.classList.toggle('dark-mode');
|
| 599 |
+
const icon = this.querySelector('i');
|
| 600 |
+
if (document.body.classList.contains('dark-mode')) {
|
| 601 |
+
icon.classList.remove('fa-moon');
|
| 602 |
+
icon.classList.add('fa-sun');
|
| 603 |
+
localStorage.setItem('darkMode', 'enabled');
|
| 604 |
+
} else {
|
| 605 |
+
icon.classList.remove('fa-sun');
|
| 606 |
+
icon.classList.add('fa-moon');
|
| 607 |
+
localStorage.setItem('darkMode', 'disabled');
|
| 608 |
+
}
|
| 609 |
+
});
|
| 610 |
+
|
| 611 |
+
// Check for saved dark mode preference
|
| 612 |
+
if (localStorage.getItem('darkMode') === 'enabled') {
|
| 613 |
+
document.body.classList.add('dark-mode');
|
| 614 |
+
darkModeToggle.querySelector('i').classList.remove('fa-moon');
|
| 615 |
+
darkModeToggle.querySelector('i').classList.add('fa-sun');
|
| 616 |
+
}
|
| 617 |
+
|
| 618 |
+
// Mobile menu functionality
|
| 619 |
+
mobileMenuButton.addEventListener('click', function() {
|
| 620 |
+
mobileMenu.classList.toggle('hidden');
|
| 621 |
+
});
|
| 622 |
+
|
| 623 |
+
// Close mobile menu when clicking outside
|
| 624 |
+
document.addEventListener('click', function(event) {
|
| 625 |
+
if (!mobileMenu.contains(event.target) && !mobileMenuButton.contains(event.target)) {
|
| 626 |
+
mobileMenu.classList.add('hidden');
|
| 627 |
+
}
|
| 628 |
+
});
|
| 629 |
|
| 630 |
// Scroll to bottom of chat initially
|
| 631 |
chatContainer.scrollTop = chatContainer.scrollHeight;
|
|
|
|
| 636 |
const timeString = now.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
|
| 637 |
|
| 638 |
const messageDiv = document.createElement('div');
|
| 639 |
+
messageDiv.className = isUser ? 'flex justify-end fade-in' : 'flex items-start fade-in';
|
| 640 |
|
| 641 |
messageDiv.innerHTML = isUser ? `
|
| 642 |
<div class="user-message px-3 py-2 max-w-xs">
|
|
|
|
| 682 |
"Great point! Have you considered this perspective?",
|
| 683 |
"Thanks for sharing that with me!",
|
| 684 |
"I'd love to hear more about your thoughts on this.",
|
| 685 |
+
"That reminds me of something similar I read recently.",
|
| 686 |
+
"Fascinating! I hadn't thought about it that way before.",
|
| 687 |
+
"You make a great point there. What inspired that thought?",
|
| 688 |
+
"I appreciate your perspective on this matter.",
|
| 689 |
+
"That's a thoughtful observation. Let's explore it further."
|
| 690 |
];
|
| 691 |
return responses[Math.floor(Math.random() * responses.length)];
|
| 692 |
}
|
|
|
|
| 719 |
botToggle.addEventListener('change', function() {
|
| 720 |
const status = this.checked ? 'activated' : 'deactivated';
|
| 721 |
const statusDiv = document.createElement('div');
|
| 722 |
+
statusDiv.className = 'text-center text-sm p-2 bg-gray-100 dark:bg-gray-700 rounded-lg my-2 fade-in';
|
| 723 |
statusDiv.textContent = `Bot ${status}! Automated activities will ${this.checked ? 'begin' : 'stop'}.`;
|
| 724 |
document.querySelector('.bot-controls').prepend(statusDiv);
|
| 725 |
|
| 726 |
setTimeout(() => {
|
| 727 |
+
statusDiv.style.opacity = '0';
|
| 728 |
+
setTimeout(() => statusDiv.remove(), 300);
|
| 729 |
}, 3000);
|
| 730 |
});
|
| 731 |
|
|
|
|
| 734 |
button.addEventListener('click', function() {
|
| 735 |
const action = this.textContent.trim();
|
| 736 |
const actionDiv = document.createElement('div');
|
| 737 |
+
actionDiv.className = 'text-center text-sm p-2 bg-blue-50 text-blue-600 dark:bg-blue-900 dark:text-blue-200 rounded-lg my-2 fade-in';
|
| 738 |
actionDiv.textContent = `${action} mode activated!`;
|
| 739 |
document.querySelector('.bot-controls').prepend(actionDiv);
|
| 740 |
|
| 741 |
setTimeout(() => {
|
| 742 |
+
actionDiv.style.opacity = '0';
|
| 743 |
+
setTimeout(() => actionDiv.remove(), 300);
|
| 744 |
}, 3000);
|
| 745 |
});
|
| 746 |
});
|
|
|
|
| 751 |
typingIndicator.remove();
|
| 752 |
addMessage("Sounds like a plan! Let me check my schedule and get back to you. 😊");
|
| 753 |
}, 3000);
|
| 754 |
+
|
| 755 |
+
// Auto-focus message input
|
| 756 |
+
messageInput.focus();
|
| 757 |
});
|
| 758 |
</script>
|
| 759 |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Madhatterappz/automaticallybotfb" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|