diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..7a9dfa0 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "pwa-chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/Capture.PNG b/Capture.PNG new file mode 100644 index 0000000..08fd1e5 Binary files /dev/null and b/Capture.PNG differ diff --git a/README.md b/README.md index 60ccbf9..fcca3a0 100644 --- a/README.md +++ b/README.md @@ -1,100 +1,24 @@ -Assignment 1 - Hello World: Basic Deployment w/ Git, GitHub, Glitch -=== +Jack Leserman -*DUE: Monday, August 29th by 11:59 AM (before the start of class!)* +https://a1-jackleserman.glitch.me/ -This assignment is a "warm-up" exercise. -You will simply 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. -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. - -*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 HTML tags (links, images, tables etc.) Each extra tag you use will get you 1 extra point for a maximum of 5 points. Be sure to describe the links 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 [Goolge 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 ... +This project shows an intro to web design, including HTML tags, CSS customization, and JavaScript animations. I tried to utilize as many elements as I could to become familiar with them, especially those I havent worked with before. ## Technical Achievements -- **Styled page with CSS**: Added rules for the p, li, and a selectors... +- **Experimented With HTML Tags**: Utilized underlines, headings, paragraphs, breaks, labels/dropdowns, images, buttons and tables. I picked these to try new tags, and practice tags that require mutltiple elements (i.e. table). +- **Styled Page with CSS**: Added rules for the body, headings 1-3, paragraph, buttons, images, labels, and selection./ + - H1 was the main header at the top with my name + - H2 was the header for Experience + - H3 was the header for the table about tables. +- **Added a Simple JavaScript Animation**: Used JavaScript to create a moving box located at the bottom of the page. Animation is triggered by a button. This uses a setInterval() to update the animation and move the block. + ### Design Achievements -- **Used the Roboto Font from Google Fonts**: I used Roboto as the font for the primary copy text in my site. +- **Used the Raleway Font from Google Fonts**: I used Raleway as the font for the primary copy text in my site. +- **Used a color palette**: Used a four tone palette from adobe.\ +#1F2529 - Primary\ +#F74422 - Secondary\ +#A4C4D9 - Lighter Blue\ +#29384C - Darker Blue\ +#EBEDF3 - Background\ +![Capture](https://user-images.githubusercontent.com/39784006/187220175-1a967735-fe78-4a05-bbfa-0a2fcfdee6c5.PNG) diff --git a/index.html b/index.html index 37ac8c3..8792ee2 100644 --- a/index.html +++ b/index.html @@ -1,28 +1,91 @@ + + + CS4241 Assignment 1 + -

Information about [Your name here]

+

Information about Jack Leserman

- [Self introduction] + Hello! I'm Jack, a Senior here at WPI, class of 2023!

- [Major and other information] + B.S. Robotics Engineering with Minors in Computer Science and Business

- [Other things] + CS 1004 - Introduction to Programming for Non-Majors + CS 2102 - Object-Oriented Design Concepts + CS 2223 - Algorithms

Experience

- Working experience + Working experience
+ HTML: Some
+ CSS: Some
+ Java: a lot
+ JavaScript: none
+ Ruby: none
+ Python: a lot
+ Unit Testing: a lot

- + +
+ +
+
+ + +
+ +
+
+

This is a table

+ table +
+

This is also a table, about tables

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Table NameStoreCostLink
LackIkea$14.99Hyperlink!!!
Livina CanberraAmazon$269.95Hyperlink!!!
MaksymilianWayfair$219.99Hyperlink!!!
+
+

+ +
+
+
- + \ No newline at end of file diff --git a/main.css b/main.css new file mode 100644 index 0000000..71eea41 --- /dev/null +++ b/main.css @@ -0,0 +1,97 @@ +/* +#1F2529 - Primary +#F74422 - Secondary +#A4C4D9 - Lighter Blue +#29384C - Darker Blue +#EBEDF3 - BG + +*/ + + +body { + background-color: #EBEDF3; + font-family: "Raleway", sans-serif; + } + +h1 { + color: #F74422; + text-align: center; + font-family: "Raleway", sans-serif; + font-size: 50px; + padding-top: 50px; + padding-bottom: 20px; + } + + h2 { + color: #F74422; + text-align: center; + font-family: "Raleway", sans-serif; + font-size: 30px; + padding-top: 30px; + padding-bottom: 10px; + } + + + p { + color: #1F2529; + text-align: center; + font-family: "Raleway", sans-serif; + font-size: 20px; + } + + button{ + margin: auto; + padding: 15px 32px; + background-color: #A4C4D9; + display: block; + border: black; + font-family: "Raleway", sans-serif; + } + + .center { + margin-left: auto; + margin-right: auto; + } + + img{ + margin: auto; + display: block; + } + + label{ + color: #F74422; + font-size: 20px; + display: block; + text-align: center; + } + + h3{ + color: #F74422; + text-align: center; + font-size: 20px; + } + + select { + display: block; + margin: 0 auto; + font-family: "Raleway", sans-serif; + text-align: center; + } + +#field { + width: 500px; + height: 50px; + position: relative; + background:#29384C; + margin-left: auto; + margin-right: auto; + } + +#box { + width: 50px; + height: 50px; + position: absolute; + background: #F74422; + margin-left: auto; + margin-right: auto; + } diff --git a/main.js b/main.js new file mode 100644 index 0000000..77c55c8 --- /dev/null +++ b/main.js @@ -0,0 +1,25 @@ +function move() { + let id = null; + const ball = document.getElementById("box"); + let pos = 0; + clearInterval(id); + id = setInterval(move_right, 5); + + function move_right() { + if (pos == 450) { + id = setInterval(move_left, 5); + } else { + pos++; + ball.style.left = pos + 'px'; + } + } + + function move_left() { + if (pos == 0) { + id = setInterval(move_right, 5); + } else { + pos--; + ball.style.left = pos + 'px'; + } + } + } \ No newline at end of file diff --git a/package.json b/package.json index 1699a50..42b407c 100644 --- a/package.json +++ b/package.json @@ -5,5 +5,10 @@ "author": "Charlie Roberts", "scripts": { "start": "node server.js" + + + + } } + diff --git a/server.js b/server.js index b18d6a1..48df24a 100644 --- a/server.js +++ b/server.js @@ -10,6 +10,15 @@ const server = http.createServer( function( request,response ) { case '/index.html': sendFile( response, 'index.html' ) break + case '/main.css': + sendFile( response, 'main.css' ) + break + case '/main.js': + sendFile( response, 'main.js' ) + break + case '/table.png': + sendFile( response, 'table.jpg' ) + break default: response.end( '404 Error: File Not Found' ) } diff --git a/table.jpg b/table.jpg new file mode 100644 index 0000000..6b91f3f Binary files /dev/null and b/table.jpg differ