@fish-in-a-puddle
on
HEY GUYS LOOK AT MY DOG
I have spent the past couple weeks, I have made a website where you can look at pictures of my dog. That’s it. Just my dog. I wanted the site to be pretty simple, as a fun practice project, and I’m very happy with how it’s turned out. One of 55 images is chosen with Javascript when the page loads and the corresponding caption is shown as well. The function repeats any time the “New Image” button is clicked. The “Share” button copies the URL of the site to the visitor’s clipboard. The hardest part of this project was probably getting the random image generation to work. I started by making a CSS class setting the background of an empty div as well as its height and width, but this did not work at all. I don’t know why, but I replaced the div with an image element and used Javascript to change the SRC of the element depending on the result of a random number generated in a variable. Most of the other elements were pretty easy to work with, though. I hope that someone enjoys this fun little project and the pictures of my dog!
- 5 devlogs
- 7h
- 6.45x multiplier