Hi, my name is Brooke and this is my first journal entry.
1. ls - lists the things in a folder
2. cd ./desktop
3. ls
4. cd ./cheff0330.github.io - gets you into your folder
5. git status - in your website folder, it tells us what we
have changed
6. git add . -go into and adds all your changes
7. git commit -m " "-write a message
8. git push
These steps are very important because it publishes and saves anything I make.
In order to make the jumpscares, first I had to get my images and gifs by giving them a height, a width, and linking the image address to the jumpscare page. I also had to say how far away I wanted each image from different side of the screen. For example, if I wanted an image to be close to the left side, I would put write "0px" to put it right on the left side. Then, in order to have the images move, I had to add eventlisteners and give each image a function
What exactly does console.log mean? Sometimes when I inspect, it doesnt always show my mistakes. Why is that? Can we go over what rgb and its meaning? I still dont fully understand how to do this.
a function is what appears in the console log
I decided to make my gratitude card for my sister because I wanted to show her how much she meant to me her. In order to make it, I had to first, make a div for the heart and the "i love you" sign that first pops up when you click the link. Then, I had to download the pictures I wanted of me and my sister and drag them into the github file. Once I did that, I was able to add an event listener saying that whenever someone clicks the touchpad, an image pops up replacing the heart. Finally, I downloaded the song "celebrate" and dragged into my file, in order to put it on my card. I gave it an id of music and then under the part where it tells the images to pop up each time I click my touchpad, I wrote music.play( ) which told it to play the music on the click aswell.
I asked chat gpt "what does appendChild mean" and it explained how it tells javascript to add HTML elements or content to a wed page. It takes data from the "parent" element add something we call a "child" element.
In order to make this html page, I had to make a div for my yogurt image and each of my ingredients and gave them the class of toppings. Then I had to add an event listener saying that when you click on a topping, the image keeps popping up wherever else you click on the screen. I also gave everything the variable of "hi" which meant gave the elements specific identifiers that could be manipulated/accesible when coding.
In order to make this html page, I had to make a div for my menorah image and each of my decorations and gave them the class of decor. Then I had to add an event listener saying that when you click on a decor, the image keeps popping up wherever else you click on the screen. I also gave everything the variable of "hi" which meant gave the elements specific identifiers that could be manipulated/accesible when coding.
To make my array of different tv shows pop up in the console log randomly when I click, I had to... first, give the shows a variable, I gave it a variable of shows. Then I made a variable callad random and I put Math.random()*5) which meant that in the console a random show would pop up everytime I clicked. After, I added an event listener that said when I clicked the screen, a random show would pop up in the consloe log. This is how I made my array of shows.
I made a div for the car and the heart, by giving them a width, height and url. Then, I gave where I want the images to start on the x and y axis a variable of x and y. After I did that, I gave each arrow key an event listen that said when it was pressed, the image would move that way. For example, if someone preeses the left arrow button, the car/heart moves left. I also put other images on the website to make it prettier.
Today, was learned how to code a text box so that when someone writes something in it, it gives a percent chance it will happen.
In this assignment, in order to make a random color appear each time someone clicked the screen, I gave the body (the website background) a color and then I added add event listener which made it so that on a click, a color is imputed by Math.random()*255 (which is telling it to a pick a type of shade from the colors red, green or blue), thus, a new color is generated each time.
For my slide show, I chose to display different celeberity mansions. I went into each section of the slideshow on html and coded them so that when you go to each slide a new mansion pops up.