This commit is contained in:
2025-05-01 14:42:12 -06:00
parent 693d11c506
commit bd59f428ba
13 changed files with 288 additions and 124 deletions
+16
View File
@@ -0,0 +1,16 @@
const nav = document.querySelector('nav');
const nav_links = nav.querySelectorAll('ul li a');
const theme_toggle = nav.querySelector('button');
nav_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');
}
});
});