initial commit

This commit is contained in:
Zastian Pretorius
2024-05-08 13:55:26 +01:00
commit c31b86fa01
12 changed files with 2118 additions and 0 deletions

20
public/pages/sidebar.js Normal file
View File

@@ -0,0 +1,20 @@
function toggleSidebar() {
const sidebar = document.getElementById('sidebar');
const toggleBtn = document.getElementById('toggle-btn');
const content = document.getElementById('content');
sidebar.classList.toggle('collapsed');
toggleBtn.classList.toggle('collapsed');
content.classList.toggle('collapsed');
}
function loadSidebar() {
const xhr = new XMLHttpRequest();
xhr.open('GET', '/pages/sidebar.html', true);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
document.getElementById('sidebar').innerHTML = xhr.responseText;
}
};
xhr.send();
}