LiamKhoaLe commited on
Commit
432e3dc
·
1 Parent(s): 081c109

Upd sidebar displayer

Browse files
Files changed (2) hide show
  1. static/css/styles.css +2 -2
  2. static/js/app.js +6 -3
static/css/styles.css CHANGED
@@ -91,7 +91,7 @@ body {
91
  display: flex;
92
  flex-direction: column;
93
  transition: transform var(--transition-normal);
94
- z-index: 1000;
95
  }
96
 
97
  .sidebar-header {
@@ -760,7 +760,7 @@ body {
760
  width: 300px;
761
  transform: translateX(-100%);
762
  transition: transform 0.3s ease;
763
- z-index: 1000;
764
  }
765
 
766
  .sidebar.show {
 
91
  display: flex;
92
  flex-direction: column;
93
  transition: transform var(--transition-normal);
94
+ z-index: 1001;
95
  }
96
 
97
  .sidebar-header {
 
760
  width: 300px;
761
  transform: translateX(-100%);
762
  transition: transform 0.3s ease;
763
+ z-index: 1001;
764
  }
765
 
766
  .sidebar.show {
static/js/app.js CHANGED
@@ -71,7 +71,7 @@ class MedicalChatbotApp {
71
  const sidebar = document.getElementById('sidebar');
72
  const isOpen = sidebar && sidebar.classList.contains('show');
73
  console.log('[DEBUG] Updating overlay - sidebar open:', isOpen);
74
- if (sidebar && overlay) {
75
  if (isOpen) {
76
  overlay.classList.add('show');
77
  console.log('[DEBUG] Overlay shown');
@@ -90,7 +90,10 @@ class MedicalChatbotApp {
90
  updateOverlay();
91
  };
92
 
93
- // Initialize overlay state
 
 
 
94
  updateOverlay();
95
 
96
  // Handle window resize for responsive behavior
@@ -1052,7 +1055,7 @@ How can I assist you today?`;
1052
  const data = await resp.json();
1053
  console.log('[DEBUG] Search results:', data);
1054
  renderSuggestions(data.results || []);
1055
- } else {
1056
  const errorText = await resp.text();
1057
  console.warn('Search request failed', resp.status, errorText);
1058
  }
 
71
  const sidebar = document.getElementById('sidebar');
72
  const isOpen = sidebar && sidebar.classList.contains('show');
73
  console.log('[DEBUG] Updating overlay - sidebar open:', isOpen);
74
+ if (overlay) {
75
  if (isOpen) {
76
  overlay.classList.add('show');
77
  console.log('[DEBUG] Overlay shown');
 
90
  updateOverlay();
91
  };
92
 
93
+ // Initialize overlay state - ensure it's hidden on startup
94
+ if (overlay) {
95
+ overlay.classList.remove('show');
96
+ }
97
  updateOverlay();
98
 
99
  // Handle window resize for responsive behavior
 
1055
  const data = await resp.json();
1056
  console.log('[DEBUG] Search results:', data);
1057
  renderSuggestions(data.results || []);
1058
+ } else {
1059
  const errorText = await resp.text();
1060
  console.warn('Search request failed', resp.status, errorText);
1061
  }