An interactive web experience combining beautiful winter animations with a photo gallery and romantic message popup.
- ✅ Interactive Gift Box - Animated opening sequence
- ✅ Winter Scene Animation - Snowmen, penguins, houses, ski lift with falling snow
- ✅ 5 Zoom Areas - Interactive areas that can be zoomed and explored
- ✅ Photo Gallery per Area - Each zoom area opens a popup with 1-2 photos
- ✅ Full Photo Gallery - View all 9 photos in a beautiful slideshow
- ✅ Romantic Message - Typing animation with fireworks background
- ✅ Background Music - Toggle music on/off
- ✅ Keyboard Navigation - Arrow keys and ESC support
- ✅ Mobile Responsive - Works on desktop and mobile devices
- 🏠 Houses (overHouses) → 2 photos - Cozy Moments
- ⛄ Snowmen (overSnowmen) → 2 photos - Fun Winter Times
- 🐧 Penguins (overPenguins) → 2 photos - Cute Moments
- 🎄 Hanging Decorations (overHanging) → 2 photos - Celebrations
- 🎿 Ski Lift (overSkilift) → 1 photo - Adventures
Total: 9 photos
Happy-New-Year-Animation-2024-main/
├── index.html # Main HTML file with winter scene SVG
├── script.js # JavaScript (animations + gallery + message)
├── style.css # Base styles for winter scene
├── extended-styles.css # Extended styles for modals & galleries
├── photos/ # Photo gallery (9 images)
│ ├── mmexport1756921379319.jpg
│ ├── mmexport1756921383685.jpg
│ ├── mmexport1757149087590.jpg
│ ├── mmexport1757864866354.jpg
│ ├── mmexport1759585310212.jpg
│ ├── mmexport1759585341258.jpg
│ ├── mmexport1759585352253.jpg
│ ├── mmexport1759585380714.jpg
│ └── mmexport1767183481212.jpg (NEW!)
├── images/ # GIF stickers (5 files)
├── music/ # Background music
│ └── Ed Sheeran - Perfect (Official Music Video).mp3
├── README.md # This file
└── UPDATED-FEATURES.txt # Quick reference guide
- Open
index.htmlin a modern browser (Chrome, Firefox, Edge) - Click the gift box to start the experience
- Wait for the winter scene to load (~2 seconds)
- Two buttons will appear at the bottom
- Hover over green overlay areas to see zoom hints
- Click an area to zoom in
- Photo popup automatically appears after zoom
- Click the scene again to zoom out
- Navigate photos with arrow keys or navigation buttons
- Press ESC to close popups
File: script.js (lines ~618)
Find initSpecialMessage() function and edit these variables:
var m1='<b>Your Title</b><br><br>Your opening message...';
var m2='Your continued message...';
var m3='Your closing message...';File: script.js (lines ~580-586)
var photosByArea = {
houses: [
{src:'photos/YOUR_PHOTO.jpg', caption:'Your Caption'},
],
};- Add new photos to
photos/folder - Update paths in
photosByAreaobject - Update full gallery HTML in index.html
Changes made:
index.htmlline 5: Updated title to "Happy New Year 2025-2026 - Our Memories 💕"index.htmlline 3845: Updated gallery header to "Our Precious Memories 2025 💕"index.htmllines 3629-3632: Added visible text overlay on gift screen with "Happy New Year 2025-2026! 🎉"extended-styles.csslines 12-42: Added.gift-infostyling with floating animation
Changes made in extended-styles.css:
- Line 217: Changed
object-fit: cover→object-fit: contain(prevents cropping) - Line 216: Increased
max-height: 350px→max-height: 400px(shows more of image) - Line 220: Reduced
padding: 15px 15px 50px 15px→padding: 10px 10px 40px 10px(less wasted space) - Line 195: Increased
.gallery-wrapper height: 450px→height: 500px(more room for photos)
Result: All photos now display fully without important parts being cut off
Changes made:
- New Photo Added:
mmexport1767183481212.jpg- "Natural Beauty 🌸"- Added to Full Gallery (position 8, after "Island Escape")
- Added to Hanging Decorations area (now has 2 photos)
- Updated in both
index.htmlandscript.js
- Music Updated: Changed to "Ed Sheeran - Perfect (Official Music Video).mp3"
- Updated audio source in
index.htmlline 3818
- Updated audio source in
- Romantic Message Updated: Changed year 2025 → 2026, added personalized prayers (full English)
- Message 1: Introduction (updated year to 2026)
- Message 2: Combined prayer - for success, support, happiness, and togetherness (single "I pray" statement)
- Message 3: Closing with Happy New Year
- Updated in
script.jsline 629
- Mobile Responsive: Added gift-info text sizing for mobile devices
- Desktop: 48px → Mobile: 28px for better readability
- Updated in
extended-styles.csslines 424-431
Result: Total photos: 8 → 9, all areas balanced, romantic music & personalized message added
- Add photo preloading for smoother experience
- Optimize image sizes for faster loading
- Add loading indicator
- Mobile touch gesture support
- GSAP (TweenMax) - Animation library
- TypeIt - Typing animation for messages
- ✅ Chrome 90+
- ✅ Firefox 88+
- ✅ Edge 90+
- ✅ Safari 14+
Original (Winter Scene):
init()- Initialize sceneopenBox()- Gift box animationzoomViewBox(e)- Zoom into areasunZoom()- Zoom out
Extended (New Features):
openAreaGallery(areaId)- Open photo popupopenFullGallery()- Open full galleryopenSpecialMessage()- Show message popupstartFireworks()- Fireworks animationtoggleMusic()- Music control
| Class | Purpose |
|---|---|
.photo-slide |
Individual photo container |
.modal |
Photo popup |
.full-gallery |
Full gallery view |
.special-message |
Message popup |
.scene-buttons |
Action buttons |
Music doesn't play:
- Browser blocks autoplay - click toggle button manually
Photos not loading:
- Check file paths match actual filenames
- Paths are case-sensitive
Zoom doesn't work:
- Check console for errors
- Refresh page
| Task | File | Location |
|---|---|---|
| Change message | script.js | Line ~618 |
| Update captions | script.js | Line ~580-586 |
| Fix photo crop | extended-styles.css | Line ~180-220 |
| Change years | index.html | Search "2024" |
| Update titles | script.js | Line ~587 |
Version: 2.4 Last Updated: December 31, 2024 Status: ✅ Fully Functional (all priority fixes completed)
🎉 Happy New Year 2025-2026! 💕