@enure/jacklin 1.3.4 → 1.4.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 CHANGED
@@ -14,6 +14,18 @@ Handlebars.registerHelper("summaryToList", (string) => {
14
14
  }
15
15
  });
16
16
 
17
+ Handlebars.registerHelper("getShortDate", (dateStr) => {
18
+ if (typeof dateStr === 'string') {
19
+ const date = new Date(dateStr);
20
+ const year = date.getFullYear();
21
+ const month = date.getMonth();
22
+ const fullMonth = month.toString().length === 1 ? `0${month} : ${month}`;
23
+ return `${year}-${fullMonth}`;
24
+ } else {
25
+ return dateStr;
26
+ }
27
+ });
28
+
17
29
  export const render = (resume) => {
18
30
  const modulePath = dirname(fileURLToPath(import.meta.url));
19
31
  const template = readFileSync(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enure/jacklin",
3
- "version": "1.3.4",
3
+ "version": "1.4.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -12,6 +12,18 @@
12
12
  padding: 64px;
13
13
  text-wrap: pretty;
14
14
  }
15
+ @media print {
16
+ body {
17
+ padding: 0;
18
+ }
19
+ }
20
+ @page {
21
+ size: 8.5in 11in;
22
+ margin-top: 0.8in;
23
+ margin-left: 0.7in;
24
+ margin-right: 0.7in;
25
+ margin-bottom: 0.8in;
26
+ }
15
27
  main {
16
28
  margin-top: 48px;
17
29
  max-width: 800px;
@@ -19,6 +31,9 @@
19
31
  main > section {
20
32
  margin-top: 36px;
21
33
  }
34
+ section {
35
+ break-inside: avoid;
36
+ }
22
37
  h1, h2 {
23
38
  font-size: 14px;
24
39
  font-weight: 500;
@@ -41,10 +56,10 @@
41
56
  }
42
57
  .WorkList-item {
43
58
  margin-top: 16px;
44
- /* page-break-inside: avoid; */
59
+ break-inside: avoid;
45
60
  }
46
61
  .WorkList-dates {
47
- color: #777;
62
+ color: #666;
48
63
  font-size: 14px;
49
64
  }
50
65
  .WorkList-positionAt {
@@ -65,7 +80,7 @@
65
80
  font-weight: 500;
66
81
  }
67
82
  .SummaryList-itemPosition {
68
- color: #999;
83
+ color: #666;
69
84
  }
70
85
  .WorkList-highlights {
71
86
  margin-top: 12px;
@@ -91,11 +106,14 @@
91
106
  {{ basics.name }}
92
107
  </h1>
93
108
  <ul class="BasicsList">
94
- <li>{{ basics.email }}</li>
95
109
  <li>{{ basics.phone }}</li>
110
+ <li>{{ basics.email }}</li>
96
111
  {{!-- <li>{{ basics.location.address }}</li> --}}
97
112
  <li>{{ basics.location.city }}, {{ basics.location.region }} {{!-- basics.location.postalCode --}}</li>
98
113
  </ul>
114
+ <h2>
115
+ {{ basics.label }}
116
+ </h2>
99
117
  <p>
100
118
  {{ basics.summary }}
101
119
  </p>
@@ -121,7 +139,7 @@
121
139
  {{this.position}} at {{this.name}}
122
140
  </div>
123
141
  <div class="WorkList-dates">
124
- {{this.startDate}} to {{#if this.endDate }}{{this.endDate}}{{/if}}{{#unless this.endDate }}current{{/unless}}
142
+ {{getShortDate this.startDate}} to {{#if this.endDate }}{{getShortDate this.endDate}}{{/if}}{{#unless this.endDate }}current{{/unless}}
125
143
  </div>
126
144
  <div class="WorkList-summary">
127
145
  {{{summaryToList this.summary}}}