mirror of
https://codeberg.org/vlw/vlw.se.git
synced 2025-09-14 05:13:46 +02:00
16 lines
No EOL
538 B
JavaScript
Executable file
16 lines
No EOL
538 B
JavaScript
Executable file
new vv.Interactions("document");
|
|
|
|
const mainElement = document.querySelector(vv._env.MAIN);
|
|
|
|
// Crossfade pages on navigation
|
|
// Or maybe I shouldn't... hmmm
|
|
mainElement.addEventListener(vv.Navigation.events.LOADING, () => {
|
|
mainElement.classList.add("loading");
|
|
});
|
|
|
|
mainElement.addEventListener(vv.Navigation.events.LOADED, () => {
|
|
[...document.querySelectorAll("dialog")].forEach(element => element.close())
|
|
|
|
// Wait 200ms for the page fade-in animation to finish
|
|
setTimeout(() => mainElement.classList.remove("loading"), 200);
|
|
}); |