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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
112 changes: 18 additions & 94 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,100 +1,24 @@
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
http://a1-charlieroberts.glitch.me
William Ryan
http://a1-wfryan.glitch.me

This project shows ...

## Technical Achievements
- **Styled page with CSS**: Added rules for the p, li, and a selectors...
Note: Buttons may require a second click to work properly, not actually sure why, im guessing I have too much in the scripts for it to register properly the first time.

## Technical Achievements
- **Styled page with CSS**: Rules added for h1, h2, p, ul, iframe, and footer selectors. I also took advantage of custom classes and utilized element IDs to give specific rules for specific elements.

- **Simple Animation**: Made a simple color cycling animation using CSS and it gets triggered by JavaScript.

- **Other Tags Used/Semantic Tags Used**:
- 2 Buttons
- image
- footer
- header
- iframe
- links/anchor
- I have a script tag if you consider that one of the semantic tags
### Design Achievements
- **Used the Roboto Font from Google Fonts**: I used Roboto as the font for the primary copy text in my site.

- **Color Palette made with color.adobe.com and used throughout the site**: Screenshot is in the "assets" folder. All 5 Colors are used in the color change animation and all 5 of them are used statically as well
Binary file added assets/Color-wheel.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/DiscordPFP.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
127 changes: 118 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,136 @@
<html lang="en">
<head>
<title>CS4241 Assignment 1</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Oswald" type="text/css">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Rubik+Iso" type="text/css">
<meta charset="utf-8">
</head>
<header> <h1>Information about Will Ryan</h1>
<a href="https://github.com/wfryan" target="_blank"><img src="./assets/DiscordPFP.png" class="icon" alt="My Discord Profile Picture and it Links to my Github!"></a></header>
<body>
<h1>Information about [Your name here]</h1>

<p>
[Self introduction]
Hi I'm Will! I'm the president of the Computer and Technology Club and I manage the Club Hockey team here at WPI
</p>
<p>
[Major and other information]
I'm a Computer Science major in the class of 2024.
</p>
<p>
[Other things]
Some of the classes I've taken here at WPI are:
<ul>
<li>Software Engineering</li>
<li>Operating Systems</li>
<li>Computer Graphics</li>
<li>Computer Networks</li>
</ul>
</p>

<button type="button" onclick="doTextAnimations()">Pretty Colors!</button>
<button type="button" onclick="unhideBox();">Random Button (Should totally click me!)</button>
<iframe id="try_me" width="480" height="480" src="" hidden="true"></iframe>

<script>
function unhideBox(){
let x = document.getElementById("try_me");
if(x.style.display === "none")
{
x.style.display = "block";
x.setAttribute("src", "https://www.youtube.com/embed/dQw4w9WgXcQ?autoplay=1")
x.setAttribute("hidden", "false")
document.body.style = `background: grey`
let h1s = document.getElementsByTagName("h1");
for(i = 0; i < h1s.length; i++)
{
h1s[i].style.backgroundColor = "#611ADB"
}

}
else{
x.style.display = "none"
x.setAttribute("src", "")
x.setAttribute("hidden", "true")
document.body.style = 'background: white'
let h1s = document.getElementsByTagName("h1");
for(i = 0; i < h1s.length; i++)
{
h1s[i].style.backgroundColor = "#D9B091"
}
}
}

function doTextAnimations(){
document.body.getElementsByTagName("h1")[0].style = `font-family: 'Rubik Iso', serif; font-size: 48px`
let rgb = document.getElementsByClassName("rgb");
for(i = 0; i < rgb.length;i++){
if(rgb[i].style.animationPlayState == "paused")
{
rgb[i].style.animationPlayState = "running";
document.body.style.backgroundColor = "grey"
}
else{
rgb[i].style.animationPlayState = "paused";
document.body.style.backgroundColor = "white"
}
}
let rrgb = document.getElementsByClassName("rrgb");
for(i = 0; i < rgb.length;i++){
if(rrgb[i].style.animationPlayState == "paused")
{
rrgb[i].style.animationPlayState = "running";
}
else{
rrgb[i].style.animationPlayState = "paused";
document.body.getElementsByTagName("h1")[0].style = `font-family: 'Oswald', serif; font-size: 48px`
}
}
let h2s = document.getElementsByTagName("h2");
switch(document.body.style.backgroundColor){
case "grey":
for(i = 0; i < h2s.length; i++)
{
h2s[i].style.backgroundColor = "#611ADB"
}
break;
default:
for(i = 0; i < h2s.length; i++)
{
h2s[i].style.backgroundColor = "#F04D86"
}
break;
}


}
</script>

<h2>Experience</h2>
<p>
<ul>
<li class="rgb">Python: I write a lot of python.... a lot</li>
<li class="rgb">Java: Some experience</li>
<li class="rgb">HTML: Some experience</li>
<li class="rgb">CSS: Some experience, more experience with using CSS Selectors than actual CSS</li>
<li class="rgb">JavaScript: Some experience</li>
<li class="rgb">Ruby: Whats this?</li>
<li class="rgb">Unit Testing: Some experience</li>
</ul>
<h2>
Working experience
</p>
</h2>
<ul>
<li class="rrgb"> <a href ="https://www.xceptance.com/en/" class="rrgb">Xceptance: Load Test Intern</a></li>
</ul>
<h2>Other Projects</h2>
<ul>
<li>IBM/Rational</li>
<li>WPI</li>
<li class="rrgb">Project BT: An SMS Budget tracking app</li>
<li class="rrgb">Project CR: An SMS Calendar Remindar App (Because we all know Outlook isn't the most reliable)</li>
</ul>
</body>
</html>
<footer>
Totally Copyright 2023 wink wink ;)
<a href="https://github.com/wfryan" target="_blank" style="text-decoration: none;"> github</a>
<a href="https://www.youtube.com/watch?v=NLS2uESnZuk" target="_blank" style="text-decoration: none;font-family: 'Rubik Iso', sans-serif; position: absolute; right: 10px">Used To The Darkness Fytch Remix</a>
</footer>
</html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cr-4241-simple-glitch",
"version": "0.1.0",
"description": "WPI CS 4241 first assignment",
"author": "Charlie Roberts",
"author": "William Ryan",
"scripts": {
"start": "node server.js"
}
Expand Down
19 changes: 12 additions & 7 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,27 @@ const http = require('http'),
port = 3000

const server = http.createServer( function( request,response ) {
switch( request.url ) {
case '/':
sendFile( response, 'index.html' )
break
case '/index.html':
const url = request.url.slice(1);
switch( url ) {
case '':
sendFile( response, 'index.html' )
break
default:
response.end( '404 Error: File Not Found' )
sendFile( response, url )
break
}
})

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

const sendFile = function( response, filename ) {
fs.readFile( filename, function( err, content ) {
response.end( content, 'utf-8' )
if(err === null){
response.end( content, 'utf-8' )
}
else{
response.end('Error: File Not Found')
}

})
}
Loading