Spaces:
Running
Running
add a collapsed menu icon here to allow the nav bar to be optional
Browse files- index.html +18 -0
index.html
CHANGED
|
@@ -696,6 +696,24 @@ el: "#vanta-bg",
|
|
| 696 |
backgroundColor: 0x0,
|
| 697 |
size: 0.8
|
| 698 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 699 |
|
| 700 |
// Feather icons
|
| 701 |
feather.replace();
|
|
|
|
| 696 |
backgroundColor: 0x0,
|
| 697 |
size: 0.8
|
| 698 |
});
|
| 699 |
+
// Sidebar toggle functionality
|
| 700 |
+
const sidebar = document.getElementById('sidebar');
|
| 701 |
+
const toggleBtn = document.getElementById('toggle-sidebar');
|
| 702 |
+
|
| 703 |
+
toggleBtn.addEventListener('click', () => {
|
| 704 |
+
sidebar.classList.toggle('w-16');
|
| 705 |
+
sidebar.classList.toggle('w-64');
|
| 706 |
+
|
| 707 |
+
if (sidebar.classList.contains('w-16')) {
|
| 708 |
+
feather.replace();
|
| 709 |
+
toggleBtn.innerHTML = '<i data-feather="chevron-right" class="w-5 h-5"></i>';
|
| 710 |
+
feather.replace();
|
| 711 |
+
} else {
|
| 712 |
+
feather.replace();
|
| 713 |
+
toggleBtn.innerHTML = '<i data-feather="chevron-left" class="w-5 h-5"></i>';
|
| 714 |
+
feather.replace();
|
| 715 |
+
}
|
| 716 |
+
});
|
| 717 |
|
| 718 |
// Feather icons
|
| 719 |
feather.replace();
|