Spaces:
Running
Running
there is no way to make the side panel expand again if minimized
Browse files- index.html +13 -10
index.html
CHANGED
|
@@ -53,7 +53,7 @@
|
|
| 53 |
<button id="toggle-filesystem" class="p-1 rounded hover:bg-gray-700">
|
| 54 |
<i data-feather="chevron-left"></i>
|
| 55 |
</button>
|
| 56 |
-
|
| 57 |
<div class="p-2">
|
| 58 |
<button class="w-full flex items-center gap-2 p-2 rounded hover:bg-gray-700 text-primary-300">
|
| 59 |
<i data-feather="plus" class="w-4 h-4"></i>
|
|
@@ -202,20 +202,23 @@
|
|
| 202 |
`;
|
| 203 |
}
|
| 204 |
}
|
| 205 |
-
|
| 206 |
// Panel toggle functionality
|
| 207 |
document.getElementById('toggle-filesystem').addEventListener('click', function() {
|
| 208 |
const panel = document.getElementById('filesystem-panel');
|
| 209 |
-
panel.classList.
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
panel.classList.
|
| 214 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 215 |
feather.replace();
|
| 216 |
});
|
| 217 |
-
|
| 218 |
-
// Mobile menu toggle
|
| 219 |
document.getElementById('mobile-menu').addEventListener('click', function() {
|
| 220 |
const panel = document.getElementById('filesystem-panel');
|
| 221 |
panel.classList.toggle('hidden');
|
|
|
|
| 53 |
<button id="toggle-filesystem" class="p-1 rounded hover:bg-gray-700">
|
| 54 |
<i data-feather="chevron-left"></i>
|
| 55 |
</button>
|
| 56 |
+
</div>
|
| 57 |
<div class="p-2">
|
| 58 |
<button class="w-full flex items-center gap-2 p-2 rounded hover:bg-gray-700 text-primary-300">
|
| 59 |
<i data-feather="plus" class="w-4 h-4"></i>
|
|
|
|
| 202 |
`;
|
| 203 |
}
|
| 204 |
}
|
|
|
|
| 205 |
// Panel toggle functionality
|
| 206 |
document.getElementById('toggle-filesystem').addEventListener('click', function() {
|
| 207 |
const panel = document.getElementById('filesystem-panel');
|
| 208 |
+
const isExpanded = panel.classList.contains('w-64');
|
| 209 |
+
|
| 210 |
+
if (isExpanded) {
|
| 211 |
+
panel.classList.remove('w-64');
|
| 212 |
+
panel.classList.add('w-0', 'overflow-hidden');
|
| 213 |
+
this.querySelector('i').setAttribute('data-feather', 'chevron-right');
|
| 214 |
+
} else {
|
| 215 |
+
panel.classList.remove('w-0', 'overflow-hidden');
|
| 216 |
+
panel.classList.add('w-64');
|
| 217 |
+
this.querySelector('i').setAttribute('data-feather', 'chevron-left');
|
| 218 |
+
}
|
| 219 |
feather.replace();
|
| 220 |
});
|
| 221 |
+
// Mobile menu toggle
|
|
|
|
| 222 |
document.getElementById('mobile-menu').addEventListener('click', function() {
|
| 223 |
const panel = document.getElementById('filesystem-panel');
|
| 224 |
panel.classList.toggle('hidden');
|