Last class we learned about how to publish our websites to github and update it after making changes through terminal.
Steps:
We learned how to change fonts for the website by using google fonts. Example: (body){font-family: 'Roboto', sans-serif;}. You can change the thing inside the parenthesis to whatever element you want to change the font of.
We learned how to make animation by using @keyframes.
Steps:
We learned how to code in JS and add event listeners and functions. To create an event, write "document.addEventListener("click, or keyPress, or mouseMove", function(event){something}. To make a custom function, write "function (something) () {something}. This is a recipe so you need to call it by saying "(function name) ()"
The assignment was to make gratitude cards, and I made one for my online friend who does programming because he likes planets and daylight cycles (for some reason). I started by making divs for the sun and moon, and making animations that make them go up and down, timing the second one to go after the first. Then I made an animation for the background that changed the gradient color when they went down, but I couldnt make a smooth transition or make it loop correctly so it only does it once.
I made an array that generates one number from an array and logs it, then logs half of that number afterward. I did this by making two arrays, one with the first number, and the other with the halfs of those numbers corresponding to each number in order. I also tested out making a blank array and later storing values into it.
I edited the array project by making it a type of slot machine that instead of winning when getting the same numbers, i made it so that if the first two numbers add up to the third number, you win.
I made a valentines day project based on the dvd logo bouncing. I just set variables to the offset height and offset width of the heart so the hitbox is more accurate. Then i made variables for the whole window height and width, and created if statements that detect when the heart touches each side, reversing the x and y increments so it swaps direction.
I tried to make a car but it turned out a little weird because I made the moving have no delay by using setInterval, so now it has a lot of drift when you move it.
We learned how to change the color of things by using rgba, and made an event listener that changes the color of the background by using math.random for R, G, and B, or based on mouse x and mouse y. Some questions I have about color is how we see colors clearly on the computer from far away, but zoomed in it looks weird, and what the formula for determining analogous colors.