stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

HEY GUYS LOOK AT MY DOG

  • 5 Devlogs
  • 7 Total hours

A website to show you random pictures of my dog.

Ship #1

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
  • 44 Stardust
Try project → See source code →
Open comments for this post

40m 16s logged

Devlog 5 - Fixed a few formatting issues, added a custom paw print cursor and made a share button that copies the (currently nonexistent) URL to the visitor’s keyboard. I’m very happy with how this site is turning out, so this is probably the last devlog for the actual coding. Next I need to do some shipping prep - writing a README and making a demo page - but that’s probably only about half an hour of work, tops.

0
0
13
Open comments for this post

1h 16m 55s logged

Devlog 4 - Finished writing the JS for the image generating and added a “New Image” button so you don’t have to reload the page to see another picture. The project is getting close to done, but there’s one more thing I want to add - a paw print custom cursor. Last time I tried to add that on another project it didn’t work, but I’m hoping I’ll be able to figure it out.

0
0
8
Open comments for this post

1h 52m 13s logged

Devlog 3 - Ok, so all that time writing out the CSS classes may have been pointless…. After trying a lot of different stuff, I found that the only way I could get the image to show was by turning the original div into an img element and changing the src to match different files in Javascript. Oh well, live and learn and all that. I’m back in buisness with the old copy paste for now, though, as I use a switch() function to check the variable that stores the random number and the case/break parts are all very similar (save the src, caption and, you know, the number it checks for). I’m feeling fairly confident that this will work out, though. After I finish this part, I’ll add a button to change the picture and caption so you don’t have to reload the page every time.

0
0
35
Open comments for this post

37m 56s logged

Devlog 2 - Hooray, I finished making the CSS classes. It was very boring as I had to copy paste basically the same thing fifty times and check and change the dimensions of the image each time but it’s finally done. Now that all the images exist for the website to choose from, I have to venture into Javascript to make the images change. Time to look up a random number generator tutorial and distort it beyond recognition

0
0
16
Open comments for this post

2h 23m 2s logged

Devlog 1 - Today I started a project I’ve been thinking about for a while - a website to show the viewer pictures of my dog. When it’s done, it will show an image of my dog picked randomly with a corresponding caption. So far I have resized 56 photos to fit the page (which took about an hour) and created 14 of the 56 classes in CSS. Each class includes the image and dimensions to the image doesn’t get stretched. The idea is that the script will pick a random number and using a switch/case function will set the class of the image div as well as the appropriate caption depending on the number. I have basically no experience coding in Javascript except for the couple of hours I spent working on it for the WebOS challenge, so this project will be a good way to get some practice.

1
0
18

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…