From 0b4bd1adae969b2edb245672007b23d0fbea61e0 Mon Sep 17 00:00:00 2001 From: bender Date: Fri, 20 Mar 2026 19:12:02 +0000 Subject: [PATCH 1/3] Add src/app/birthday/page.tsx --- src/app/birthday/page.tsx | 320 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 320 insertions(+) create mode 100644 src/app/birthday/page.tsx diff --git a/src/app/birthday/page.tsx b/src/app/birthday/page.tsx new file mode 100644 index 0000000..8f8037e --- /dev/null +++ b/src/app/birthday/page.tsx @@ -0,0 +1,320 @@ +"use client"; + +import { useEffect, useRef, useState } from "react"; +import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; +import NavbarLayoutFloatingInline from "@/components/navbar/NavbarLayoutFloatingInline"; + +export default function BirthdayPage() { + const [gameStarted, setGameStarted] = useState(false); + const [countdown, setCountdown] = useState(null); + const [showCelebration, setShowCelebration] = useState(false); + const audioRef = useRef(null); + const canvasRef = useRef(null); + + const startCountdown = () => { + setGameStarted(true); + setCountdown(3); + + // Play birthday song + if (audioRef.current) { + audioRef.current.play(); + } + }; + + useEffect(() => { + if (countdown === null || countdown < 0) return; + + if (countdown === 0) { + setShowCelebration(true); + triggerCelebration(); + return; + } + + const timer = setTimeout(() => { + setCountdown(countdown - 1); + }, 1000); + + return () => clearTimeout(timer); + }, [countdown]); + + const triggerCelebration = () => { + // Trigger cake animation and lighting effects + if (canvasRef.current) { + const ctx = canvasRef.current.getContext("2d"); + if (ctx) { + animateConfetti(ctx); + } + } + }; + + const animateConfetti = (ctx: CanvasRenderingContext2D) => { + const canvas = canvasRef.current; + if (!canvas) return; + + canvas.width = window.innerWidth; + canvas.height = window.innerHeight; + + const particles: Array<{ + x: number; + y: number; + vx: number; + vy: number; + life: number; + size: number; + color: string; + }> = []; + + // Create confetti particles + for (let i = 0; i < 100; i++) { + particles.push({ + x: Math.random() * canvas.width, + y: -10, + vx: (Math.random() - 0.5) * 8, + vy: Math.random() * 8 + 4, + life: 1, + size: Math.random() * 4 + 2, + color: `hsl(${Math.random() * 60 + 0}, 100%, 60%)` + }); + } + + const animate = () => { + ctx.clearRect(0, 0, canvas.width, canvas.height); + + for (let i = particles.length - 1; i >= 0; i--) { + const p = particles[i]; + p.x += p.vx; + p.y += p.vy; + p.vy += 0.2; // gravity + p.life -= 0.01; + + if (p.life <= 0) { + particles.splice(i, 1); + continue; + } + + ctx.fillStyle = p.color; + ctx.globalAlpha = p.life; + ctx.fillRect(p.x, p.y, p.size, p.size); + } + + ctx.globalAlpha = 1; + if (particles.length > 0) { + requestAnimationFrame(animate); + } + }; + + animate(); + }; + + return ( + + + + + +
+ {/* Lighting effects background */} +
+ + {/* Main content */} +
+ {!gameStarted ? ( + <> +

+ Happy Birthday Papa 47th Birthday +

+ +

+ Let's celebrate 40 seconds of pure joy! +

+ + + + ) : countdown !== null && countdown >= 0 ? ( +
+
+ {countdown} +
+

+ Get ready to celebrate! +

+
+ ) : showCelebration ? ( + <> +

+ šŸŽ‚ HAPPY BIRTHDAY PAPA! šŸŽ‚ +

+ +
+ 47 Years of Celebration! +
+ + {/* Cake animation */} +
+
+ šŸŽ‚ +
+
+ +
+ +
+ + ) : null} +
+
+ + {/* Birthday song audio */} +
+
+
+ {/* Book Cover Design */} +
+ {/* Stickers decoration */} +
šŸŽ‰
+
šŸ’
+
⭐
+ + {currentBookPage.isClosing ? ( +
+

Thank You, Papa

+

{currentBookPage.subtitle}

+
+ {currentBookPage.poem} +
+
+ ) : currentBookPage.fullPageImage ? ( +
+ Full page +

{currentBookPage.content}

+
+ ) : ( +
+

{currentBookPage.title}

+

{currentBookPage.subtitle}

+
+ {currentBookPage.images?.map((img, idx) => ( + {`Page + ))} +
+
+ )} +
+ + {/* Page Navigation */} +
+ + +
+

Patel Family

+

Page {currentPage + 1} of {bookPages.length}

+
+ + +
+ + {/* Page Indicators */} +
+ {bookPages.map((_, idx) => ( +
+
+
+
Date: Fri, 20 Mar 2026 19:12:03 +0000 Subject: [PATCH 3/3] Update src/app/styles/variables.css --- src/app/styles/variables.css | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/styles/variables.css b/src/app/styles/variables.css index b7afc67..9822d70 100644 --- a/src/app/styles/variables.css +++ b/src/app/styles/variables.css @@ -10,15 +10,15 @@ --accent: #ffffff; --background-accent: #ffffff; */ - --background: #f5f4ef; - --card: #dad6cd; - --foreground: #2a2928; - --primary-cta: #2a2928; + --background: #0a0a0a; + --card: #1a1a1a; + --foreground: #ffffffe6; + --primary-cta: #FFD700; --primary-cta-text: #f5f4ef; - --secondary-cta: #ecebea; + --secondary-cta: #1a1a1a; --secondary-cta-text: #2a2928; - --accent: #ffffff; - --background-accent: #c6b180; + --accent: #FF69B4; + --background-accent: #00BFFF; /* text sizing - set by ThemeProvider */ /* --text-2xs: clamp(0.465rem, 0.62vw, 0.62rem); -- 2.49.1