merge with Xamora

This commit is contained in:
2024-01-08 20:39:06 +01:00
18 changed files with 191 additions and 27 deletions

View File

@ -1,10 +0,0 @@
body {
margin: 0.5em;
font-family: 'Quicksand', sans-serif;
font-size: 30px;
}
a {
color: #009579;
}

View File

@ -109,10 +109,15 @@ document.addEventListener("DOMContentLoaded", () => {
document.body.addEventListener("click", e => {
if (e.target.matches("[data-link]")) {
e.preventDefault();
document.querySelectorAll('[data-link]').forEach(e => {
e.classList.remove('active');
});
e.target.classList.add('active');
navigateTo(e.target.href.slice(location.origin.length));
}
});
router(location.pathname);
document.querySelector('a[href=\'' + location.pathname + '\']')?.classList.add('active');
});
export { client, navigateTo }