90 days ago · Tech · hide · Fediverse post

I'm in the middle of a lot of experimenting and improving things with Astro, so I added a like button to my posts. My idea is to copy the like button policy from Bear Blog, which I really like. Basically: you can like, but you can't unlike. If you liked something by accident, sorry, there's nothing you can do. No refunds. I don't want to get into the technical details of how the logic was implemented, but I do want to show how the visual part works. I wanted some confetti to appear when someone clicked the like button, so I installed canvas-confetti, a very popular npm package. It works really well and is very configurable. At first, I made the animation appear only the first time you clicked the button (when you didn't have a like yet and then gave one). But that felt a little boring. I want people to be able to click it several times. One click = one reward. Then I thought confetti didn't really match the idea of a like. A heart felt much better. Luckily, the same package lets you…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town