jsonresume-theme-engineering 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +5 -2
  2. package/package.json +1 -1
  3. package/views/work.hbs +11 -10
package/index.js CHANGED
@@ -47,9 +47,12 @@ handlebars.registerHelper({
47
47
 
48
48
  formatDate: function (date) {
49
49
  return moment(date).format('MMM YYYY');
50
- }
51
- });
50
+ },
52
51
 
52
+ getValueIfDiffFromPrevious: function (array, index, key) {
53
+ return (array[index-1] && (array[index][key] === array[index-1][key])) ? '' : array[index][key];
54
+ },
55
+ });
53
56
 
54
57
  function render(resume) {
55
58
  let dir = __dirname,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsonresume-theme-engineering",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "JSON Resume theme for engineers",
5
5
  "author": "Sören König",
6
6
  "repository": {
package/views/work.hbs CHANGED
@@ -2,15 +2,16 @@
2
2
  <section id="work">
3
3
  <h2>Work Experience</h2>
4
4
  {{#each resume.work}}
5
- {{#> item title=name subtitle=position location=location startDate=startDate endDate=endDate startDate2=startDate2 endDate2=endDate2}}
6
- {{#if highlights.length}}
7
- <ul class="highlights">
8
- {{#each highlights}}
9
- <li>{{.}}</li>
10
- {{/each}}
11
- </ul>
12
- {{/if}}
13
- {{/item}}
5
+ {{#> item title=(getValueIfDiffFromPrevious @root.resume.work @index "company") subtitle=position location=location startDate=startDate endDate=endDate startDate2=startDate2 endDate2=endDate2}}
6
+
7
+ {{#if highlights.length}}
8
+ <ul class="highlights">
9
+ {{#each highlights}}
10
+ <li>{{.}}</li>
11
+ {{/each}}
12
+ </ul>
13
+ {{/if}}
14
+ {{/item}}
14
15
  {{/each}}
15
16
  </section>
16
- {{/if}}
17
+ {{/if}}