Skip to content
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
89 changes: 23 additions & 66 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,77 +1,34 @@
Assignment 1 - Hello World: Basic Deployment w/ Git, GitHub, Glitch
===

*DUE: Thursday, August 29th by 11:59 AM (before the start of class!)*
Seungho Lee
https://seungho715-a1-gettingstarted-1.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/).
This project shows the combination of javascript, html, and css. It also makes the student practice how to use the server correctly.

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.
In other words, don't just get your website up and done. You will need skills with these tools throughout the rest of the course.

Assignment details
---

Do the following to complete this assignment:

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
3. 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.

4. Modify the README file according to the specification below.
5. Commit and push all your changes to GitHub.
6. Deploy your project to Glitch. You can do this by [importing the repo from GitHub](https://medium.com/glitch/import-code-from-anywhere-83fb60ea4875)
7. Ensure that your project has the proper naming scheme (guide follows) so we can find it.
8. Create and submit a Pull Request to the original repo.

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.

Resources
---

If you need a JavaScript/HTML/CSS refresher, see [Technology Fundamentals by Scott Murray](http://chimera.labs.oreilly.com/books/1230000000345/ch03.html#_html) and/or [JavaScript Codeacademy](https://www.codecademy.com/en/tracks/javascript).
## Technical Achievements
- **Styled page with CSS**:
Used Color to color the title, headers, and paragraphs.
Created border around the paragraphs.
Create paddings around paragraphs.
Create margin around paragraphs.
Used font size to emphasize the important facts.
Used background color to replace a bland, white background.

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).
- **Add a simple Javascript Animation**
Added a rotation with the WPI logo at the bottom.

Sample Readme (delete the above when you're ready to submit, and modify the below so with your links and descriptions)
---
- **HTML Tags** Used style to design the web page.
Used strong to bold phrases.
Used image to load an image of myself.
Used button to alert a "Hello World" message. This was for a Easter egg thing
Used script to display the current date.
Used list to display the list of attributes in a user friendly manner.

Charlie Roberts
http://a1-charlieroberts.glitch.me

This project shows ...
### Design Achievements
- **Used the Two Fonts from Google Fonts**: Used Arial font and Times New Roman font to design the project

## Technical Achievements
- **Proved P=NP**: Using a combination of...
- **Solved AI**: ...

### Design Achievements
- **Re-vamped Apple's Design Philosophy**: Shown in `style.css`, the code...
**NOTE**
This is a side note that I accidentally submitted my project on 19a repository instead of 20a repository. I am submitting to the right repo, and Professor Roberts confirmed it is fine. Sorry for the extra work.


26 changes: 26 additions & 0 deletions Style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@charset "utf-8";

body {
background-color: #FFD47A;
}

h1 {
color: rgb(235, 126, 110);
border: 2px solid rgb(59, 255, 151);
}

h2 {
color: rgb(170, 0, 255);
font-size: 20px;
font-family: "Times New Roman", Times, serif;
border: 2px solid rgb(59, 255, 151);
}

p {
color: rgb(170, 0, 255);
padding: 30px;
margin: 10px;
font: 16px Arial, san-serif;
}


Binary file added assets/Adobe Color RGB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Original.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/chris.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/wpi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 63 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,79 @@
<!doctype html>
<!doctype html>
<html lang="en">
<head>
<head>
<title>CS4241 Assignment 1</title>
<meta charset="utf-8">
</head>
<body>
<h1>Information about [Your name here]</h1>
<link rel="stylesheet" href="Style.css">
<script>
var degrees = 0;
function rotate(time, speed) {
var e = document.getElementById(time);
e.style.transform = "rotate(" + degrees + "deg)";
setTimeout('rotate(\'' + time + '\',' + speed + ')', speed);
degrees = degrees + 1;
if (degrees == 360) {
degrees = 1;
}
}
</script>

</head>
<body>
<h1><strong>Information about Seungho Lee</strong></h1>
<img id="chris" src="assets/chris.jpg" width="300" height="350">
<p>
<strong>class of 2024</strong>
</p>
<p>
[Self introduction]
CS and IMGD Major and BioInfomatics Minor
</p>
<p>
[Major and other information]
Previous Courses:
<ul>
<li>CS1101</li>
<li>CS2103</li>
<li>CS2303</li>
<li>CS2011</li>
<li>CS2022</li>
<li>CS2223</li>
<li>CS3013</li>
<li>CS3431</li>
<li>CS3733</li>
</ul>
</p>
<p>
[Other things]
Programming Language:
<ul>
<ul>HTML - some</ul>
<ul>CSS - some</ul>
<ul>Java - a lot</ul>
<ul>Javascript - none</ul>
<ul>Ruby - none</ul>
<ul>Python - some</ul>
<ul>unit testing - none</ul>
</ul>
</p>

<h2>Experience</h2>
<p>
Working experience
Working experience
</p>
<ul>
<li>IBM/Rational</li>
<li>WPI</li>
<li>BaNET Information</li>
<li>WPI</li>
</ul>
</body>
<p>
Date/Time: <span id="datetime"></span>
</p>
<script>
var dt = new Date();
document.getElementById("datetime").innerHTML = dt.toLocaleDateString();
</script>
<p>
Click the button
</p>
<button type="button" onclick="alert('Assignment 1: Hello World')"> Click me </button>
<img id="wpi" src="assets/wpi.png" width="300" height="350">
<script>rotate("wpi", 200);</script>
</body>
</html>
5 changes: 5 additions & 0 deletions package-lock.json

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

47 changes: 28 additions & 19 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
const http = require('http'),
fs = require('fs'),
port = 3000
fs = require('fs'),
port = 3000

const server = http.createServer( function( request,response ) {
switch( request.url ) {
case '/':
sendFile( response, 'index.html' )
break
case '/index.html':
sendFile( response, 'index.html' )
break
default:
response.end( '404 Error: File Not Found' )
}
const server = http.createServer(function (request, response) {
switch (request.url) {
case '/':
sendFile(response, 'index.html')
break
case '/index.html':
sendFile(response, 'index.html')
break
case '/assets/chris.jpg':
sendFile(response, 'assets/chris.jpg')
break
case '/assets/wpi.png':
sendFile(response, 'assets/wpi.png')
break;
case '/Style.css':
sendFile(response, 'Style.css')
break
default:
response.end('404 Error: File Not Found')
}
})

server.listen( process.env.PORT || port )
server.listen(process.env.PORT || port)

const sendFile = function( response, filename ) {
fs.readFile( filename, function( err, content ) {
file = content
response.end( content, 'utf-8' )
})
const sendFile = function (response, filename) {
fs.readFile(filename, function (err, content) {
file = content
response.end(content, 'utf-8')
})
}