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
16 changes: 16 additions & 0 deletions FileReader/file-reader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var fileInput = document.getElementById('fileInput');
var fileDisplayArea = document.getElementById('fileDisplayArea');

fileInput.addEventListener('change', function() {
var file = fileInput.files[0];
var textType = /text.*/;
if (file.type.match(textType)) {
var reader = new FileReader();
reader.onload = function(e) {
fileDisplayArea.innerText = reader.result;
}
reader.readAsText(file);
} else {
fileDisplayArea.innerText = "File not supported!";
}
})
20 changes: 20 additions & 0 deletions FileReader/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
body {
background-color: #dddddd;
}
#fileInput {
border-radius: 0px;
margin-left: 43%;
margin-top: 5%;
}
#fileDisplayArea {
width: 80%;
margin: 0 auto;
}
h1 {
width: 15%;
margin: 0 auto;
}
#header {
background-color: black;
height: 50px;
}
17 changes: 17 additions & 0 deletions FileReader/zz.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revise the indentation in in this file.

<html>
<head>
<meta charset="UTF-8">
<title>GOOGLE</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<header id='header'>____</header>
<article>
<h1>Text File Reader</h1>
<input type = 'file' id='fileInput'>
<pre id='fileDisplayArea'></pre>
</article>
<script type="text/javascript" src='file-reader.js'></script>
</body>
</html>
17 changes: 17 additions & 0 deletions LocalStorage/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Google</title>
<link href="layout.css" type="text/css" rel="stylesheet" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300' rel='stylesheet' type='text/css'>
</head>
<body>
<h1 id="oneaccount">One Account. All of Google.</h1> <br>
<h2 id="signin">Sign in to continue to Gmail</h2> <br>
Email:<input type='text' id='first'/> <br>
Password: <input type='text' id='second'/><br>
<button>Sign In</button>
<script src='localstorage.js' type='text/javascript'></script>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be indented.

</body>
</html>
24 changes: 24 additions & 0 deletions LocalStorage/layout.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
body {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The properties in this file should only be indented once, like this:

selector {
  property: value;
}

text-align: center;
}

#oneaccount {
font-size: 36px;
color: gray;
font-family: 'Open Sans';
}

#signin {
font-size: 14px;
color: gray;
font-family: 'Open Sans';
}

button {
background-color: #1E90FF;
height: 10px;
width: 225px;
color: white;
padding: 10px 10px 25px 10px;
border-radius: 10%;
}
13 changes: 13 additions & 0 deletions LocalStorage/localstorage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
var first = document.getElementById('first');
var second = document.getElementById('second');

first.value = localStorage.getItem('first');
second.value = localStorage.getItem('second');

first.addEventListener('input', function () {
localStorage.setItem('first', first.value);
}, false);

second.addEventListener('input', function () {
localStorage.setItem('second', second.value);
}, false);
75 changes: 1 addition & 74 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,74 +1 @@
# UXE - AppCache, Storage and Meta Data

For this assignment, students will be required to produce a single static HTML page view that:

- Uses static HTML and simple assets (css, images, etc ... )
- Build simple functionality that exposes one of the following
- AppCache
- Local Storage
- indexDB
- File API
- HTML should use examples of
- Microdata, Microformats or RDF
- ARIA


## Submitting assignments

Submitting assignments for this course will require leveraging some of the more advanced features of Github. These features will not only improve your knowledge of Git and Github, but also provide practice exercises for working on a distributed project with a large team.

## How to submit an assignment

In order to submit assignments, please use the following steps

1. [Fork this repo][1] so that you have a working version
1. [Clone the forked repo][2] to your local computer
1. Create a folder named with your name, example `dale-sande`
1. Once completed with your assignment, commit code to the master branch and push to Github `git push origin master`
1. From __your fork__ of the project, initiate a pull request to the parent repo

## Assignment review

When a pull request is initiated, I will be notified of the update and comment on the submitted assignment via Github tools.

## Keeping your local repo up to date
Your local repo will be an independent version of the original repo from the moment you fork the repo. In order to keep your local repo up to date with the original repo, you need to do what is called an [upstream pull][3].

To manage an upstream pull, I suggest updating your `.bash_profile` and your `.gitconfig` file with easy to remember aliases.

### .bash_profile

In your `.bash_profile` add the following alias

```
alias upstream="git remote add upstream \$@"
```

From the command line you simply need to refer to the alias and add the path to the upstream repo as shown in the following example.

```
$ upstream https://github.com/blackfalcon/unicorn-class-css-section.git
```

Once the upstream repo is configured for your local repo, this never needs to be reset again, unless you delete your local repo.

### .gitconfig
In your `.gitconfig` add the following alias

```
[alias]
pu = !"git fetch origin -v; git fetch upstream -v; git merge upstream/master"
```

From the command line, within the project repo, enter the following command to pull latest code from the upstream master.

```
git pu
```




[1]:https://help.github.com/articles/fork-a-repo
[2]:https://help.github.com/articles/fork-a-repo#step-2-clone-your-fork
[3]:https://help.github.com/articles/syncing-a-fork
There are two folders in this repo, one containing a folder with a file reader and another containing an html mockup of gmail.com with local storage.