From 9916d517cfa2df16c0153cc68583e94bc61e33f4 Mon Sep 17 00:00:00 2001 From: Ansel Chang Date: Thu, 31 Aug 2023 04:17:32 -0400 Subject: [PATCH 01/10] unstyled html --- index.html | 85 ++++++++++++++++++++++++++++++++++++++++++++---------- style.css | 0 2 files changed, 70 insertions(+), 15 deletions(-) create mode 100644 style.css diff --git a/index.html b/index.html index 37ac8c3..1f63217 100644 --- a/index.html +++ b/index.html @@ -1,28 +1,83 @@ - CS4241 Assignment 1 + Ansel Chang CS4241 Assignment 1 + -

Information about [Your name here]

+

Ansel Chang

- [Self introduction] -

-

- [Major and other information] -

-

- [Other things] + Hi there! I'm a Junior at WPI majoring in Computer Science, class of 2025. I love working on different programming projects, + tutoring high school students, and like to decompress with bowling, rock climbing, tetris, and weightlifting.

-

Experience

-

- Working experience -

+

Previous Coursework

+ + +

Programming Experience

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LanguageExperience
JavaFully proficient through various coursework. Taught AP CS curriculum
PythonFully proficient. Built a full UI framework on top of pygame for modular and responsive design
HTML/CSSSome tangiental familiarity through developing PMKS, a linkage and design analysis tool written in Angular
JavaScriptSome tangiental familiarity through the superset language Typescript
RubyNo experience
Unit TestingSome experience when developing large codebases
+ +

Experience

+

+ Work Experience +

+ +

+ Projects +

