Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add projects section #15

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
3 changes: 2 additions & 1 deletion app/styles/layouts/_print.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
padding: 0 22px 0 34px;
}
}

/*
.container {
page-break-inside: avoid;
}
Expand All @@ -25,6 +25,7 @@
page-break-inside: avoid;
}
}
*/

.fa-external-link {
display: none;
Expand Down
37 changes: 37 additions & 0 deletions app/views/components/projects.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{{#if resume.projects.length}}
<div class="container work-container">
{{> title value="Projects"}}

{{#each resume.projects}}
<section class="item">
{{> section-header name=this.name }}

{{#if entity}}
<h4>{{entity}}</h4>
{{/if}}

{{#if description}}
<p class="summary">{{description}}</p>
{{/if}}

{{#if roles.length}}
<h6>Roles</h6>
<ul>
{{#each roles}}
<li>{{.}}</li>
{{/each}}
</ul>
{{/if}}

{{#if highlights.length}}
<h6>Highlights</h6>
<ul>
{{#each highlights}}
<li>{{.}}</li>
{{/each}}
</ul>
{{/if}}
</section>
{{/each}}
</div>
{{/if}}
6 changes: 5 additions & 1 deletion app/views/components/work.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
<div class="container work-container">
{{> title value="Experience"}}

{{#each resume.work}}
{{#each (filterRepeatKey resume.work "company")}}
<section class="item">
{{#if repeated}}
{{> section-header name="" }}
{{else}}
{{> section-header name=this.company }}
{{/if}}

{{#if position}}
<h4>{{position}}</h4>
Expand Down
1 change: 1 addition & 0 deletions app/views/resume.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
{{> summary}}
{{> work }}
{{> volunteer }}
{{> projects }}
{{> education }}
{{> awards }}
{{> publications }}
Expand Down
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ handlebars.registerHelper({

formatDate: function (date) {
return moment(date).format('MM/YYYY');
},

filterRepeatKey: function(list, key) {
return list.map((curr, i, array) => {
if (curr[key] == array[i-1]?.[key]) {
curr.repeated = true
}
return curr
})
}
});

Expand Down