Beautiful birthday website with countdown, photo gallery, and celebration effects!
npm install
npm run devOpen http://localhost:5173
File: src/components/Countdown.jsx (Line 21)
const targetDate = new Date("2025-12-18T00:00:00");Format Explanation:
"YYYY-MM-DDTHH:MM:SS"
↓ ↓ ↓ ↓ ↓ ↓
Year Mo Day Hr Min Sec
- YYYY = 4-digit year (2025, 2026, etc.)
- MM = 2-digit month (01=Jan, 02=Feb, ... 12=Dec)
- DD = 2-digit day (01 to 31)
- T = Separator (keep this!)
- HH:MM:SS = Time in 24-hour format
Time Examples:
| What you want | Use this |
|---|---|
| Midnight (12:00 AM) | 00:00:00 |
| 9:00 AM | 09:00:00 |
| Noon (12:00 PM) | 12:00:00 |
| 3:30 PM | 15:30:00 |
| 11:59 PM | 23:59:00 |
Real Examples:
// January 15, 2026 at midnight
const targetDate = new Date("2026-01-15T00:00:00");
// June 10, 2025 at 3:30 PM
const targetDate = new Date("2025-06-10T15:30:00");
// December 25, 2025 at noon
const targetDate = new Date("2025-12-25T12:00:00");- ❌
2025-1-5→ ✅2025-01-05(always 2 digits) - ❌
2025/12/25→ ✅2025-12-25(use dashes, not slashes) - ❌ Missing T → ✅ Must have
Tbetween date and time
File: src/components/MessageCard.jsx (Lines 17-28)
const recipientName = "Divyanshi";
const senderName = "Ashmit";
const message = `Your message here...`;Add 6 photos to public/images/ named: pic1.jpg to pic6.jpg
Replace public/music.mp3 with your song
There's a special "��� Test Celebration" button on the countdown page that lets you skip the timer instantly!
What it does:
- ✅ Skips countdown timer
- ✅ Shows birthday celebration page immediately
- ✅ Lets you preview everything (confetti, message, gallery, music)
- ✅ Perfect for testing before the big day!
How to use:
- Save your changes (date, names, message, photos)
- Make sure
npm run devis running - Look at the countdown page
- Click the "��� Test Celebration" button below the timer
- Boom! ��� You'll see the full celebration instantly
Why use it:
- Test your message for typos
- Check if all 6 photos load correctly
- Verify music plays
- See confetti and animations
- Make sure everything looks perfect
IMPORTANT: Delete the test button before sharing the website with her!
File: src/components/Countdown.jsx
Lines to delete: 95-101
Look for this code and DELETE it:
{/* ⚠️ TEST BUTTON - delete it from here⚠️ */}
<button
className="test-button"
onClick={onBirthdayReached}
title="Skip countdown and see celebration"
>
��� Test Celebration
</button>
{/* ⚠️ END TEST BUTTON - DELETE UP TO HERE ⚠️ */}How to delete:
- Open
src/components/Countdown.jsx - Find lines 95-101 (they have the warning comments)
- Select all these lines
- Press Delete
- Save the file
Why remove it:
- She might accidentally click it
- Ruins the surprise of waiting for the countdown
- Makes the site look more professional
After testing with the test button, the countdown might stay on the celebration page even after refreshing. Here's how to reset it:
Step-by-step instructions:
-
Open Developer Tools:
- Press
F12on your keyboard - OR right-click anywhere on the page → click "Inspect"
- Press
-
Go to Storage Area:
- Click the "Application" tab (Chrome/Edge)
- OR click "Storage" tab (Firefox)
-
Find Local Storage:
- In the left sidebar, look for "Local Storage"
- Click the ▶ arrow to expand it
- Click on
http://localhost:5173
-
Delete the Data:
- You'll see a row with key:
birthdayReached - Right-click on it
- Click "Delete"
- You'll see a row with key:
-
Refresh the Page:
- Press
Ctrl + R(orCmd + Ron Mac) - The countdown should appear again!
- Press
Visual Guide:
Developer Tools (F12)
↓
Application/Storage Tab
↓
Local Storage → http://localhost:5173
↓
Right-click "birthdayReached" → Delete
↓
Refresh page (Ctrl + R)
When to do this:
- After clicking the test button and wanting to see the countdown again
- If the celebration page won't go back to countdown
- When testing multiple times during development
Before going live: Delete test button from Countdown.jsx (lines 95-101)
- Push to GitHub
- vercel.com → Import → Deploy
npm run build- netlify.com → Drag
distfolder
- Photos not showing? Check names (
pic1.jpg) and location (public/images/) - Music not playing? Named
music.mp3inpublic/folder, MP3 format only - Countdown stuck? See "Clear Browser Storage" section above
Made with ❤️