Last active
March 10, 2016 22:14
-
-
Save timonmartin/1ada608ca0cfaf952b44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// $("#main").append(["Timon Martin"]); | |
// var awesomeThoughts = "I am Timon and I am awesome"; | |
// var funThoughts = awesomeThoughts.replace("awesome", "fun"); | |
// console.log(awesomeThoughts); | |
// $("#main").append(funThoughts); | |
// var name = "Timon Martin"; | |
// var role = "Producer"; | |
// var formattedName = HTMLheaderName.replace("%data%", name); | |
// var formattedRole = HTMLheaderRole.replace("%data%", role); | |
// $("#header").prepend(formattedRole); | |
// $("#header").prepend(formattedName); | |
var bio = { | |
"name" : "Timon Martin", | |
"role" : "Producer", | |
"welcome_message" : "I'm the host with the most!", | |
"contacts" : { | |
"mobile" : "0221647247", | |
"email" : "timonmartin@gmail.com", | |
"location" : "Auckland" | |
}, | |
"skills" : ["production", "songwriting", "arrangement", "musical direction"] | |
}; | |
var work = { | |
"jobs" : [ | |
{ | |
"employer" : "Someone", | |
"title" : "Something", | |
"location" : "NY/LA/Melbourne/Auckland", | |
"dates" : "2009 - present", | |
"description" : "Live arranger, musical director and guitarist for Someone" | |
}, | |
{ | |
"employer" : "La Commune Cafe", | |
"title" : "Owner and operator", | |
"location" : "Hamilton", | |
"dates" : "2006 - 2007", | |
"description" : "Started, owned and operated a vegetarian cafe" | |
} | |
] | |
}; | |
var projects = { | |
"myProjects" : [ | |
{ | |
"title" : "Kimbra - 90s Music", | |
"dates" : "2013 - 2014", | |
"description" : "Co-produced and co-wrote", | |
"images" : "https://i.ytimg.com/vi/q-iYDpRPeMY/maxresdefault.jpg" | |
}, | |
{ | |
"title" : "Goldmine Major Dudes Remix", | |
"dates" : "2015", | |
"description" : "Wrote and produced remix of Kimbra single", | |
"images" : "https://i.ytimg.com/vi/HdlsXDt0aiE/maxresdefault.jpg" | |
} | |
] | |
}; | |
var education = { | |
"schools" : [ | |
{ | |
"name" : "Wintec", | |
"location" : "Hamilton", | |
"majors" : "Commercial Music - Production", | |
"dates" : "2000 - 2002", | |
"url" : "http://www.wintec.ac.nz/" | |
}, | |
{ | |
"name" : "Waiuku College", | |
"location" : "Auckland", | |
"majors" : "None", | |
"dates" : "1995 - 1999", | |
"url" : "http://www.waiuku-college.school.nz/" | |
} | |
], | |
"onlineCourses" : [ | |
{ | |
"title" : "Intro to Programming", | |
"school" : "Udacity", | |
"dates" : "2016", | |
"url" : "https://www.udacity.com" | |
} | |
] | |
}; | |
if (bio.skills.length > 0) { | |
$("#header").append(HTMLheaderName.replace("%data%", bio.name)); | |
$("#header").append(HTMLskillsStart); | |
var formattedSkill = HTMLskills.replace("%data%", bio.skills[0]); | |
$("#skills").append(formattedSkill); | |
formattedSkill = HTMLskills.replace("%data%", bio.skills[1]); | |
$("#skills").append(formattedSkill); | |
formattedSkill = HTMLskills.replace("%data%", bio.skills[2]); | |
$("#skills").append(formattedSkill); | |
formattedSkill = HTMLskills.replace("%data%", bio.skills[3]); | |
$("#skills").append(formattedSkill); | |
} | |
function displayWork() { | |
for (job in work.jobs) { | |
$("#workExperience").append(HTMLworkStart); | |
var formattedEmployer = HTMLworkEmployer.replace("%data%", work.jobs[job].employer); | |
var formattedJobTitle = HTMLworkTitle.replace("%data%", work.jobs[job].title); | |
var formattedEmployerTitle = formattedEmployer + formattedJobTitle; | |
$(".work-entry:last").append(formattedEmployerTitle); | |
var formattedDates = HTMLworkDates.replace("%data%", work.jobs[job].dates); | |
$(".work-entry:last").append(formattedDates); | |
var formattedLocation = HTMLworkLocation.replace("%data%", work.jobs[job].location); | |
$(".work-entry:last").append(formattedLocation); | |
var formattedDescription = HTMLworkDescription("%data%", work.jobs[job].description); | |
$(".work-entry:last").append(formattedDescription); | |
}; | |
}; | |
displayWork(); | |
$("#main").append(internationalizeButton); | |
function inName() { | |
var myNameArray = bio.name.split(" "); | |
var capsLastName = myNameArray[1].toUpperCase(); | |
return myNameArray[0] + " " + capsLastName; | |
} | |
projects.display = function() { | |
for (project in projects.myProjects) { | |
$("#projects").append(HTMLprojectStart); | |
var formattedTitle = HTMLprojectTitle.replace("%data%", projects.myProjects[project].title); | |
$(".project-entry:last").append(formattedTitle); | |
var formattedDates = HTMLprojectDates.replace("%data%", projects.myProjects[project].dates); | |
$(".project-entry:last").append(formattedDates); | |
var formattedDescription = HTMLprojectDescription.replace("%data%", projects.myProjects[project].description); | |
$(".project-entry:last").append(formattedDescription); | |
var formattedImage = HTMLprojectImage.replace("%data%", projects.myProjects[project].images); | |
$(".project-entry:last").append(formattedImage); | |
} | |
} | |
projects.display(); | |
$("#mapDiv").append(googleMap); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment