jsonresume-theme-tech 1.5.2 → 1.6.0
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.
- package/index.js +11 -0
- package/package.json +1 -1
- package/resume.hbs +5 -5
- package/style.css +9 -0
package/index.js
CHANGED
|
@@ -12,6 +12,17 @@ function validateArray(arr) {
|
|
|
12
12
|
return arr !== undefined && arr !== null && arr instanceof Array && arr.length > 0;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
16
|
+
|
|
17
|
+
// "2025-06" or "2025-06-01" -> "Jun 2025"; other values (e.g. "2016") pass through.
|
|
18
|
+
function formatDate(value) {
|
|
19
|
+
var match = /^(\d{4})-(\d{2})(-\d{2})?$/.exec(String(value));
|
|
20
|
+
var month = match && MONTHS[Number(match[2]) - 1];
|
|
21
|
+
return month ? month + " " + match[1] : value;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
Handlebars.registerHelper("date", formatDate);
|
|
25
|
+
|
|
15
26
|
function render(resume) {
|
|
16
27
|
PREPEND_SUMMARY_CATEGORIES.forEach(function(category) {
|
|
17
28
|
if (resume[category] !== undefined) {
|
package/package.json
CHANGED
package/resume.hbs
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
{{#if resume.basics._showExecutiveSummary}}
|
|
39
39
|
<div class='summaryBlock'>
|
|
40
40
|
<h2 class='sectionName'>
|
|
41
|
-
<span>Executive Summary</span>
|
|
41
|
+
<span>{{#if resume.meta.summaryTitle}}{{resume.meta.summaryTitle}}{{else}}Executive Summary{{/if}}</span>
|
|
42
42
|
</h2>
|
|
43
43
|
<div class='sectionContent'>
|
|
44
44
|
{{#if resume.basics.summary}}<p class='summary summaryProse'>{{{resume.basics.summary}}}</p>{{/if}}
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
{{#if name}}<div class='companyLine'><span class='companyName'>{{{name}}}</span>{{#if location}}, {{{location}}}{{/if}}</div>{{/if}}
|
|
70
70
|
{{#if startDate}}
|
|
71
71
|
<div class='dateLine'>
|
|
72
|
-
<span class='date'>{{#if startDate}}{{startDate}}{{/if}} - {{#if endDate}}{{endDate}}{{else}}Present{{/if}}</span>
|
|
72
|
+
<span class='date'>{{#if startDate}}{{date startDate}}{{/if}} - {{#if endDate}}{{date endDate}}{{else}}Present{{/if}}</span>
|
|
73
73
|
</div>
|
|
74
74
|
{{/if}}
|
|
75
75
|
</div>
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
</h3>
|
|
112
112
|
{{#if startDate}}
|
|
113
113
|
<div class='dateLine'>
|
|
114
|
-
<span class='date'>{{startDate}} - {{#if endDate}}{{endDate}}{{else}}Present{{/if}}</span>
|
|
114
|
+
<span class='date'>{{date startDate}} - {{#if endDate}}{{date endDate}}{{else}}Present{{/if}}</span>
|
|
115
115
|
</div>
|
|
116
116
|
{{/if}}
|
|
117
117
|
</div>
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
{{#if studyType}}<div class='degree'><em>{{{studyType}}}{{#if area}} ({{{area}}}){{/if}}</em></div>{{/if}}
|
|
197
197
|
{{#if startDate}}
|
|
198
198
|
<div class='dateLine'>
|
|
199
|
-
<span class='date'>{{startDate}} - {{#if endDate}}{{endDate}}{{else}}Present{{/if}}</span>
|
|
199
|
+
<span class='date'>{{date startDate}} - {{#if endDate}}{{date endDate}}{{else}}Present{{/if}}</span>
|
|
200
200
|
</div>
|
|
201
201
|
{{/if}}
|
|
202
202
|
</div>
|
|
@@ -314,7 +314,7 @@
|
|
|
314
314
|
{{#if position}}<div class='position'><strong>{{{position}}}</strong></div>{{/if}}
|
|
315
315
|
{{#if startDate}}
|
|
316
316
|
<div class='dateLine'>
|
|
317
|
-
<span class='date'>{{#if startDate}}{{startDate}}{{/if}} - {{#if endDate}}{{endDate}}{{else}}Present{{/if}}</span>
|
|
317
|
+
<span class='date'>{{#if startDate}}{{date startDate}}{{/if}} - {{#if endDate}}{{date endDate}}{{else}}Present{{/if}}</span>
|
|
318
318
|
</div>
|
|
319
319
|
{{/if}}
|
|
320
320
|
</div>
|
package/style.css
CHANGED
|
@@ -516,6 +516,15 @@ ul.coursesList {
|
|
|
516
516
|
/* Keep role/company header with the start of its body; bullets may continue on next page. */
|
|
517
517
|
.sectionContent > div > .blockHeader,
|
|
518
518
|
.sectionContent > div > .publicationHeader {
|
|
519
|
+
break-inside: avoid;
|
|
520
|
+
page-break-inside: avoid;
|
|
521
|
+
break-after: avoid;
|
|
522
|
+
page-break-after: avoid;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/* Never end a page between a role header, its intro and the first bullet. */
|
|
526
|
+
.jobBlock > .summary {
|
|
527
|
+
break-inside: avoid;
|
|
519
528
|
break-after: avoid;
|
|
520
529
|
page-break-after: avoid;
|
|
521
530
|
}
|