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! π