-
Notifications
You must be signed in to change notification settings - Fork 32
/
index.html
1 lines (1 loc) · 17 KB
/
index.html
1
<!DOCTYPE html><html><head><meta charset=utf-8><link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700" rel=stylesheet type=text/css><script src=https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js></script><link rel=stylesheet href=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css integrity=sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7 crossorigin=anonymous><script src=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js integrity=sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS crossorigin=anonymous></script><script type=text/javascript src=username.js></script><title></title><meta name=viewport content="width=device-width,initial-scale=1"><style>@import url(http://weloveiconfonts.com/api/?family=zocial);[class*=zocial-]:before{font-family:zocial,sans-serif}.source-sans{font-family:'Source Sans Pro',sans-serif;font-weight:400;background-color:#fff}p{font-size:16px}.fixed-nav-bar{position:fixed;top:0;left:0;z-index:99999;width:100%;height:52px;color:#fff;background-color:#03A9F4;-webkit-box-shadow:0 8px 6px -6px #999;-moz-box-shadow:0 8px 6px -6px #999;box-shadow:0 8px 6px -6px #999}.carousel-control.left,.carousel-control.right{background-image:none!important}.clickable{cursor:pointer}.modal{-webkit-overflow-scrolling:auto}.projectModal{margin-top:55px}#main{margin-top:50px}.img-gallery{max-height:350px;margin-left:auto;margin-right:auto}.highlights{margin-top:10px}.text-name{margin:auto}.text-bold{font-size:18px}.text-muted{color:rgba(148,148,148,.98)}ul{list-style-type:none}.bullet-list{list-style-type:disc}#contacts{margin-top:20px}.image-center{margin:auto}.thumbnail-image{max-height:225px;margin-top:30px;margin-left:auto;margin-right:auto}.date-text{font-style:italic;font-size:14px;color:#999;line-height:16px;float:right}.location-text{font-style:italic;font-size:14px;color:#999;line-height:16px;float:left}.awarder-text{font-size:14px;color:#999;line-height:16px;float:left}.gpa-text{font-style:italic;font-size:14px;color:#999;line-height:16px}.contact-text{margin-left:5px}.social-list{font-size:3.5em;line-height:2.5em}.social{width:100%;margin-left:auto;margin-right:auto}.social ul{list-style-type:none;text-align:center;margin:0 auto;padding:0;display:table;overflow:hidden}.social li{float:left;padding:2px;width:125px;margin-left:auto;margin-right:auto}.award-detail-text{padding-left:20px}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.fade-in{opacity:0;-webkit-animation:fadeIn ease-in 1;-moz-animation:fadeIn ease-in 1;animation:fadeIn ease-in 1;-webkit-animation-fill-mode:forwards;-moz-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-duration:1s;-moz-animation-duration:1s;animation-duration:1s}</style><body class="source-sans fade-in"><nav class="fixed-nav-bar text-center"><h2 id=name class="text-thin text-name"></h2><div id=title></div></nav><div id=main class=container><div class=row><div class=col-md-12><ul id=contacts class="list-inline text-center"></ul></div></div><hr></div><footer class=text-center><p><a href=http://navdeepsekhon.com>Designed by Navdeep Sekhon</a></p></footer><div class=hidden id=image-repo></div><div class="modal fade projectModal" id=modal-gallery role=dialog><div class=modal-dialog><div class=modal-content><div class=modal-header><button class=close type=button data-dismiss=modal>×</button><h3 id=gallery-title class="modal-title text-center"></h3></div><div class=modal-body><div id=modal-carousel class=carousel><div class=carousel-inner></div><a class="carousel-control left" href=#modal-carousel data-slide=prev><i class="glyphicon glyphicon-chevron-left"></i></a> <a class="carousel-control right" href=#modal-carousel data-slide=next><i class="glyphicon glyphicon-chevron-right"></i></a></div><p class=text-center id=modal-project-desc></p></div><div class=modal-footer><button class="btn btn-default" data-dismiss=modal>Close</button></div></div></div></div><div class="modal fade projectModal" id=modal-desc tabindex=-1 role=dialog aria-labelledby=modal-title aria-hidden=true><div class=modal-dialog><div class=modal-content><div class=modal-header><h3 class="modal-title text-center" id=modal-title></h3></div><div id=modal-desc-body class="modal-body text-center"></div><div class=modal-footer><button type=button class="btn btn-default" data-dismiss=modal>Close</button></div></div></div></div><script type=text/javascript>function setData(e){DOMMain=document.getElementById("main"),document.title=e.personal.name+","+e.personal.title,titleOnActive=e.personal.name+","+e.personal.title,document.getElementById("name").innerHTML=e.personal.name,document.getElementById("title").innerHTML=e.personal.title,addContacts(e.personal);var t=defaultOrder;void 0!=e.displayOrder&&0!=e.displayOrder.length&&(t=e.displayOrder);for(var a in t)functions[t[a]](e);$(".tooltip-image").tooltip(),$(".tooltip-image").first().tooltip("show"),addProjectThumbnailListener(),addCollapseListeners()}function addShortBio(e){var t=e.personal;void 0!=t.shortBio&&""!=t.shortBio&&append(DOMMain,HTMLShortBio.replace("%data%",t.shortBio))}function addContacts(e){void 0!=e.email&&""!=e.email&&append(document.getElementById("contacts"),HTMLEmail.replace("%data%",e.email)),void 0!=e.phone&&""!=e.phone&&append(document.getElementById("contacts"),HTMLPhone.replace("%data%",e.phone)),void 0!=e.location&&""!=e.location&&append(document.getElementById("contacts"),HTMLLocation.replace("%data%",e.location)),void 0!=e.website&&""!=e.website&&append(document.getElementById("contacts"),replaceAll(HTMLPersonalWebsite,"%data%",e.website))}function addProjectSections(e){if(void 0!=e.projectSections&&0!=e.projectSections.length){var t=e.projectSections;for(var a in t){var i=HTMLProjectsStart.replace("%sectionTitle%",t[a].title);i=i.replace("%id%",a),append(DOMMain,i);var l=document.getElementById("projects"+a);addProjects(t[a].projects,l)}}}function addProjects(e,t){var a,i=0,l="";for(var o in e)i++,1==i&&(append(t,HTMLProjectRow),a=document.getElementsByClassName("project-row"),a=a[a.length-1]),void 0!=e[o].gallery&&0!=e[o].gallery.length?(addProjectImagesToRepo(e[o].gallery,o),l=HTMLProjectWithGallery):l=void 0!=e[o].description&&""!=e[o].description?HTMLProjectWithModal:HTMLProjectSimple,l=l.replace("%image%",e[o].thumbnail),l=replaceAll(l,"%title%",e[o].title),l=l.replace("%id%",o),void 0!=e[o].link&&""!=e[o].link&&(l+=HTMLProjectLink.replace("%link%",e[o].link)),void 0!=e[o].description&&0!=e[o].description.length&&(l=e[o].description instanceof Array?addProjectBulletDescription(l,e[o].description):l.replace("%projectDesc%",e[o].description)),append(a,l),3==i&&(i=0)}function addProjectBulletDescription(e,t){var a=HTMLProjectBulletDescriptionStart;for(var i in t)a+=HTMLProjectBulletDescriptionItem.replace("%data%",t[i]);return a+=HTMLProjectBulletDescriptionEnd,e=e.replace("%projectDesc%",a)}function addProjectImagesToRepo(e,t){var a=document.getElementById("image-repo");for(var i in e){var l=HTMLProjectGalleryItem.replace("%src%",e[i]);l=l.replace("%id%",t),append(a,l)}}function replaceAll(e,t,a){return e.replace(new RegExp(t,"g"),a)}function addAwards(e){if(void 0!=e.awards&&0!=e.awards.length){var t=e.awards;append(DOMMain,HTMLAwardsStart);var a=document.getElementById("awards");for(var i in t){var l=HTMLAwardTitle.replace("%data%",t[i].title),o=HTMLAwarderAndDate.replace("%awarder%",t[i].awarder);if(o=o.replace("%date%",t[i].date),append(a,l),append(a,o),null!=t[i].description&&""!=t[i].description){var r="awardDetails"+i,n="detailsDiv"+r,d=HTMLAwardDetailsTitle.replace("%id%",r);d=d.replace("%targetId%",n),append(a,d),append(a,HTMLAwardDetails.replace("%id%",n).replace("%data%",t[i].description))}}}}function addVolunteer(e){if(void 0!=e.volunteer&&0!=e.volunteer.length){var t=e.volunteer;DOMMain.innerHTML+=HTMLVolunteerStart;var a=document.getElementById("volunteer");for(var i in t){var l=HTMLJobTitle.replace("%data%",t[i].title),o=HTMLEmploymentDateAndLocation.replace("%date%",void 0===t[i].dates?"":t[i].dates);o=o.replace("%location%",void 0===t[i].location?"":t[i].location);var r="";if(void 0!=t[i].website&&""!=t[i].website?(r=HTMLEmployer.replace("%employer%",t[i].organization),r=r.replace("%url%",t[i].website)):r=HTMLEmployerWithoutUrl.replace("%employer%",t[i].organization),append(a,r),append(a,l),append(a,o),void 0!=t[i].highlights&&t[i].highlights instanceof Array&&0!=t[i].highlights.length){var n="volunteerHighlights"+i,d="highlightDiv-"+n;append(a,HTMLWorkHighlightsTitle.replace("%targetId%",n).replace("%id%",d));var c=document.getElementById(d);append(c,HTMLWorkHighlightsList.replace("%data%",n));var s=document.getElementById(n);for(var p in t[i].highlights)append(s,HTMLWorkHighlightsListItem.replace("%data%",t[i].highlights[p]))}}}}function addWork(e){if(void 0!==e.work&&0!==e.work.length){var t=e.work;DOMMain.innerHTML+=HTMLWorkExperienceStart;var a=document.getElementById("work");for(var i in t){var l=HTMLJobTitle.replace("%data%",t[i].title),o=HTMLEmploymentDateAndLocation.replace("%date%",void 0===t[i].dates?"":t[i].dates);o=o.replace("%location%",void 0===t[i].location?"":t[i].location);var r="";if(void 0!=t[i].website&&""!=t[i].website?(r=HTMLEmployer.replace("%employer%",t[i].employer),r=r.replace("%url%",t[i].website)):r=HTMLEmployerWithoutUrl.replace("%employer%",t[i].employer),append(a,r),append(a,l),append(a,o),null!=t[i].highlights&&0!=t[i].highlights.length){var n="workHighlights"+i,d="highlightDiv-"+n;append(a,HTMLWorkHighlightsTitle.replace("%targetId%",d).replace("%id%",n));var c=document.getElementById(n);append(c,HTMLWorkHighlightsList.replace("%data%",d));var s=document.getElementById(d);for(var p in t[i].highlights)append(s,HTMLWorkHighlightsListItem.replace("%data%",t[i].highlights[p]))}}}}function addEducation(e){if(void 0!==e.education&&0!==e.education.length){var t=e.education;append(DOMMain,HTMLEducationStart);var a=document.getElementById("education");for(var i in t){var l=HTMLInstitutionName.replace("%data%",t[i].institution),o=t[i].degree+", "+t[i].major,r=HTMLEmploymentDateAndLocation.replace("%date%",t[i].graduationDate);if(r=r.replace("%location%",o),a.innerHTML+=l,a.innerHTML+=r,void 0!=t[i].gpa&&""!=t[i].gpa){var n=HTMLGpa.replace("%data%",t[i].gpa);a.innerHTML+=n}}}}function addSocialLinks(e){if(void 0!==e.personal.profiles&&0!==e.personal.profiles.length){var t=e.personal.profiles;DOMMain.innerHTML+=HTMLSocialStart;var a=document.getElementById("social");for(var i in t){var l=HTMLSocialItem.replace("%network%",t[i].network.toLowerCase());l=l.replace("%link%",t[i].url),a.innerHTML+=l}}}function append(e,t){e.innerHTML+=t}function addProjectThumbnailListener(){addListenerForGallery(),addListenerForModal()}function addListenerForGallery(){$(".gallery-thumbnail-image").click(function(){var e=$(".carousel-inner"),t=$("#gallery-title"),a=this.getAttribute("project-desc"),i=this.getAttribute("project-title"),l=document.getElementById("modal-project-desc");e.empty(),t.empty();var o=this.id,r=$("#image-repo .item"),n=r.filter("#"+o).clone(),d=n.first();d.addClass("active"),t.html(i),l.innerHTML=a,e.append(n),$("#modal-gallery").modal("show")})}function addListenerForModal(){$(".modal-thumbnail-image").click(function(){var e=document.getElementById("modal-desc-body"),t=document.getElementById("modal-title"),a=this.getAttribute("project-desc"),i=this.getAttribute("project-title");t.innerHTML=i,e.innerHTML=a,$("#modal-desc").modal("show")})}function addCollapseListeners(){$(".collapse").on("shown.bs.collapse",function(){$(this).parent().find(".glyphicon").removeClass("glyphicon-triangle-right").addClass("glyphicon-triangle-bottom")}),$(".collapse").on("hidden.bs.collapse",function(){$(this).parent().find(".glyphicon").removeClass("glyphicon-triangle-bottom").addClass("glyphicon-triangle-right")})}var RESUME_LOCATION="https://raw.githubusercontent.com/"+GITHUB_USERNAME+"/portfolio-generator/master/resume.json",titleOnBlur="Miss You :(",titleOnActive="Portfolio",HTMLEmail='<li><span class="glyphicon glyphicon-envelope contact-icon"></span><span class="contact-text">%data%</span></li>',HTMLPhone='<li><span class="glyphicon glyphicon-earphone contact-icon"></span><span class="contact-text">%data%</span></li>',HTMLPersonalWebsite='<li><span class="glyphicon glyphicon-globe contact-icon"></span><span class="contact-text"><a href ="%data%">%data%</a></span></li>',HTMLLocation='<li><span class="glyphicon glyphicon-home contact-icon"></span><span class="contact-text">%data%</span></li>',HTMLShortBio='<div class="row"><div class="col-md-12"><p id ="short-bio" class="text-center">%data%</p></div></div><hr/>',HTMLProjectsStart='<div class="row"><div class="col-md-12"><h2 class="text-muted">%sectionTitle%</h2></div></div><div id="projects%id%"></div><hr/>',HTMLProjectRow='<div class="row text-center project-row"></div>',HTMLProjectWithGallery='<div class="col-md-4"><img id="project-%id%" project-title="%title%" project-desc="%projectDesc%" class="img-responsive image-center gallery-thumbnail-image thumbnail-image tooltip-image clickable" title="Click image for more information" src="%image%" ><h3>%title%</h3>',HTMLProjectWithModal='<div class="col-md-4"><img id="project-%id%" project-title="%title%" project-desc="%projectDesc%" class="img-responsive image-center modal-thumbnail-image thumbnail-image tooltip-image clickable" title="Click image for more information" src="%image%" ><h3>%title%</h3>',HTMLProjectSimple='<div class="col-md-4"><img id="project-%id%" project-title="%title%" project-desc="%projectDesc%" class="img-responsive image-center thumbnail-image" src="%image%" ><h3>%title%</h3>',HTMLProjectLink='<p><a href="%link%" target="_blank">Link to project</a></p>',HTMLProjectGalleryItem='<div class="item" id="project-%id%"><img class="img-responsive img-gallery" src="%src%"></div>',HTMLProjectBulletDescriptionStart="<ul class='bullet-list text-left'>",HTMLProjectBulletDescriptionItem="<li>%data%</li>",HTMLProjectBulletDescriptionEnd="</ul>",HTMLWorkExperienceStart='<div class="row"><div class="col-md-12"><h2 class="text-muted">Work Experience</h2></div></div><div id="work"></div><hr/>',HTMLInstitutionName='<div class="row"><div class="col-md-12"><h3>%data%</h3></div></div>',HTMLEmploymentDateAndLocation='<div class="row"><div class="col-md-6 location-text">%location%</div><div class="col-md-6 date-text text-right">%date%</div></div>',HTMLEmployer='<div class="row"><div class="col-md-12"><a href="%url%" target="_blank"><h3>%employer%</h3></a></div>',HTMLEmployerWithoutUrl='<div class="row"><div class="col-md-12"><h3>%employer%</h3></div>',HTMLJobTitle='<div class="row"><div class="col-md-12"><p>%data%</p></div>',HTMLEmploymentDates='<div class="col-md-6 date-text text-right">%data%</div>',HTMLWorkLocation='<div class="col-md-6 location-text">%data%</div>',HTMLWorkHighlightsTitle='<div class="row"><div id= "%id%" class="col-md-12 highlights clickable" data-toggle="collapse" data-target="#%targetId%"><span class="glyphicon glyphicon-triangle-right contact-icon"></span><span class="text-bold contact-text">Highlights</span></div></div>',HTMLWorkHighlightsList='<ul class="collapse bullet-list" id = "%data%"></ul>',HTMLWorkHighlightsListItem="<li>%data%</li>",HTMLEducationStart=' <div class="row"><div class="col-md-12"><h2 class="text-muted">Education</h2></div></div><div id="education"></div><hr/>',HTMLDegree='<div class="col-md-4 location-text">%data%</div>',HTMLGpa='<div class="row"><div class="col-md-12 gpa-text text-left">GPA: %data%</div></div>',HTMLSocialStart='<div class="social"><ul id="social" class="social-list"></ul></div>',HTMLSocialItem='<li ><a href="%link%" target="_blank"><span class="zocial-%network%"></span></a></li>',HTMLSocialEnd="</ul>",HTMLAwardsStart=' <div class="row"><div class="col-md-12"><h2 class="text-muted">Awards</h2></div></div><div id="awards"></div><hr/>',HTMLAwardTitle='<div class="row"><div class="col-md-12"><h3>%data%</h3></div></div>',HTMLAwarderAndDate='<div class="row"><div class="col-md-6 text-left"><p>%awarder%</p></div><div class="col-md-6 date-text text-right">%date%</div></div>',HTMLAwardDetails='<div class="row collapse award-detail-text" id ="%id%"><div class="col-md-9"><p>%data%</p></div></div>',HTMLAwardDetailsTitle='<div class="row"><div id= "%id%" class="col-md-12 highlights clickable" data-toggle="collapse" data-target="#%targetId%"><span class="glyphicon glyphicon-triangle-right contact-icon"></span><span class="text-bold contact-text">Details</span></div></div>',HTMLVolunteerStart='<div class="row"><div class="col-md-12"><h2 class="text-muted">Volunteer Work</h2></div></div><div id="volunteer"></div><hr/>';window.onblur=function(){document.title=titleOnBlur},window.onfocus=function(){document.title=titleOnActive};var defaultOrder=["shortBio","projects","work","education","awards","volunteer","social"],functions=[];functions.shortBio=addShortBio,functions.work=addWork,functions.projects=addProjectSections,functions.awards=addAwards,functions.education=addEducation,functions.volunteer=addVolunteer,functions.social=addSocialLinks;var DOMMain=null;$("#modal-carousel").carousel({interval:!1}),$.getJSON(RESUME_LOCATION,function(e){setData(e)});</script>