Skip to content

Commit

Permalink
Merge branch 'master' of github.com:udacity/frontend-nanodegree-resume
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronwp committed Jan 9, 2015
2 parents c8540b8 + 5272b6b commit bdfe030
Show file tree
Hide file tree
Showing 4 changed files with 212 additions and 114 deletions.
97 changes: 95 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,95 @@
udresume
========
## How do I complete this project?

1. Go to the [Javascript Basics course](https://www.udacity.com/course/ud804) and select "View Course Materials."
2. Go through the videos and assignments in this course to learn the JavaScript necessary to build your resume.
3. Review your work against the Project Rubric (on the next page).
4. When you are satisfied with your project, submit it according to the Submission Instructions on the next page.

### By the end:
Your resume will look something like this
![](http://i.imgur.com/pWU1Xbl.png)

And your repository will include the following files:

* **index.html**: The main HTML document. Contains links to all of the CSS and JS resources needed to render the resume, including resumeBuilder.js.
* **js/helper.js**: Contains helper code needed to format the resume and build the map. It also has a few function shells for additional functionality. More on helper.js further down.
* **js/resumeBuilder.js**: This file is empty. You should write your code here.
* **js/jQuery.js**: The jQuery library.
* **css/style.css**: Contains all of the CSS needed to style the page.
* **README.md**:
The GitHub readme file.
* and some images in the images directory.

## Your starting point...
### js/helper.js
Within helper.js, you’ll find a large collection of strings containing snippets of HTML. Within many snippets, you’ll find placeholder data in the form of `%data%` or `%contact%`.

Each string has a title that describes how it should be used. For instance, `HTMLworkStart` should be the first `<div>` in the Work section of the resume. `HTMLschoolLocation` contains a `%data%` placeholder which should be replaced with the location of one of your schools.

### Your process:
The resume has four distinct sections: work, education, projects and a header with biographical information. You’ll need to:

1. Build four JSONs, each one representing a different resume section. The objects that you create need to follow the names within the schema below exactly. Make sure your JSONs are formatted correctly using <a href="http://jsonlint.com/" target="_blank">JSONlint.com</a>.

* `bio` contains:

name : string
role : string
contacts : an object with
mobile: string
email: string
github: string
twitter: string
location: string
welcomeMessage: string
skills: array of strings
biopic: url
display: function taking no parameters

* `education` contains:

schools: array of objects with
name: string
location: string
degree: string
majors: array of strings
dates: integer (graduation date)
url: string
onlineCourses: array with
title: string
school: string
date: integer (date finished)
url: string
display: function taking no parameters

* `work` contains

jobs: array of objects with
employer: string
title: string
location: string
dates: string (works with a hyphen between them)
description: string
display: function taking no parameters

* `projects` contains:

projects: array of objects with
title: string
dates: string (works with a hyphen between them)
description: string
images: array with string urls
display: function taking no parameters

2. Iterate through each JSON and append its information to index.html in the correct section.
* First off, you’ll be using jQuery’s `selector.append()` and `selector.prepend()` functions to modify index.html. `selector.append()` makes an element appear at the end of a selected section. `selector.prepend()` makes an element appear at the beginning of a selected section.
* Pay close attention to the ids of the `<div>`s in index.html and the HTML snippets in helper.js. They’ll be very useful as jQuery selectors for `selector.append()` and `selector.prepend()`
* You’ll also be using the JavaScript method `string.replace(old, new)` to swap out all the placeholder text (e.g. `%data%`) for data from your resume JSONs.
* Here’s an example of some code that would add the location of one your companies to the page:
* `var formattedLocation = HTMLworkLocation.replace("%data%", work.jobs[job].location);`
* `$(".work-entry:last").append(formattedLocation);`
* Use the mockup at the page of this document as a guide for the order in which you should append elements to the page.
3. The resume includes an interactive map. To add it, append the googleMap string to `<div id=”mapDiv”>`.
4. All of your code for adding elements to the resume should be within functions. And all of your functions should be encapsulated within the same objects containing your resume data. For instance, your functions for appending work experience elements to the page should be found within the same object containing data about your work experience.
5. Your resume should also `console.log()` information about click locations. On line 90 in helper.js, you’ll find a jQuery onclick handler that you’ll need to modify to work with the `logClicks(x,y)` function above it.
6. It’s possible to make additional information show up when you click on the pins in the map. Check out line 174 in helper.js and the Google Maps API to get started.
17 changes: 7 additions & 10 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
*{
padding:0;
margin:0;
font-family: 'Roboto', sans-serif;
* {
padding:0;
margin:0;
font-family: 'Roboto', sans-serif;
}

.clearfix {
Expand All @@ -14,15 +14,14 @@
}

h1 {

font-size: 40px;
color: #F5A623;
line-height: 48px;
display: inline;
}

h2 {
font-style: bold;
font-weight: bold;
font-size: 24px;
color: #999999;
line-height: 29px;
Expand All @@ -37,7 +36,7 @@ h3 {
}

h4 {
font-style: bold;
font-weight: bold;
font-size: 14px;
color: #4A4A4A;
line-height: 17px;
Expand Down Expand Up @@ -140,7 +139,6 @@ ul {
list-style-type: none;
}


.biopic {
float: left;
padding: 10px;
Expand All @@ -152,7 +150,6 @@ img {
padding: 10px;
}


/* Bar chart stuff */
.chart div {
font: 10px sans-serif;
Expand Down Expand Up @@ -215,4 +212,4 @@ span {
.biopic {
display: block;
}
}
}
86 changes: 47 additions & 39 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@
<scripts> for JavaScript files to build interactions.
-->
<head>
<link href="css/style.css" rel="stylesheet" type="text/css"></link>
<!-- This tells the browser how to read the document. -->
<meta charset="utf-8">

<!-- Tells the browser what the title of this page should be. -->
<title>Resume</title>

<!-- Load the page styles. -->
<link href="css/style.css" rel="stylesheet" type="text/css">

<!--
jQuery is a common JavaScript library for reading and making changes to the
Expand Down Expand Up @@ -45,7 +52,7 @@
</head>
<body unresolved>
<div id="main">
Hello world! <!-- You'll be deleting this line in the course -->
Hello world! <!-- You'll be deleting this line in the course -->

<!--
Everything from here to the <script> tag below is the skeleton of your
Expand All @@ -71,7 +78,7 @@ <h2>Where I've Lived and Worked</h2>
</div>
<div id="letsConnect" class='dark-gray'>
<h2 class='orange center-text'>Let's Connect</h2>
<ul id="footerContacts" class="flex-box">
<ul id="footerContacts" class="flex-box">
</ul>
</div>
</div>
Expand All @@ -93,40 +100,41 @@ <h2 class='orange center-text'>Let's Connect</h2>
-->

<script type="text/javascript">
// Notice how all of a sudden there's JavaScript inside this HTML
// document? You can write JavaScript between <script> tags. At the end of your
// JavaScript, don't forget the closing script tag with the slash (/).


// Also, this is a JavaScript style comment. You can comment in JavaScript with:

// two slashes for all following characters on a single line, or

/*
an opening and closing set of slash asterisks for block comments.
*/


if(document.getElementsByClassName("flex-item").length === 0) {
document.getElementById("topContacts").style.display = "none";
}
if(document.getElementsByTagName("h1").length === 0) {
document.getElementById("header").style.display = "none";
}
if(document.getElementsByClassName("work-entry").length === 0) {
document.getElementById("workExperience").style.display = "none";
}
if(document.getElementsByClassName("project-entry").length === 0) {
document.getElementById("projects").style.display = "none";
}
if(document.getElementsByClassName("education-entry").length === 0) {
document.getElementById("education").style.display = "none";
}
if(document.getElementsByClassName("flex-item").length === 0) {
document.getElementById("letsConnect").style.display = "none";
}
if(document.getElementById("map") == undefined) {
document.getElementById("mapDiv").style.display = "none";
}
// Notice how all of a sudden there's JavaScript inside this HTML
// document? You can write JavaScript between <script> tags. At the end of your
// JavaScript, don't forget the closing script tag with the slash (/).


// Also, this is a JavaScript style comment. You can comment in JavaScript with:

// two slashes for all following characters on a single line, or

/*
an opening and closing set of slash asterisks for block comments.
*/


if(document.getElementsByClassName('flex-item').length === 0) {
document.getElementById('topContacts').style.display = 'none';
}
if(document.getElementsByTagName('h1').length === 0) {
document.getElementById('header').style.display = 'none';
}
if(document.getElementsByClassName('work-entry').length === 0) {
document.getElementById('workExperience').style.display = 'none';
}
if(document.getElementsByClassName('project-entry').length === 0) {
document.getElementById('projects').style.display = 'none';
}
if(document.getElementsByClassName('education-entry').length === 0) {
document.getElementById('education').style.display = 'none';
}
if(document.getElementsByClassName('flex-item').length === 0) {
document.getElementById('letsConnect').style.display = 'none';
}
if(document.getElementById('map') === null) {
document.getElementById('mapDiv').style.display = 'none';
}
</script>
</body>
</body>
</html>
Loading

0 comments on commit bdfe030

Please sign in to comment.