A highly polished, interactive greeting card application composed of a seamless two-part transition.
This repository allows you to host an immersive, customized digital birthday experience directly on Vercel or any static CDN. The project transitions elegantly between an animated profile reveal and an interactive "Universe" cake-cutting sequence.
This application is built strictly to be customizable via single sources of truth. You do not need to modify the complex source code or animation timelines manually.
All initial configurations, namings, texts, and photos are maintained within script/config.js.
-
Changing Target Name & Media: Open
script/config.jsand edit the Recipient Info block:name: "Person", // Changes the display name across elements photo: "./images/Person.JPG", // Main profile photo (e.g. Person.JPG) music: "./song/HBD.mp3", // Main background audio
-
Editing Section Texts:
script/config.jsstrictly orders the timeline of animations inside thesectionsarray.- You can rewrite the text inside
wishText,buttonText,text, orreplyTextvalues.
- You can rewrite the text inside
-
Color Themes: The
script/config.jsdefaults to alightcolor mode for eye comfort.defaultMode: "light" // "light" or "dark"
The final button of Part 1 transports the user to the interactive universe.html.
-
Modifying Media: The Universe loads four floating album photos (
1.JPGto4.JPG) and the primary audio file. Edit theirsrcvalues inuniverse.html:<img src="images/1.JPG" class="album-photo album-left-1">
-
Modifying the Core Message: Around line 400 of
universe.html, there is a<div class="row message">container where line-by-line typography scrolls up the screen. Adjust these text strings exactly as you want them to display. -
Balloons: The interactive balloon sequence is optimized for names up to 5 letters (8 balloons total: H-B-D + N-A-M-E). For longer names, you'll need to update the
vwoffsets inscript/effect.js.
The application functions as a static Multi-Page Application (MPA) consisting of two sequentially linked screens:
index.html: A module-driven animation timeline, relying heavily on dynamic script loading.universe.html: A DOM-heavy click sequence relying on synchronized jQuery.fadeToand.animate()callbacks.
-
GreenSock Automation Platform (GSAP):
- Part 1's engine (
script/main.js) compiles thescript/config.jsdeclarative sequence into an absolute synchronizedgsap.timeline(). - GSAP handles timing offsets (the
stagger: 1.2parameters), custom transforms, skews, and component exit lifecycles (fade-outs).
- Part 1's engine (
-
jQuery Engine (
script/effect.js):universe.htmldrives interaction by utilizing a centralized orchestrator built on jQuery.- It captures sequentially displayed
display: noneDOM targets and manually toggles transitions triggered by.custom-btninteraction IDs (#turn_on,#play,#bannar_coming,#cake_fadein, etc.).
-
LESS Compilation (in-browser):
- Generates and calculates the dimensions of the interactive birthday cake strictly via algorithmic calculations written in
style/cake.lessmapped to nativeless.jsoperations. - Note: To improve performance for huge scale viewers, consider pre-compiling
cake.lessto standard.css!
- Generates and calculates the dimensions of the interactive birthday cake strictly via algorithmic calculations written in
Both apps independently load standardized localized files:
images/: Houses scalable SVGs, animated.pngitems and standard photographs mapping directly to the DOM and CSSurl()macros.fonts/: Includes natively loadedtruetype/opentypeformats referenced dynamically from@font-facebindings.style/: Hosts modern Flexbox routines paired harmoniously with isolated Bootstrap 3.col-mdresponsive grids to gracefully layout the pages symmetrically on mobile hardware vs desktops.
The application is fully optimized for mobile devices (iOS/Android):
- Fluid Layouts: Text sizes and interactive elements automatically scale down to fit smaller screens.
- Dynamic Centering: The balloon sequence in
universe.htmlcalculates the optimal spacing (gap) based on the viewer's device width, keeping up to 8 balloons centered and visible even on narrow phones.
To test any modifications immediately:
python3 -m http.server 3000(from Python 3)- Open
http://localhost:3000
This site operates without build scripts. You can deploy it seamlessly on Vercel by selecting the repository and triggering a zero-config deployment. The main entry resolution handles everything autonomously.