A beautiful, romantic, and interactive anniversary gift website built with HTML, Tailwind CSS, and vanilla JavaScript.
- Elegant design with animated gradients and floating particles
- Password-protected access (default passwords: "Adi", "2004", "Iloveyouadi")
- Gentle error messages with helpful hints
- Smooth transitions and glassmorphism effects
- Sliding tile puzzle with your custom image
- Tap/click two tiles to swap them
- Real-time progress tracking
- Beautiful completion animation
- Mobile and desktop friendly
- Heartfelt anniversary message
- Elegant typography with Dancing Script and Playfair Display fonts
- Animated text reveal effects
- Decorative borders and gradients
- Personal and emotional tone
- 6 beautifully designed memory cards
- Hover effects and smooth transitions
- Modal popups with detailed captions
- Responsive masonry-style layout
- Each memory with custom emoji and gradient
- Grand finale with animated hearts
- Floating heart particles
- Music toggle functionality (ready for your song)
- Beautiful quote and anniversary message
- Pulsing animations and effects
- Color Palette: Romantic pink, rose, and red gradients
- Typography:
- Dancing Script for romantic headings
- Playfair Display for elegant titles
- Poppins for clean body text
- Effects:
- Glassmorphism (frosted glass effect)
- Blob animations
- Floating particles
- Smooth transitions
- Hover interactions
- Responsive: Mobile-first design, works on all devices
- Choose your photo - Pick a nice, clear photo of you and your girlfriend
- Rename it to
puzzle-image.jpg - Place it in the same folder as
index.html - Open the website - The puzzle will automatically use your image!
anniversary-website/
├── index.html
├── styles.css
├── script.js
├── puzzle-image.jpg ← YOUR IMAGE HERE
└── README.md
If you want to keep your original filename:
- Open
index.htmlin a text editor - Find this line (near the bottom):
<img id="puzzleSourceImage" src="puzzle-image.jpg" alt="Puzzle Image" style="display: none;">- Replace
puzzle-image.jpgwith your filename:
<img id="puzzleSourceImage" src="my-photo.png" alt="Puzzle Image" style="display: none;">- Save and refresh the website!
- Upload your image to a free image hosting service (imgur.com, etc.)
- Get the direct image URL
- In
index.html, update the src:
<img id="puzzleSourceImage" src="https://i.imgur.com/yourimage.jpg" alt="Puzzle Image" style="display: none;">- Clear, high-quality photos
- Good lighting and contrast
- Recognizable faces/subjects
- Square or nearly square (1:1 ratio)
- Minimum 600x600 pixels
- JPG or PNG format
- Blurry or dark photos
- Very small images (will be pixelated)
- Images with too much detail (hard to solve)
- Photos with white/plain backgrounds (boring puzzle)
Supported formats:
- ✅ JPG / JPEG
- ✅ PNG
- ✅ WebP
- ✅ GIF (first frame)
- Check the filename - Make sure it's exactly
puzzle-image.jpg(case-sensitive on some systems) - Check the location - Image must be in the same folder as index.html
- Check file format - Use JPG, PNG, or WebP
- Try renaming - Remove any spaces or special characters from filename
- This means your image wasn't found
- The website defaults to a heart placeholder
- Double-check steps above
- The code automatically fits your image into a square
- For best results, use a square photo (1:1 ratio)
- Or crop your photo to square before uploading
- Choose a meaningful photo - First date, special moment, favorite memory
- Edit the photo first - Add text overlay like "Us ❤️" or a date
- Perfect the crop - Zoom in on faces for emotional impact
- Test the difficulty - Too detailed = too hard, too simple = too easy
Want to change puzzle difficulty?
In script.js, find:
const CONFIG = {
validPasswords: [...],
floatingHeartInterval: 800,
floatingHeartDuration: 8000,
particleCount: 20,
puzzleSize: 3 ← Change this number!
};puzzleSize: 3= 3x3 grid (9 pieces) - EASYpuzzleSize: 4= 4x4 grid (16 pieces) - MEDIUMpuzzleSize: 5= 5x5 grid (25 pieces) - HARD
Before launching:
- Image saved as
puzzle-image.jpg - Image in same folder as
index.html - Image is clear and good quality
- Image is at least 600x600px
- Tested by opening
index.htmlin browser - Puzzle loads and looks good
- Successfully solved puzzle once
- Select photo from your phone/computer
- Open in photo editor (even built-in tools work)
- Crop to square (1:1 ratio)
- Resize if needed (at least 600x600px)
- Save as
puzzle-image.jpg - Move to website folder
- Open index.html
- Test the puzzle!
If the image still doesn't work:
- Open browser console (F12 or right-click → Inspect → Console)
- Look for error messages
- Common issues:
- "Failed to load resource" = Wrong filename or location
- "CORS error" = Use a local file, not a web URL
- "Invalid image" = File is corrupted or wrong format
Remember: The website automatically handles:
- ✅ Resizing your image to fit
- ✅ Centering the image
- ✅ Creating the puzzle pieces
- ✅ Making it playable
You just need to provide a good photo! 💕
Happy puzzling! 🧩❤️
- Download all files to a folder on your computer
- Open
index.htmlin any modern web browser - Enter password (try "Adi", "2004", or "Iloveyouadi")
- Enjoy the experience!
Edit script.js, line 6:
const CONFIG = {
validPasswords: ['adi', 'Adi', '2004', 'iloveyouadi', 'Iloveyouadi'],
// Add or change passwords here
};-
Option 1: Use the placeholder (current setup)
- The default heart image is automatically generated
-
Option 2: Use your own image
- In
script.js, find thecreatePlaceholderImage()function (around line 193) - Replace it with:
- In
function createPlaceholderImage() {
// Simply return your image URL
return 'path/to/your/image.jpg';
}Edit index.html, find the "Love Letter" section (around line 154):
<p class="fade-in" style="animation-delay: 0.3s;">
Your personalized message here...
</p>Change the text in each paragraph to make it more personal.
Edit script.js, find the memories array (around line 24):
const memories = [
{
title: "Your Title",
caption: "Your personal message here...",
emoji: "📸",
color: "from-pink-300 via-rose-300 to-pink-400"
},
// Add more memories...
];In index.html, find each gallery card (starting around line 253) and replace:
<div class="relative aspect-square bg-gradient-to-br from-pink-300 via-rose-300 to-pink-400 flex items-center justify-center overflow-hidden">
<span class="text-8xl group-hover:scale-125 transition-transform duration-500">📸</span>
</div>With:
<div class="relative aspect-square overflow-hidden">
<img src="path/to/your/photo.jpg" alt="Memory" class="w-full h-full object-cover group-hover:scale-110 transition-transform duration-500">
</div>- Add your audio file to the project folder
- In
index.html, add before closing</body>tag:
<audio id="backgroundMusic" loop>
<source src="your-song.mp3" type="audio/mpeg">
</audio>- In
script.js, update thetoggleMusic()function (around line 554):
function toggleMusic() {
const button = document.getElementById('musicButton');
const audio = document.getElementById('backgroundMusic');
if (!button || !audio) return;
state.musicPlaying = !state.musicPlaying;
if (state.musicPlaying) {
audio.play();
button.innerHTML = `
<span class="text-2xl">⏸️</span>
Pause Our Song
`;
button.classList.add('pulse-slow');
} else {
audio.pause();
button.innerHTML = `
<span class="text-2xl">🎵</span>
Play Our Song
`;
button.classList.remove('pulse-slow');
}
}Edit index.html, find the "Final Surprise" section (around line 430):
<p class="fade-in">
Your personalized anniversary message here...
</p>To change the color scheme, update these CSS variables in styles.css:
Current palette uses:
- Pink:
#ec4899 - Rose:
#f43f5e - Red:
#fb7185
Find and replace these hex codes throughout the files with your preferred colors.
- ✅ Chrome (recommended)
- ✅ Firefox
- ✅ Safari
- ✅ Edge
- ✅ Mobile browsers
The website is fully responsive and optimized for:
- Mobile phones (portrait and landscape)
- Tablets
- Desktop computers
- Large displays
- Use headphones for the music feature
- Full screen mode for immersive experience
- Good internet for smooth animations
- Modern browser for best compatibility
- Privacy mode to keep it secret until ready
- Save all files in a folder
- Open
index.htmlwhen ready - Let her explore at her own pace
- Upload to GitHub Pages, Netlify, or Vercel
- Share the link
- She can access from anywhere
- Save everything on a USB drive
- Include a note with instructions
- Make it a physical gift too!
Images not showing?
- Check file paths are correct
- Ensure images are in the same folder or correct subfolder
Animations not smooth?
- Clear browser cache
- Try a different browser
- Check internet connection
Password not working?
- Check for typos
- Passwords are case-sensitive
- Verify in
script.jsCONFIG
Music not playing?
- Check audio file path
- Ensure browser allows autoplay
- Try clicking play button again
This is a personal gift project. Feel free to use and customize for your own romantic purposes! ❤️
This website was crafted with love and attention to detail. Every animation, every color, every word was chosen to create a memorable experience.
Make it your own by:
- Adding personal photos
- Writing heartfelt messages
- Including inside jokes
- Adding your special song
- Customizing colors to her favorites
Remember: The most important part is the love and thought you put into it! 💕
Made with ❤️ for someone special
Happy Anniversary! 🎉