They say the pen is mightier than the sword. But you’re a developer, and you build empires with just a keyboard and mouse. Why give money to hallmark so they can chop down trees to make cards. Show her you love her in a way that’s more “you”.
Displays a message for your valentine, with custom images in the shape of a heart. Moving your mouse over the heart shaped images causes them to move.
To setup locally, just run the following commands in your terminal
$ git clone https://github.com/LTrestka/digital-valentines-day-card.git
cd digital-valentines-day-card
Then follow the instructions below.
Note: does not support .heic files on firefox, or edge. I have not tested on safari, or other browsers. It’s best to use universally supported formats like jpeg or png.
a simple python file that takes your images, and your message, and populates data.js, which valentine.html loads to get your images and message.
usage: generate.py [-h] [--scatter-images] [--scatter-message]
options:
-h, --help show this help message and exit
--scatter-images Randomizes image order (default: false)
--scatter-message Each line in message.txt appears in random order (default: false)
Again, for best results, try to have 1 image for each line in your message
python generate.py
within the digital-valentines-day-card directoryI wrote this because I didn’t have a card, but wanted to do something special for my wife. I only spent a few hours writing this, so I don’t expect it to be perfect. In my case, the order of the images didn’t really matter, so I did not spend time ensuring that they appear in the proper order.
I suspect that they will appear in order the order they are placed in the images directory. Or alphabetically. I’m not sure to be honest. If this repo gets attention, I’m open to maintaining it and adding features by request.
I might put this in a docker container sometime in the near future (probably just an httpd service) so you can host it somewhere, rather than just providing an html file.