Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assignment 1 Submission for Lia Davis #107

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

103 changes: 10 additions & 93 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,100 +1,17 @@
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.
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)
Lia's Getting Started Repo
---

Charlie Roberts
http://a1-charlieroberts.glitch.me
Lia Davis
http://a1-evans-notch.glitch.me

This project shows ...
This project shows some basic information with a little style

## Technical Achievements
- **Styled page with CSS**: Added rules for the p, li, and a selectors...
- **Styled page with CSS**: Added rules for the body, h1-3 selectors.
- body: styled background color, text color, and font for all tags in the body
- h1-3: styled the font for the h1, h2, and h3 selectors

### 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 Bungee Inline and Open Sans fonts from Google Fonts**: I used Bungee Inline as the font for the header tags in my site. I used Open Sans as the font for all other elements on the page (p and ul/li elements).
- **Used the following Adobe color palette to ensure the page was accessible**:
![Adobe Gradiant](adobe.png)
Binary file added adobe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
82 changes: 82 additions & 0 deletions classnotes/8-26-21.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>8-82-21</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bungee+Inline&family=Open+Sans&display=swap" rel="stylesheet">
<link href="/style.css" rel="stylesheet">
</head>
<body>
<h1>Class Notes 8-26-21</h1>
<a href=".">Return</a>
<h3>Create JS objects:</h3>
<code>{}</code>
<h3>Command to create object</h3>
<code>Object.create()</code>
<h3>Generally creating a object</h3>
<code><pre>
myPrototype = {
test: function() {
console.log( "This is a test")
}
}
</pre></code>
<p>Run function:</p>
<code>myPrototype.text()</code><br>
<code>response: This is a test</code>

<h3>Delegator</h3>
<code>delegator = Object.create(myPrototype)</code>
<p>Has access to prototype object methods</p>
<code>delegator.text()</code><br>
<code>response: This is a test</code>

<h3>Change object's prototpye</h3>
<code>delegator.__proto__ = { test3:1 }</code>

<h3>Define a function</h3>
<code><pre>
double = function(number) {
return number * 2
}

let n = 3
triple = function() {
n = n * 3
return n
}
</pre></code>
<p>The <code>triple</code> function has a side effect of modifying variables outside the scope of the function. <br>
JS isn't really a function programming language because it allows you to have side effects</p>

<h3>Closures</h3>
<p>Enable a function to have access to data inside the scope of another function (building chains of functions)</p>
<code><pre>
closure = function() {
let z = 0
return function() { return z }
}

myclosure = closure()

myclosure()
response: 0
</pre></code>

<h3>Function can have properties</h3>
<code>
myclosure.text = 3
</code>
<p>They basically act as objects</p>

<h3>NPM</h3>
<p>used to install JS packages</p>
<p><code>npx</code> allows you to run a package command without fulling importing and setting up the package</p>
<h3>Fun websites</h3>
<a href="wtfjs.com">wtfjs.com</a>


</body>
</html>
35 changes: 35 additions & 0 deletions classnotes/8-30-21.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>8-30-21</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bungee+Inline&family=Open+Sans&display=swap" rel="stylesheet">
<link href="/style.css" rel="stylesheet">
</head>
<body>
<h1>Class Notes 8-30-21</h1>
<a href=".">Return</a>
<h3>Summary</h3>
<code><pre>
&lt;details>
&lt;summary>summary text goes here&lt;/summary>
<i>Other elements and content goes here</i>
&lt;/details>
</pre></code>
<p>generates:</p>
<details>
<summary>summary text goes here</summary>
<p>Other elements and content goes here</p>
</details>

<h3>Assignment</h3>
<p>Make a single page web app. Deals with data. Just using a JSON array - doesn't need to be persistent</p>

