Skip to content

Commit

Permalink
more updates
Browse files Browse the repository at this point in the history
  • Loading branch information
arw180 committed Aug 23, 2014
1 parent 17bb310 commit 8dbc003
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 27 deletions.
17 changes: 12 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var fs = require('fs');
var Handlebars = require('handlebars');
var Moment = require('moment');

function render(resume) {
var css = fs.readFileSync(__dirname + "/style.css", "utf-8");
Expand All @@ -22,21 +23,27 @@ function render(resume) {
};

function setTwitterUsername(resume) {
for (var i=0; i < resume.basics.profiles.length; i++) {
if (resume.basics.profiles[i].network.toLowerCase() === 'twitter') {
resume.basics.twitter = resume.basics.profiles[i].username;
}
for (var i=0; i < resume.basics.profiles.length; i++) {
if (resume.basics.profiles[i].network.toLowerCase() === 'twitter') {
resume.basics.twitter = resume.basics.profiles[i].username;
}
}
}

function setGithubUsername(resume) {
for (var i=0; i < resume.basics.profiles.length; i++) {
for (var i=0; i < resume.basics.profiles.length; i++) {
if (resume.basics.profiles[i].network.toLowerCase() === 'github') {
resume.basics.github = resume.basics.profiles[i].username;
}
}
}

Handlebars.registerHelper("prettifyDate", function(resumeDate) {
var newDate = Moment(resumeDate).format('MMM YYYY');
console.log('newDate: ' + newDate);
return newDate;
});

module.exports = {
render: render
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"author": "Alan Ward",
"license": "MIT",
"dependencies": {
"handlebars": "^2.0.0-alpha.4"
"handlebars": "^2.0.0-alpha.4",
"moment": "^2.8.2"
},
"repository": {
"type": "git",
Expand Down
55 changes: 35 additions & 20 deletions resume.template
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<h3 class="title">{{label}}</h3>
</div>
<div class="col-sm-6 contact-info">
<ul>
<ul class="pull-right">
<li>{{email}}</li>
<li>{{phone}}</li>
<li>
Expand All @@ -42,10 +42,10 @@

<!-- Profile/summary -->
<div class="row">
<div class="col-md-3">
Profile
<div class="col-sm-2">
<h4 class="section-title"> Profile </h4>
</div>
<div class="col-md-9">
<div class="col-sm-10">
{{summary}}
</div>
{{/resume.basics}}
Expand All @@ -54,14 +54,14 @@

<!-- Skills - assumes 2 skills -->
<div class="row">
<div class="col-md-3">
Skills
<div class="col-sm-2">
<h4 class="section-title"> Skills </h4>
</div>
<div class="col-md-9">
<div class="col-sm-10">
<div class="row">
{{#each resume.skillsGroup1}}
<div
class="col-md-6">
class="col-sm-6">
{{name}}
<ul>
{{#each keywords}}
Expand All @@ -77,17 +77,28 @@

<!-- Experience -->
<div class="row">
<div class="col-md-3">
Experience
<div class="col-sm-2">
<h4 class="section-title"> Experience </h4>
</div>
<div class="col-md-9">
<div class="col-sm-10">
{{#each resume.work}}
<div class="row">
<div class="col-md-6">
{{company}}
<div class="col-sm-6">
<div class="company"> {{company}} </div>
<div class="company-position"><em>{{position}}</em></div>
</div>
<div class="col-md-6">
{{startDate}} - {{endDate}}
<div class="col-sm-6">
<span class="pull-right"> {{prettifyDate startDate}} - {{prettifyDate endDate}} </span>
</div>
</div>
<div class="row company-description">
<div class="col-sm-12">
<ul>
<li class="company-summary">{{summary}}</li>
{{#each highlights}}
<li>{{this}}</li>
{{/each}}
</ul>
</div>
</div>
{{/each}}
Expand All @@ -97,18 +108,22 @@

<!-- Education -->
<div class="row">
<div class="col-md-3">
Education
<div class="col-sm-2">
<h4 class="section-title"> Education </h4>
</div>
<div class="col-md-9">
<div class="col-sm-10">
{{#each resume.education}}
<div class="row">
{{institution}}
<div class="col-sm-8">
<div class="school"> {{institution}} </div>
{{studyType}} in {{area}}
</div>

</div>
{{/each}}
</div>

</div>
</div>
</div> <!-- /end container-fluid -->
</body>
</html>
31 changes: 30 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,33 @@ hr {

.contact-info ul {
list-style-type: none;
}
}

.section-title {

}

.company, .school {
font-size: 16px;
}

.company-position {

}

.company-summary {
margin-bottom: 5px;
font-weight: bold;
}

.company-description {
margin-bottom: 10px;
}

.company-description ul {
padding-left: 0px;
list-style-type: none;
}



0 comments on commit 8dbc003

Please sign in to comment.