You didn't fix my shat input box is so positioned wrong and the menu button doesn't work its supposed to make the sidebar slide out so I can access it's feature
Browse files- index.html +22 -17
- instructions.html +47 -10
index.html
CHANGED
|
@@ -171,24 +171,23 @@
|
|
| 171 |
<p class="text-text-secondary">Welcome! I am QuantumSync AI. Below is a detailed summary of the key research and development milestones. Feel free to ask me to elaborate on any section.</p>
|
| 172 |
</div>
|
| 173 |
</div>
|
| 174 |
-
|
| 175 |
-
<div class="chat-input-
|
| 176 |
-
<
|
| 177 |
-
|
| 178 |
-
<
|
| 179 |
-
|
| 180 |
-
</button>
|
| 181 |
-
|
| 182 |
-
<input type="text" id="userInput" class="flex-grow border-none bg-transparent text-text text-base outline-none px-3" placeholder="Type your message...">
|
| 183 |
-
|
| 184 |
-
<button id="sendButton" class="input-button bg-gradient-to-r from-primary to-purple-600 rounded-full p-3">
|
| 185 |
-
<i data-feather="send"></i>
|
| 186 |
-
</button>
|
| 187 |
-
</div>
|
| 188 |
|
| 189 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
| 190 |
</div>
|
|
|
|
|
|
|
| 191 |
</div>
|
|
|
|
| 192 |
</main>
|
| 193 |
<!-- Activation Success Popup -->
|
| 194 |
<div id="activationPopup" class="fixed top-4 right-4 bg-green-600 text-white px-6 py-3 rounded-xl shadow-lg z-50 hidden">
|
|
@@ -334,7 +333,10 @@
|
|
| 334 |
sidebar.classList.toggle('-translate-x-full');
|
| 335 |
}
|
| 336 |
|
| 337 |
-
menuButton.addEventListener('click',
|
|
|
|
|
|
|
|
|
|
| 338 |
|
| 339 |
// Close sidebar when clicking outside on mobile
|
| 340 |
document.addEventListener('click', function(event) {
|
|
@@ -352,7 +354,10 @@
|
|
| 352 |
if (window.innerWidth >= 1024) {
|
| 353 |
sidebar.classList.remove('-translate-x-full');
|
| 354 |
} else {
|
| 355 |
-
sidebar.classList.
|
|
|
|
|
|
|
|
|
|
| 356 |
}
|
| 357 |
}
|
| 358 |
|
|
|
|
| 171 |
<p class="text-text-secondary">Welcome! I am QuantumSync AI. Below is a detailed summary of the key research and development milestones. Feel free to ask me to elaborate on any section.</p>
|
| 172 |
</div>
|
| 173 |
</div>
|
| 174 |
+
<div class="chat-input-container p-6 border-t border-gray-800 mt-auto">
|
| 175 |
+
<div class="chat-input-area flex items-center p-3 rounded-2xl bg-gray-900 border border-gray-800">
|
| 176 |
+
<input type="file" id="fileInput" class="hidden">
|
| 177 |
+
<button id="fileAttachment" class="input-button bg-transparent border-none cursor-pointer p-2">
|
| 178 |
+
<i data-feather="paperclip"></i>
|
| 179 |
+
</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
|
| 181 |
+
<input type="text" id="userInput" class="flex-grow border-none bg-transparent text-text text-base outline-none px-3" placeholder="Type your message...">
|
| 182 |
+
|
| 183 |
+
<button id="sendButton" class="input-button bg-gradient-to-r from-primary to-purple-600 rounded-full p-3">
|
| 184 |
+
<i data-feather="send"></i>
|
| 185 |
+
</button>
|
| 186 |
</div>
|
| 187 |
+
|
| 188 |
+
<div class="file-upload-info text-sm text-text-secondary mt-1 text-center h-4" id="fileUploadInfo"></div>
|
| 189 |
</div>
|
| 190 |
+
</div>
|
| 191 |
</main>
|
| 192 |
<!-- Activation Success Popup -->
|
| 193 |
<div id="activationPopup" class="fixed top-4 right-4 bg-green-600 text-white px-6 py-3 rounded-xl shadow-lg z-50 hidden">
|
|
|
|
| 333 |
sidebar.classList.toggle('-translate-x-full');
|
| 334 |
}
|
| 335 |
|
| 336 |
+
menuButton.addEventListener('click', function(e) {
|
| 337 |
+
e.stopPropagation();
|
| 338 |
+
toggleSidebar();
|
| 339 |
+
});
|
| 340 |
|
| 341 |
// Close sidebar when clicking outside on mobile
|
| 342 |
document.addEventListener('click', function(event) {
|
|
|
|
| 354 |
if (window.innerWidth >= 1024) {
|
| 355 |
sidebar.classList.remove('-translate-x-full');
|
| 356 |
} else {
|
| 357 |
+
if (!sidebar.classList.contains('-translate-x-full')) {
|
| 358 |
+
// Only close if it's not already closed
|
| 359 |
+
sidebar.classList.add('-translate-x-full');
|
| 360 |
+
}
|
| 361 |
}
|
| 362 |
}
|
| 363 |
|
instructions.html
CHANGED
|
@@ -75,10 +75,9 @@
|
|
| 75 |
</style>
|
| 76 |
</head>
|
| 77 |
<body class="bg-background text-text">
|
| 78 |
-
|
| 79 |
<!-- Sidebar -->
|
| 80 |
-
<div class="sidebar w-64 bg-sidebar flex flex-col p-3 border-r border-gray-800">
|
| 81 |
-
|
| 82 |
<span class="sidebar-title text-lg font-bold text-primary">History</span>
|
| 83 |
<button id="newChatButton" class="bg-gradient-to-r from-primary to-purple-600 border-none text-white px-4 py-2 rounded-xl cursor-pointer font-medium flex items-center gap-2 hover:shadow-lg transition-all duration-300">
|
| 84 |
<i data-feather="plus"></i>
|
|
@@ -109,13 +108,13 @@
|
|
| 109 |
<!-- Main Content -->
|
| 110 |
<main class="flex-grow flex flex-col h-screen overflow-y-auto">
|
| 111 |
<div class="chat-header sticky top-0 z-40 p-6 text-xl font-bold border-b border-gray-800 bg-surface flex items-center justify-between">
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
</div>
|
| 118 |
</div>
|
|
|
|
| 119 |
|
| 120 |
<div class="p-8 max-w-4xl mx-auto">
|
| 121 |
<div class="mb-8">
|
|
@@ -258,7 +257,45 @@
|
|
| 258 |
historyItem.textContent = item;
|
| 259 |
historyContainer.appendChild(historyItem);
|
| 260 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 261 |
});
|
| 262 |
-
|
| 263 |
</body>
|
| 264 |
</html>
|
|
|
|
| 75 |
</style>
|
| 76 |
</head>
|
| 77 |
<body class="bg-background text-text">
|
|
|
|
| 78 |
<!-- Sidebar -->
|
| 79 |
+
<div class="sidebar w-64 bg-sidebar flex flex-col p-3 border-r border-gray-800 lg:translate-x-0 -translate-x-full fixed lg:relative h-full transition-transform duration-300 z-50" id="sidebar">
|
| 80 |
+
<div class="sidebar-header flex items-center justify-between p-3 mb-5">
|
| 81 |
<span class="sidebar-title text-lg font-bold text-primary">History</span>
|
| 82 |
<button id="newChatButton" class="bg-gradient-to-r from-primary to-purple-600 border-none text-white px-4 py-2 rounded-xl cursor-pointer font-medium flex items-center gap-2 hover:shadow-lg transition-all duration-300">
|
| 83 |
<i data-feather="plus"></i>
|
|
|
|
| 108 |
<!-- Main Content -->
|
| 109 |
<main class="flex-grow flex flex-col h-screen overflow-y-auto">
|
| 110 |
<div class="chat-header sticky top-0 z-40 p-6 text-xl font-bold border-b border-gray-800 bg-surface flex items-center justify-between">
|
| 111 |
+
<div class="flex items-center gap-4">
|
| 112 |
+
<button id="menuButton" class="text-text-secondary hover:text-primary transition-colors duration-200">
|
| 113 |
+
<i data-feather="menu"></i>
|
| 114 |
+
</button>
|
| 115 |
+
<span>Instructions - QuantumSync AI</span>
|
|
|
|
| 116 |
</div>
|
| 117 |
+
</div>
|
| 118 |
|
| 119 |
<div class="p-8 max-w-4xl mx-auto">
|
| 120 |
<div class="mb-8">
|
|
|
|
| 257 |
historyItem.textContent = item;
|
| 258 |
historyContainer.appendChild(historyItem);
|
| 259 |
});
|
| 260 |
+
|
| 261 |
+
// Sidebar toggle functionality
|
| 262 |
+
const sidebar = document.getElementById('sidebar');
|
| 263 |
+
const menuButton = document.getElementById('menuButton');
|
| 264 |
+
|
| 265 |
+
function toggleSidebar() {
|
| 266 |
+
sidebar.classList.toggle('-translate-x-full');
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
menuButton.addEventListener('click', function(e) {
|
| 270 |
+
e.stopPropagation();
|
| 271 |
+
toggleSidebar();
|
| 272 |
+
});
|
| 273 |
+
|
| 274 |
+
// Close sidebar when clicking outside on mobile
|
| 275 |
+
document.addEventListener('click', function(event) {
|
| 276 |
+
if (window.innerWidth < 1024) {
|
| 277 |
+
const isClickInsideSidebar = sidebar.contains(event.target);
|
| 278 |
+
const isClickInsideMenuButton = menuButton.contains(event.target);
|
| 279 |
+
|
| 280 |
+
if (!isClickInsideSidebar && !isClickInsideMenuButton && !sidebar.classList.contains('-translate-x-full')) {
|
| 281 |
+
toggleSidebar();
|
| 282 |
+
}
|
| 283 |
+
});
|
| 284 |
+
|
| 285 |
+
// Responsive sidebar handling
|
| 286 |
+
function handleResize() {
|
| 287 |
+
if (window.innerWidth >= 1024) {
|
| 288 |
+
sidebar.classList.remove('-translate-x-full');
|
| 289 |
+
} else {
|
| 290 |
+
if (!sidebar.classList.contains('-translate-x-full')) {
|
| 291 |
+
sidebar.classList.add('-translate-x-full');
|
| 292 |
+
}
|
| 293 |
+
}
|
| 294 |
+
}
|
| 295 |
+
|
| 296 |
+
window.addEventListener('resize', handleResize);
|
| 297 |
+
handleResize(); // Initial check
|
| 298 |
});
|
| 299 |
+
</script>
|
| 300 |
</body>
|
| 301 |
</html>
|