nixaut-codelabs commited on
Commit
112f534
·
verified ·
1 Parent(s): 375ed66

fix sidebar in the left

Browse files
Files changed (4) hide show
  1. components/sidebar.js +0 -1
  2. index.html +1 -1
  3. script.js +2 -5
  4. style.css +5 -3
components/sidebar.js CHANGED
@@ -4,7 +4,6 @@ class CustomSidebar extends HTMLElement {
4
  super();
5
  this.attachShadow({ mode: 'open' });
6
  }
7
-
8
  connectedCallback() {
9
  this.shadowRoot.innerHTML = `
10
  <style>
 
4
  super();
5
  this.attachShadow({ mode: 'open' });
6
  }
 
7
  connectedCallback() {
8
  this.shadowRoot.innerHTML = `
9
  <style>
index.html CHANGED
@@ -64,7 +64,7 @@
64
  <custom-sidebar></custom-sidebar>
65
  <!-- Chat Container -->
66
  <div class="flex-1 flex bg-zinc-950 relative overflow-hidden" style="margin-left: 260px;">
67
- <!-- Chat Section -->
68
  <div class="flex-1 flex flex-col relative overflow-hidden max-h-screen">
69
  <!-- Messages Container -->
70
  <div id="chatContainer" class="flex-1 overflow-y-auto scroll-smooth p-4 space-y-4" style="scrollbar-width: thin; scrollbar-color: #525252 #18181b;">
 
64
  <custom-sidebar></custom-sidebar>
65
  <!-- Chat Container -->
66
  <div class="flex-1 flex bg-zinc-950 relative overflow-hidden" style="margin-left: 260px;">
67
+ <!-- Chat Section -->
68
  <div class="flex-1 flex flex-col relative overflow-hidden max-h-screen">
69
  <!-- Messages Container -->
70
  <div id="chatContainer" class="flex-1 overflow-y-auto scroll-smooth p-4 space-y-4" style="scrollbar-width: thin; scrollbar-color: #525252 #18181b;">
script.js CHANGED
@@ -64,13 +64,10 @@ function setupEventListeners() {
64
  });
65
  }
66
  function initializeSidebarToggle() {
67
- // Sidebar is now fixed - no toggle functionality needed
68
- console.log('Sidebar is fixed in position');
69
  }
70
-
71
  function toggleSidebar() {
72
- // Sidebar is now fixed - no toggle functionality
73
- console.log('Sidebar cannot be toggled - it is fixed');
74
  }
75
  function sendMessage() {
76
  const input = document.getElementById('messageInput');
 
64
  });
65
  }
66
  function initializeSidebarToggle() {
67
+ console.log('Sidebar is fixed on the left side');
 
68
  }
 
69
  function toggleSidebar() {
70
+ console.log('Sidebar is fixed on the left side');
 
71
  }
72
  function sendMessage() {
73
  const input = document.getElementById('messageInput');
style.css CHANGED
@@ -223,7 +223,7 @@ body {
223
  overflow: hidden;
224
  max-height: 100vh;
225
  }
226
- /* Fixed sidebar layout - no transitions needed */
227
  custom-sidebar {
228
  position: fixed !important;
229
  left: 0;
@@ -237,9 +237,10 @@ custom-sidebar {
237
  width: calc(100% - 260px);
238
  position: relative;
239
  }
240
- /* Remove sidebar transition for fixed layout */
241
  .sidebar {
242
- transition: none;
 
243
  }
244
 
245
  .sidebar * {
@@ -250,6 +251,7 @@ custom-sidebar {
250
  /* Sidebar Transitions */
251
  .sidebar {
252
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
 
253
  }
254
 
255
  .sidebar * {
 
223
  overflow: hidden;
224
  max-height: 100vh;
225
  }
226
+ /* Fixed sidebar layout */
227
  custom-sidebar {
228
  position: fixed !important;
229
  left: 0;
 
237
  width: calc(100% - 260px);
238
  position: relative;
239
  }
240
+ /* Fixed sidebar - no transitions */
241
  .sidebar {
242
+ transition: none !important;
243
+ position: fixed !important;
244
  }
245
 
246
  .sidebar * {
 
251
  /* Sidebar Transitions */
252
  .sidebar {
253
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
254
+ position: fixed !important;
255
  }
256
 
257
  .sidebar * {