mirror of
https://github.com/Xevion/Pac-Man.git
synced 2026-01-31 06:25:09 -06:00
feat(web): redesign navigation with centered logo and smooth page transitions
- Replace sidebar nav with centered header featuring PAC-MAN title - Add glimmer animation effect for non-active logo state - Implement 200ms fade transitions between pages - Add custom scrollbar styling with OverlayScrollbars - Switch to Russo One font for title, Outfit for body text
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import type { OnPageTransitionStartAsync } from "vike/types";
|
||||
import { getPacmanWindow } from "@/lib/pacman";
|
||||
|
||||
const TRANSITION_DURATION = 200;
|
||||
|
||||
export const onPageTransitionStart: OnPageTransitionStartAsync = async () => {
|
||||
console.log("Page transition start");
|
||||
document.querySelector("body")?.classList.add("page-is-transitioning");
|
||||
@@ -11,4 +13,7 @@ export const onPageTransitionStart: OnPageTransitionStartAsync = async () => {
|
||||
console.log("Stopping game loop for page transition");
|
||||
win.Module._stop_game();
|
||||
}
|
||||
|
||||
// Wait for fade-out animation to complete before page content changes
|
||||
await new Promise((resolve) => setTimeout(resolve, TRANSITION_DURATION));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user