implemented spaces, fixed login and signup, thought creation and space creation.

This commit is contained in:
2025-05-26 13:00:12 -06:00
parent 54a01f0f1f
commit d3fa1733f4
32 changed files with 1499 additions and 1132 deletions
+31 -12
View File
@@ -1,16 +1,35 @@
const nav = document.querySelector('nav');
const nav_links = nav.querySelectorAll('ul li a');
const theme_toggle = nav.querySelector('button');
const nav = document.querySelector("nav");
const nav_links = nav.querySelectorAll("ul li a");
const theme_toggle = nav.querySelector("button");
const back = document.querySelector("#backButton");
const links = document.querySelectorAll(".fillDiv");
nav_links.forEach((el) => {
el.addEventListener('click', () => {
if (back)
back.addEventListener("click", () => {
console.log("back");
history.back();
});
links.forEach((el) => {
el.addEventListener("click", () => {
el.preventDefault();
if ('startViewTransition' in document) {
document.startViewTransition(() => {
window.location.href = el.getAttribute('href');
});
} else {
window.location.href = el.getAttribute('href');
}
applyTransition(el.getAttribute("href"));
});
});
nav_links.forEach((el) => {
el.addEventListener("click", () => {
el.preventDefault();
applyTransition(el.getAttribute("href"));
});
});
function applyTransition(href) {
if ("startViewTransition" in document) {
document.startViewTransition(() => {
window.location.href = href;
});
} else {
window.location.href = href;
}
}