diff --git a/Color_Palette.jpeg b/Color_Palette.jpeg new file mode 100644 index 0000000..004ed13 Binary files /dev/null and b/Color_Palette.jpeg differ diff --git a/Gibby.mp4 b/Gibby.mp4 new file mode 100644 index 0000000..b56cfb4 Binary files /dev/null and b/Gibby.mp4 differ diff --git a/JohnWick.wav b/JohnWick.wav new file mode 100644 index 0000000..e12bb30 Binary files /dev/null and b/JohnWick.wav differ diff --git a/MichaelLai.jpg b/MichaelLai.jpg new file mode 100644 index 0000000..b1910d3 Binary files /dev/null and b/MichaelLai.jpg differ diff --git a/README.md b/README.md index bbf146f..1206b45 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,67 @@ -Assignment 1 - Hello World: Basic Deployment w/ Git, GitHub, Glitch -=== +Michael Lai +http://a1-azinxtheonix.glitch.me + +This project demostrates that I remember the basic elements of html, css, and javascript, as well as some clever tricks to lead to more advanced techniques. Details can be found below. + +## Technical Achievements: + +**1 - Style Rules:** +I'll be naming what I consider the most important style rules here (even though the style sheet has more than 5 rules). + + background-color: + This is used for, of course, the background color, which changes depending on the location of the page. Used primarily for the body selector and the animation at the bottom. + + color: + Very similar to background-color, but instead it's used for the text. Used primarily for the .text selector. + + font-family: + Helps to set the font of all the text in the page. + + td/th -> padding: + This is to make sure there's enough space for the text in the table. + + .titleArea::after -> *all the style rules under this*: + This is to stop the float style rules from causing parts of the bottom section to move into the top section. + +**2 - Javascript Animation:** +I've designed it so that depending on what section of the webpage you're viewing, it will change the color of the background and text. In order to accomplish this, on a scroll event, I took the current scroll position and the max scroll position in order to find a percentage, and then used that in order to do some rgb calculations. After that, I located the background color and text elements to change their colors. + +Just in case that doesn't count as an animation, I made a small animation at the bottom of the page that simply bounces a square with the button toggle. + +**3 - Other HTML Tags:** +First, lets go over what tags do not count for this catagory. I'm assuming all tags that are initally included do not count. These tags are: h1, h2, p, and ul/li. I'm also counting h3 -> h6 as well as any similarly functional tags. + + table/tr/th/td: + I'm putting all of these tags in one catagory, as they all relate with the same function of a table. + + a: + This is used for a link, which leads to something really disappointing. I can't directly describe the link, as it would ruin it, but from what I'm describing, the warning text before the link, and the modern internet, you could probably figure it out. + + img: + This is for an image of myself. + + video/source: + This is for a video. The tag looked interesting but I had no idea what to put in it, so I put a video of Gibby from iCarly hitting the floor. + + audio: + This is for an audio file inserted into page. It's a cringe .wav file I had on my computer as a joke. I'm also slowly running out of interesting tags (with content) to use. Luckly, this is the 5th tag. + +## Design Achievements: + +**1 - Color palette:** +*see file named Color_Palette.jpeg* +Two of the colors are used for the first color set, two others are used for the second color set where the animation switches between the two, and the final color is used for the borders of the table. Some of the colors are used for the small backup animation at the bottom. + +**2 - Google Font:** +From the linked google font, I chose Hina Mincho as the font for my site. For the Chinese characters (because why not), I chose Long Cang. + + +## Note: Old Readme Below + +--- + +Assignment 1 - Hello World: Basic Deployment w/ Git, GitHub, Glitch *DUE: Monday, August 30th by 11:59 AM (before the start of class!)* This assignment is a "warm-up" exercise. @@ -76,25 +137,11 @@ Below are some suggested technical and design achievements. You can use these to *Design* 1. (10 points) Create a color palette using [color.adobe.com](https://color.adobe.com). Use all the colors in the palette in your webpage by implementing the appropriate CSS. Add a small screenshot of the color wheel for your color palette to your repo. -2. (5 points) Use a font from [Goolge Fonts](https://fonts.google.com) in your website. +2. (5 points) Use a font from [Google Fonts](https://fonts.google.com) in your website. Resources --- If you need a JavaScript/HTML/CSS refresher, see [HTML & CSS](https://wpi.primo.exlibrisgroup.com/discovery/fulldisplay?docid=alma9936730811904746&context=L&vid=01WPI_INST:Default&lang=en&search_scope=MyInst_and_CI&adaptor=Local%20Search%20Engine&tab=Everything&query=any,contains,Jon%20Duckett&offset=0) and/or [JavaScript Codeacademy](https://www.codecademy.com/en/tracks/javascript). -If you need a Git/GitHub refreseher, see [GitHub Bootcamp](https://help.github.com/categories/bootcamp/), the [GitHub Guides](https://guides.github.com/) (especially the ones on Hello World, and Understanding the GitHub Flow, and Forking Projects), and [CodeSchool's Try Git Course](https://www.codeschool.com/courses/try-git). - -Sample Readme (delete the above when you're ready to submit, and modify the text below with your links and descriptions) ---- - -Charlie Roberts -http://a1-charlieroberts.glitch.me - -This project shows ... - -## Technical Achievements -- **Styled page with CSS**: Added rules for the p, li, and a selectors... - -### Design Achievements -- **Used the Roboto Font from Google Fonts**: I used Roboto as the font for the primary copy text in my site. +If you need a Git/GitHub refreseher, see [GitHub Bootcamp](https://help.github.com/categories/bootcamp/), the [GitHub Guides](https://guides.github.com/) (especially the ones on Hello World, and Understanding the GitHub Flow, and Forking Projects), and [CodeSchool's Try Git Course](https://www.codeschool.com/courses/try-git). \ No newline at end of file diff --git a/colorchanger.js b/colorchanger.js new file mode 100644 index 0000000..c765954 --- /dev/null +++ b/colorchanger.js @@ -0,0 +1,110 @@ +var colorChangeOff = false; +var id = null; +var xpos = 0 +var ypos = 0; +var xaccl = 1; +var yaccl = 1; +var animationOff = true; + +function changeColor() { + if(colorChangeOff == false) { /* Only trigger while the animation is enabled */ + /* Get the location of the scroll bar and the max scroll value; + apparently these attributes are different between browsers */ + let currentPos = window.pageYOffset || document.documentElement.scrollTop; + let scrollLimit = Math.max( document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, + document.documentElement.scrollHeight, document.documentElement.offsetHeight) - window.innerHeight; + + let positionPercent = currentPos / scrollLimit; + + /*console.log(currentPos); + console.log(scrollLimit); + console.log(positionPercent);*/ + + /* + Now we have to calculate the colors to show between + these colors, with the percentage we have + #fceaae (r: 252, g: 234, b:174) + #aefced (r: 174, g: 252, b:237) + */ + + var red = 252 - (76 * positionPercent); + var green = 234 + (18 * positionPercent); + var blue = 174 + (63 * positionPercent); + + document.getElementById("background").style.backgroundColor = rgb(red, green, blue); + /*console.log(document.getElementById("background").style.backgroundColor);*/ + + /* + The same calculation for text + #635527 (r: 99, g: 85, b:39) + #54c7d1 (r: 84, g: 199, b:209) + */ + + var red = 99 - (15 * positionPercent); + var green = 85 + (114 * positionPercent); + var blue = 39 + (170 * positionPercent); + + for(var text of document.getElementsByClassName("text")) { + text.style.color = rgb(red, green, blue); + } + } +} + +function colorToggle() { + /*console.log(colorChangeOff);*/ + if(colorChangeOff == false) { + document.getElementById("colorButton").innerHTML = "Enable Color Change"; + colorChangeOff = true; + document.getElementById("background").style.backgroundColor = "#fceaae"; + for(var text of document.getElementsByClassName("text")) { + text.style.color = "#635527"; + } + } else { + document.getElementById("colorButton").innerHTML = "Disable Color Change"; + colorChangeOff = false; + changeColor(); + } +} + +function rgb(r, g, b) { + return "rgb("+r+","+g+","+b+")"; +} + +function animationToggle() { + console.log("press"); + if(animationOff == true) { + document.getElementById("animationButton").innerHTML = "Stop Animation"; + animationOff = false; + var box = document.getElementById("animationBox"); + clearInterval(id); + id = setInterval(frame, 10); + + function frame() { + /*console.log(box.style.left); + console.log(box.style.top); + console.log(xpos); + console.log(ypos); + console.log(xaccl); + console.log(yaccl);*/ + if(xpos == 340) { + xaccl = -1; + } else if(ypos == 195) { + yaccl = -1; + } else if(xpos == 0) { + xaccl = 1; + } else if(ypos == 0) { + yaccl = 1; + } + + xpos = xpos + xaccl; + ypos = ypos + yaccl; + + box.style.left = xpos + 'px'; + box.style.top = ypos + 'px'; + } + } else { + document.getElementById("animationButton").innerHTML = "Start Animation"; + animationOff = true; + clearInterval(id); + } +} \ No newline at end of file diff --git a/index.html b/index.html index 37ac8c3..b06081a 100644 --- a/index.html +++ b/index.html @@ -3,26 +3,160 @@
- [Self introduction] -
-- [Major and other information] -
-- [Other things] -
-- Working experience -
-Computer Science (Concentration in Cybersecurity) 2022
+Kind of a gamer, not gonna lie
+By the way, do not click this link: + Right Here +
+Play me
+ +*Also known as, the actual serious portion*
+ +Course Number | +Course Name | +Grade | +
---|---|---|
CS 1102 | +Accelerated Intro to Program Design | +A | +
CS 2022 | +Discrete Mathematics | +C | +
CS 2103 | +Accelerated Object-Oriented Design Concepts | +A | +
CS 2011 | +Intro to Machine Organization and Assembly | +B | +
CS 2303 | +Systems Programming Concepts | +A | +
CS 2223 | +Algorithms | +A | +
CS 3013 | +Operating Systems | +B | +
CS 3733 | +Software Engineering | +A | +
CS 3133 | +Foundations of Computer Science | +A | +
CS 3516 | +Computer Networks | +A | +
CS 3043 | +Social Implications of Information Processing | +B | +
CS 4401 | +Software Security Engineering | +B | +
CS 4515 | +Computer Architecture | +A | +
HTML | +A lot (but rusty) | +
CSS | +A lot (but rusty) | +
Java | +A lot | +
Javascript | +A lot (but rusty) | +
Ruby | +None | +
Python | +A lot | +
Unit Testing | +A lot | +