<h3>Request types</h3>
<p>GET: include attributes in URL:</p>
<code>https://domain.com/page?attribute=value&attribute2=value2</code>
<p>POST: include info in body of request</p>
</body>
</html>
20 changes: 20 additions & 0 deletions classnotes/9-2-21.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>9-2-21</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bungee+Inline&family=Open+Sans&display=swap" rel="stylesheet">
<link href="/style.css" rel="stylesheet">
</head>
<body>
<h1>Class Notes 8-30-21</h1>
<a href=".">Return</a>
<h3>Box Model</h3>
<p>Set <code>box-sizing</code> to <code>borderbox</code> or use a CSS reset file</p>

<h3>Scope and Closures</h3>
<p></p>
</body>
</html>
18 changes: 18 additions & 0 deletions classnotes/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Class Notes</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bungee+Inline&family=Open+Sans&display=swap" rel="stylesheet">
<link href="/style.css" rel="stylesheet">
</head>
<body>
<h1>Class Notes</h1>
<a href="../index.html">Home</a>
<br><br>
<a href="8-26-21">8-26-21</a><br>
<a href="8-30-21">8-30-21</a>
</body>
</html>
52 changes: 42 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,60 @@
<!doctype html>
<html lang="en">
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
<title>CS4241 Assignment 1</title>
<meta charset="utf-8">

<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bungee+Inline&family=Open+Sans&display=swap" rel="stylesheet">
<link href="style.css" rel="stylesheet">
</head>
<body>
<h1>Information about [Your name here]</h1>
<header>
<h1>Lia's Webware Homepage</h1>
<br>
<a href="classnotes/">Class Notes</a>
</header>
<h2>Information about Lia</h2>
<p>
[Self introduction]
Hello! My name is Lia Davis. I'm a member of the WPI Class of 2022.
</p>
<p>
[Major and other information]
I'm currently studying for a BS in Computer Science.
</p>
<p>
[Other things]
I've previously taken the following CS classes:
</p>
<ul>
<li>CS 2022 - Discrete Mathematics</li>
<li>CS 2102 - Object Oriented Design Concepts</li>
<li>CS 2223 - Algorithms</li>
<li>CS 2303 - System Programming Concepts</li>
<li>CS 3043 - Social Implications of Computer Science</li>
<li>CS 3133 - Foundations of Computer Science</li>
<li>CS 3431 - Databases</li>
<li>CS 3516 - Networks</li>
<li>CS 3733 - Software Engineering</li>
<li>CS 4401 - Software Security Engineering</li>
<li>CS 525 - Special Topics: Digital Forensics</li>
</ul>

<h2>Experience</h2>
<p>
Working experience
</p>
<h3>Working experience</h3>
<ul>
<li>IBM/Rational</li>
<li>WPI</li>
<li>Solvus Global, LLC. - IT Administrator 2020-present</li>
<li>WPI Academic Technology Center - Student AV Assistant 2018-present</li>
</ul>
<h3>Web Technology Experience</h3>
<ul>
<li>HTML - A lot</li>
<li>CSS - A lot</li>
<li>Java - Some</li>
<li>JavaScript - Some</li>
<li>Ruby - None</li>
<li>Python - Some</li>
<li>Unit Testing - Some</li>
</ul>
</body>
</html>
19 changes: 18 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@
console.log("Server starting up")
const http = require('http'),
fs = require('fs'),
port = 3000

console.log("Imported packages")
const server = http.createServer( function( request,response ) {
console.log("New request for " + request.url)
switch( request.url ) {
case '/':
sendFile( response, 'index.html' )
break
case '/index.html':
sendFile( response, 'index.html' )
break
case '/style.css':
sendFile(response, 'style.css')
break
case '/classnotes/':
sendFile(response, 'classnotes/index.html')
break
case '/classnotes/8-26-21':
sendFile(response, 'classnotes/8-26-21.html')
break
case '/classnotes/8-30-21':
sendFile(response, 'classnotes/8-30-21.html')
break
case '/classnotes/9-2-21':
sendFile(response, 'classnotes/9-2-21.html')
break
default:
response.end( '404 Error: File Not Found' )
}
Expand Down
8 changes: 8 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
h1, h2, h3 {
font-family: 'Bungee Inline', cursive;
}
body, a {
background-color: #6202C3;
color: #02E7FF;
font-family: 'Open Sans', sans-serif;
}