Spaces:
Running
Running
aşağıda mesaj yazma kutusu yok. onuda eklermisin detaylarıyla
Browse files- index.html +115 -3
index.html
CHANGED
|
@@ -349,8 +349,120 @@
|
|
| 349 |
</div>
|
| 350 |
</div>
|
| 351 |
</div>
|
| 352 |
-
|
| 353 |
<div class="flex justify-start">
|
| 354 |
-
<div class
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 355 |
</body>
|
| 356 |
-
</html>
|
|
|
|
| 349 |
</div>
|
| 350 |
</div>
|
| 351 |
</div>
|
|
|
|
| 352 |
<div class="flex justify-start">
|
| 353 |
+
<div class="max-w-[85%] md:max-w-[75%] lg:max-w-[65%]">
|
| 354 |
+
<div class="chat-bubble-assistant p-4">
|
| 355 |
+
<div class="flex items-center space-x-2 mb-2">
|
| 356 |
+
<div class="w-6 h-6 rounded-full bg-secondary-500 flex items-center justify-center text-white text-xs font-medium">AI</div>
|
| 357 |
+
<span class="text-xs font-medium">SinapsisAI</span>
|
| 358 |
+
</div>
|
| 359 |
+
<p class="text-sm">Would you like me to explain any specific type of neural network or provide examples?</p>
|
| 360 |
+
<div class="flex items-center justify-end space-x-2 mt-3 text-xs text-gray-500 dark:text-gray-400">
|
| 361 |
+
<span>12:48 PM</span>
|
| 362 |
+
<button class="hover:text-primary-500">
|
| 363 |
+
<i data-feather="copy" class="w-3 h-3"></i>
|
| 364 |
+
</button>
|
| 365 |
+
</div>
|
| 366 |
+
</div>
|
| 367 |
+
</div>
|
| 368 |
+
</div>
|
| 369 |
+
</div>
|
| 370 |
+
|
| 371 |
+
<!-- Composer -->
|
| 372 |
+
<div class="sticky bottom-0 bg-white dark:bg-gray-900 border-t border-gray-200 dark:border-gray-800 px-4 py-3 safe-area-bottom">
|
| 373 |
+
<div class="flex items-end space-x-2">
|
| 374 |
+
<button class="p-2 rounded-full text-gray-500 hover:bg-gray-100 dark:hover:bg-gray-800">
|
| 375 |
+
<i data-feather="plus"></i>
|
| 376 |
+
</button>
|
| 377 |
+
|
| 378 |
+
<div class="flex-1 relative">
|
| 379 |
+
<textarea
|
| 380 |
+
id="message-input"
|
| 381 |
+
rows="1"
|
| 382 |
+
placeholder="Ask anything..."
|
| 383 |
+
class="w-full max-h-32 min-h-[40px] px-4 py-2 bg-gray-100 dark:bg-gray-800 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 resize-none"
|
| 384 |
+
style="scrollbar-width: none;"
|
| 385 |
+
></textarea>
|
| 386 |
+
<div class="absolute right-2 bottom-2 flex space-x-1">
|
| 387 |
+
<button class="p-1 text-gray-500 hover:text-primary-500">
|
| 388 |
+
<i data-feather="mic" class="w-4 h-4"></i>
|
| 389 |
+
</button>
|
| 390 |
+
</div>
|
| 391 |
+
</div>
|
| 392 |
+
|
| 393 |
+
<button id="send-button" class="p-2 rounded-full bg-primary-500 text-white hover:bg-primary-600 disabled:opacity-50 disabled:cursor-not-allowed">
|
| 394 |
+
<i data-feather="send" class="w-4 h-4"></i>
|
| 395 |
+
</button>
|
| 396 |
+
</div>
|
| 397 |
+
|
| 398 |
+
<div class="flex items-center justify-between mt-2 px-1">
|
| 399 |
+
<div class="flex space-x-1">
|
| 400 |
+
<button class="text-xs px-2 py-1 rounded-full bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 flex items-center">
|
| 401 |
+
<i data-feather="search" class="w-3 h-3 mr-1"></i>
|
| 402 |
+
<span>Research</span>
|
| 403 |
+
</button>
|
| 404 |
+
<button class="text-xs px-2 py-1 rounded-full bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 flex items-center">
|
| 405 |
+
<i data-feather="image" class="w-3 h-3 mr-1"></i>
|
| 406 |
+
<span>Image</span>
|
| 407 |
+
</button>
|
| 408 |
+
</div>
|
| 409 |
+
<div class="text-xs text-gray-500 dark:text-gray-400">
|
| 410 |
+
<span id="char-count">0</span>/2000
|
| 411 |
+
</div>
|
| 412 |
+
</div>
|
| 413 |
+
</div>
|
| 414 |
+
</main>
|
| 415 |
+
</div>
|
| 416 |
+
|
| 417 |
+
<script>
|
| 418 |
+
feather.replace();
|
| 419 |
+
|
| 420 |
+
// Auto-resize textarea
|
| 421 |
+
const textarea = document.getElementById('message-input');
|
| 422 |
+
textarea.addEventListener('input', function() {
|
| 423 |
+
this.style.height = 'auto';
|
| 424 |
+
this.style.height = (this.scrollHeight) + 'px';
|
| 425 |
+
|
| 426 |
+
// Update character count
|
| 427 |
+
document.getElementById('char-count').textContent = this.value.length;
|
| 428 |
+
});
|
| 429 |
+
|
| 430 |
+
// Toggle send button state
|
| 431 |
+
textarea.addEventListener('input', function() {
|
| 432 |
+
const sendButton = document.getElementById('send-button');
|
| 433 |
+
sendButton.disabled = this.value.trim().length === 0;
|
| 434 |
+
});
|
| 435 |
+
|
| 436 |
+
// Handle send message
|
| 437 |
+
document.getElementById('send-button').addEventListener('click', function() {
|
| 438 |
+
const message = textarea.value.trim();
|
| 439 |
+
if (message) {
|
| 440 |
+
// TODO: Send message logic
|
| 441 |
+
console.log('Sending:', message);
|
| 442 |
+
textarea.value = '';
|
| 443 |
+
textarea.style.height = 'auto';
|
| 444 |
+
document.getElementById('char-count').textContent = '0';
|
| 445 |
+
this.disabled = true;
|
| 446 |
+
}
|
| 447 |
+
});
|
| 448 |
+
|
| 449 |
+
// Handle Enter to send, Shift+Enter for newline
|
| 450 |
+
textarea.addEventListener('keydown', function(e) {
|
| 451 |
+
if (e.key === 'Enter' && !e.shiftKey) {
|
| 452 |
+
e.preventDefault();
|
| 453 |
+
document.getElementById('send-button').click();
|
| 454 |
+
}
|
| 455 |
+
});
|
| 456 |
+
|
| 457 |
+
// Toggle sidebar on mobile
|
| 458 |
+
document.getElementById('sidebar-toggle').addEventListener('click', function() {
|
| 459 |
+
document.getElementById('sidebar').classList.toggle('hidden');
|
| 460 |
+
});
|
| 461 |
+
|
| 462 |
+
// Toggle user menu
|
| 463 |
+
document.getElementById('user-menu-button').addEventListener('click', function() {
|
| 464 |
+
document.getElementById('user-menu').classList.toggle('hidden');
|
| 465 |
+
});
|
| 466 |
+
</script>
|
| 467 |
</body>
|
| 468 |
+
</html>
|