A fun Christmas project that replaces paper gift tags with NFC tags. Each tag opens a personalized URL that plays a gift-opening animation, then reveals a random photo of the recipient.
| Recipient | URL |
|---|---|
| Jacoby | https://bakeb7j0.github.io/xmas-2025/gift.html?person=jacoby |
| Jason | https://bakeb7j0.github.io/xmas-2025/gift.html?person=jason |
| Jenna | https://bakeb7j0.github.io/xmas-2025/gift.html?person=jenna |
| Kat | https://bakeb7j0.github.io/xmas-2025/gift.html?person=kat |
| Lisa | https://bakeb7j0.github.io/xmas-2025/gift.html?person=lisa |
| Ricky | https://bakeb7j0.github.io/xmas-2025/gift.html?person=ricky |
When a recipient taps an NFC tag on their phone:
The experience is designed to be delightful, fast, and work reliably on mobile devices.
xmas-2025/
├── gift.html # Main experience page
├── assets/
│ ├── app.js # Animation logic and state management
│ ├── styles.css # Responsive styling
│ └── box.gif # Gift box opening animation
└── people/
├── jacoby/
│ ├── manifest.json # Photo list for this person
│ └── *.jpeg # Photos
├── jason/
├── jenna/
├── kat/
├── lisa/
└── ricky/
gift.html page reads the ?person= query parameterEach person folder contains a manifest.json:
{
"personId": "jenna",
"photos": [
"jenna1.jpeg",
"jenna2.jpeg",
...
]
}
The app fetches this manifest to discover available photos without hardcoding filenames.
Before the animation starts, the app preloads:
This ensures smooth playback with no loading delays mid-animation.
The “freeze” technique prevents the GIF from looping by replacing it with a static snapshot of its final frame.
?person= parameter → shows helpful errorpeople/<name>/manifest.json:
{
"personId": "<name>",
"photos": ["photo1.jpeg", "photo2.jpeg", ...]
}
No code changes required.
Timing values are configured in assets/app.js:
const CONFIG = {
boxDuration: 3700, // How long box GIF plays (ms)
fadeDuration: 500, // Fade transition duration (ms)
boxGif: 'assets/box.gif',
};
Start a local server from the xmas-2025 directory:
python3 -m http.server 8881
Then open: http://localhost:8881/gift.html?person=jenna
When the recipient taps the tag with their phone, the browser opens automatically.