+ + diff --git a/style.css b/style.css new file mode 100644 index 0000000..e69de29 From 69c07c275043ea1295ba36f8ebac77b04ac134dd Mon Sep 17 00:00:00 2001 From: Ansel Chang Date: Thu, 31 Aug 2023 05:30:53 -0400 Subject: [PATCH 02/10] css and js --- README.md | 92 +----------------------------------------------------- index.html | 34 +++++++++++++++++--- script.js | 46 +++++++++++++++++++++++++++ style.css | 28 +++++++++++++++++ 4 files changed, 105 insertions(+), 95 deletions(-) create mode 100644 script.js diff --git a/README.md b/README.md index 120c044..94ad623 100644 --- a/README.md +++ b/README.md @@ -1,94 +1,4 @@ -Assignment 1 - Hello World: Basic Deployment w/ Git, GitHub, Glitch -=== - -*DUE: Thursday, August 31st by 11:59 AM (before the start of class!)* - -First assignment! You will deploy the starting Web site that you will use this term to [Glitch](http://www.glitch.com/). - -Treat this assignment as a chance to get up to speed on Git, GitHub, and Glitch, as well as experiment some with HTML/CSS/JS. If you already know these, great! -However, if you're new to them, spend several hours practicing, experimenting, and reading documentation. Don't just get your website up and done, as -you'll need skills with these tools throughout the rest of the course. - -Assignment details ---- - -This assignment requires that your website is both contained in a GitHub repository and hosted in Glitch. There are two ways to do this: - -1. Fork this repo and clone it to your computer, make changes locally on your computer, push the repo onto GitHub, and then import your GitHub repo into Glitch. -2. Fork this repo and then import it directly to Glitch, use the Glitch editor to make changes, and then export your repo from Glitch back to GitHub. -3. Same as #1, but instead of importing from Github to Glitch you just upload the files (or copy/paste) them directly to Glitch. - -## Option 1 - Clone to computer, push to Github, import to Glitch (recommended) - -1. Fork the starting project code in GitHub. This repo contains: - * the server code, `server.js` - * A starting `index.html` file that you will edit as described below - * A package.json file that helps configure Glitch - * This README -2. Edit `index.html` to show the following information about you: - * your name and class at WPI (e.g. class of 2020) Note: Do not put any contact or personal information that you do not potentially want other people outside of this class to see. - * your major(s) and minor(s) - * previous computer science courses that you have taken at WPI - * your experience with the following technologies and methods (none, some, a lot) - * HTML - * CSS - * Java - * JavaScript - * Ruby - * Python - * unit testing -4. Complete some technical and/or design achievements (see below). -5. Test your project to make sure that when someone goes to your main page, it displays correctly. You can do this locally by simply running `node server.js` from within the assignment directory. - -6. Modify the README file according to the specification below. -7. Commit and push all your changes to GitHub. -8. Deploy your project to Glitch. You can do this by [importing the repo from GitHub](https://medium.com/glitch/import-code-from-anywhere-83fb60ea4875) -9. Ensure that your project has the proper naming scheme (guide follows) so we can find it. -9. Create and submit a Pull Request to the original repo. - -## Option 2 - Fork repo and import to Glitch, edit on Glitch, and then export back to GitHub -Most of these steps are the same as option 1, except that you being by creating a new project Glitch using this repo as a staring point (just choose New Project > Import from GitHub for this and then paste in the link to your repo). At the end, you can export your Glitch project to GitHub by [following these instructions](https://www.youtube.com/watch?time_continue=77&v=aWJFbtrgW4E&feature=emb_logo). *Note that the location of the projecct export feature in Glitch has moved from what they show in this video.* It's now located in Tools > Import and Export (tools is located in the bottom left of the Glitch editor). - -## Option 3 - Clone to computer, edit locally, push to GitHub, upload to Glitch -This is the same as option 1, except that for step 6 (Deploy to Glitch) you simply upload each file to your Glitch repository (using New File > Upload a File). - -Naming and URL Scheme ---- - -You must use a consistent naming scheme for all projects in this course. -If we can't find it, we can't grade it. - -By default Glitch often assigns your application a random name. To change it, click on the project dropdown menu in the upper left corner of Glitch. You will then see an additional text field displaying the project name in the resulting menu; click here to edit the name. - -The name scheme should be `a1-yourGitHubUsername`. -The `a1` will need to be updated to `a2`, `a3`, and so on in future projects. - -Achievements ---- -Below are some suggested technical and design achievements. You can use these to help boost your grade up to an A and customize the assignment to your personal interests. These are recommended acheivements, but feel free to create/implement your own... just make sure you thoroughly describe what you did in your README and why it was challenging. ALL ACHIEVEMENTS MUST BE DESCRIBED IN YOUR README IN ORDER TO GET CREDIT FOR THEM. - -Note that if you want to load resources besides your index.html file (images, an CSS file, a JS file) you'll need to modify server.js to point to these. For now it's easiest to just hardcode paths to the resources, but we'll look at ways to optimize this shortly. - -*Technical* -1. (max 5 points) Style your page using CSS. Each style rule you apply will get you 1 extra point for a maximum of 5 points. Be sure to describe your style rules in your README. -2. (5 points) Add a simple JavaScript animation to the page. -3. (max 5 points) Experiment with other *semantic* HTML tags (links, images, tables, header, footer, etc.) Each extra tag you use will get you 1 extra point for a maximum of 5 points. Be sure to describe the tags you use in your README. - -*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 [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 +Ansel Chang http://a1-charlieroberts.glitch.me This project shows ... diff --git a/index.html b/index.html index 1f63217..8749e05 100644 --- a/index.html +++ b/index.html @@ -6,13 +6,18 @@ + +

Ansel Chang

Hi there! I'm a Junior at WPI majoring in Computer Science, class of 2025. I love working on different programming projects, tutoring high school students, and like to decompress with bowling, rock climbing, tetris, and weightlifting.

+
+

Previous Coursework

+
  • Accelerated Object-Oriented Design Concepts
  • Algorithms
  • @@ -20,8 +25,12 @@

    Previous Coursework

  • Discrete Mathematics
  • Foundations of Computer Science
+
+
-

Programming Experience

+
+

Programming Languages

+
@@ -52,8 +61,13 @@

Programming Experience

Language Some experience when developing large codebases
+
+
+ +
+

Experience

-

Experience

+

Work Experience

@@ -68,8 +82,8 @@

Projects

-
    -
  • Software lead for WPI VEXU Robotics team, developing Path Generation and Autonomous maker Software +
      +
    • Software lead for WPI VEXU Robotics team, developing Path Generation and Autonomous maker software that allows for fully coding autonomous paths in a graphical interface (2021 - 2022)
    • Developed the world’s first NES Tetris video processing and analysis tool, using OpenCV OCR and an expectimax-based tetris AI to give player feedback and top move recommendations. Popular in the tetris community as a training tool (2021)
    • @@ -78,6 +92,18 @@

      score of 999,999 under human-realistic conditions (2020)

    +
+ +
+ + + + diff --git a/script.js b/script.js new file mode 100644 index 0000000..aa8a9e8 --- /dev/null +++ b/script.js @@ -0,0 +1,46 @@ +var coll = document.getElementsByClassName("collapse"); +var i; + +// if clicked on section, show section and hide everything else +for (i = 0; i < coll.length; i++) { + + // IIFE to capture the value of i + (function(index) { + + coll[i].addEventListener("click", function(event) { + console.log("clicked", coll.item(index).id); + toggleSectionByIdAndHideOthers(coll.item(index).id); + + // stop propagation so that the background click event doesn't fire + event.stopPropagation(); + }); + + })(i); +} + +// if clicked on background, hide everything +var background = document.getElementById("body"); +document.addEventListener("click", function() { + console.log("clicked background"); + toggleSectionByIdAndHideOthers(""); +}); + +function toggleSectionByIdAndHideOthers(id) { + + console.log("hideAllSectionsExceptID", id); + + for (var i = 0; i < coll.length; i++) { + + var content = coll[i].querySelector(".content"); + + // toggle active section, hide all others + if (coll[i].id === id && !coll[i].classList.contains("active")) { + + coll[i].classList.add("active"); + content.style.display = "block"; + } else { + coll[i].classList.remove("active"); + content.style.display = "none"; + } + } +} \ No newline at end of file diff --git a/style.css b/style.css index e69de29..1d5f3e8 100644 --- a/style.css +++ b/style.css @@ -0,0 +1,28 @@ +body { + background-color: #B3D6E6; + font-family: 'Ubuntu', sans-serif; +} + +section { + border-radius: 10px; + margin: 13px; + padding: 10px; + background-color: #6CBDE0; +} + +section:hover { + background-color: #54b1d8; +} + +.content { + display: none; +} + +.content.first{ + display: block; +} + +th, td { + padding: 5px; + text-align: left; +} \ No newline at end of file From 153530c85debef8390c8638926200c80da25e350 Mon Sep 17 00:00:00 2001 From: Ansel Chang Date: Thu, 31 Aug 2023 05:34:41 -0400 Subject: [PATCH 03/10] remove background collapse --- script.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/script.js b/script.js index aa8a9e8..18313c9 100644 --- a/script.js +++ b/script.js @@ -18,12 +18,6 @@ for (i = 0; i < coll.length; i++) { })(i); } -// if clicked on background, hide everything -var background = document.getElementById("body"); -document.addEventListener("click", function() { - console.log("clicked background"); - toggleSectionByIdAndHideOthers(""); -}); function toggleSectionByIdAndHideOthers(id) { From 652ca2d9c792a473d6ff4db18c9aa55d64cf5688 Mon Sep 17 00:00:00 2001 From: Ansel Chang Date: Thu, 31 Aug 2023 05:43:18 -0400 Subject: [PATCH 04/10] update readme --- README.md | 12 ++++++++++-- style.css | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 94ad623..b8a979d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,15 @@ http://a1-charlieroberts.glitch.me This project shows ... ## Technical Achievements -- **Styled page with CSS**: Added rules for the p, li, and a selectors... +- Use background-color to set page background to light blue and each section to a slightly darker blue +- Hovering over a section darkens it a little, to hint at clicking to toggle collapse +- Add margin and padding to give some space for sections, and round corners to look more smooth +- all the sections start collapsed, except the first one +- Slight padding to table rows, and set text align to left +- Javascript animation to toggle collapsing sections so that only one section shows at a time +- Use the following semantic tags for better readability: header, section, table, ul, footer ### Design Achievements -- **Used the Roboto Font from Google Fonts**: I used Roboto as the font for the primary copy text in my site. +- Used Adobe's monochromatic palette with a blueish hue +- Used the Ubuntu Font from Google Fonts, with a fallback font of sans-serif + diff --git a/style.css b/style.css index 1d5f3e8..d3714d9 100644 --- a/style.css +++ b/style.css @@ -18,7 +18,7 @@ section:hover { display: none; } -.content.first{ +.content.first { display: block; } From 2876a5fc4200c4de31339a5adfc60958856f7382 Mon Sep 17 00:00:00 2001 From: Ansel Chang Date: Thu, 31 Aug 2023 05:44:47 -0400 Subject: [PATCH 05/10] documentation --- README.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b8a979d..561c9c1 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ This project shows ... - all the sections start collapsed, except the first one - Slight padding to table rows, and set text align to left - Javascript animation to toggle collapsing sections so that only one section shows at a time -- Use the following semantic tags for better readability: header, section, table, ul, footer +- Use the following semantic tags for better readability: header, section, table, ul, footer. Also, used a hyperlink to my github page ### Design Achievements - Used Adobe's monochromatic palette with a blueish hue diff --git a/package.json b/package.json index 1699a50..e036c1b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "cr-4241-simple-glitch", "version": "0.1.0", "description": "WPI CS 4241 first assignment", - "author": "Charlie Roberts", + "author": "Ansel Chang", "scripts": { "start": "node server.js" } From 7f359a5d7b0ced5a77d7d06b7e256c5d8d4f9036 Mon Sep 17 00:00:00 2001 From: Ansel Chang Date: Thu, 31 Aug 2023 05:47:21 -0400 Subject: [PATCH 06/10] include js and css into server.js --- server.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server.js b/server.js index b18d6a1..ae2cbc6 100644 --- a/server.js +++ b/server.js @@ -10,6 +10,12 @@ const server = http.createServer( function( request,response ) { case '/index.html': sendFile( response, 'index.html' ) break + case '/script.js': + sendFile( response, 'script.js' ) + break + case '/style.css': + sendFile( response, 'style.css' ) + break default: response.end( '404 Error: File Not Found' ) } From f32baefd11423b0571a5455ebe2071dee7843048 Mon Sep 17 00:00:00 2001 From: Ansel Chang Date: Thu, 31 Aug 2023 05:51:26 -0400 Subject: [PATCH 07/10] fix syntax --- index.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/index.html b/index.html index 8749e05..9c8cc55 100644 --- a/index.html +++ b/index.html @@ -87,10 +87,8 @@

that allows for fully coding autonomous paths in a graphical interface (2021 - 2022)
  • Developed the world’s first NES Tetris video processing and analysis tool, using OpenCV OCR and an expectimax-based tetris AI to give player feedback and top move recommendations. Popular in the tetris community as a training tool (2021)
  • -
  • Primertris, a tetris AI and emulator written in C++ and SDL using expectimax and custom herestics to acheive a coveted "maxout" score of 999,999 under human-realistic conditions (2020)
  • - From 10cb14c8d295aa82af7384a87610e1eb199fba24 Mon Sep 17 00:00:00 2001 From: Ansel Chang Date: Thu, 31 Aug 2023 05:54:33 -0400 Subject: [PATCH 08/10] glitch --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 561c9c1..82a56ea 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ Ansel Chang -http://a1-charlieroberts.glitch.me +Live site: https://a1-anselchang.glitch.me +Code: https://glitch.com/edit/#!/a1-anselchang This project shows ... From fb91e782534a657a5ce0e16cd70de5bf6e4f4cdd Mon Sep 17 00:00:00 2001 From: Ansel Chang Date: Thu, 31 Aug 2023 05:55:13 -0400 Subject: [PATCH 09/10] sapces --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 82a56ea..eda4b16 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ Ansel Chang + Live site: https://a1-anselchang.glitch.me + Code: https://glitch.com/edit/#!/a1-anselchang This project shows ... From 34635a50e7bc6f70ee736c9bfb8bf2e85605e44e Mon Sep 17 00:00:00 2001 From: Ansel Chang Date: Thu, 31 Aug 2023 05:55:47 -0400 Subject: [PATCH 10/10] del live site --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index eda4b16..e9c7ad1 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ Ansel Chang Live site: https://a1-anselchang.glitch.me -Code: https://glitch.com/edit/#!/a1-anselchang - This project shows ... ## Technical Achievements