@enure/jacklin 1.1.4 → 1.2.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 +12 -0
- package/package.json +5 -5
- package/template.handlebars +123 -115
package/index.js
CHANGED
|
@@ -3,6 +3,17 @@ import { dirname, resolve } from "path";
|
|
|
3
3
|
import { readFileSync } from "fs";
|
|
4
4
|
import Handlebars from "handlebars";
|
|
5
5
|
|
|
6
|
+
Handlebars.registerHelper("summaryToList", (string) => {
|
|
7
|
+
if (string.includes("|")) {
|
|
8
|
+
return `<ul class="SummaryList">${string
|
|
9
|
+
.split("|")
|
|
10
|
+
.map((listItem) => `<li class="SummaryList-item">${listItem}</li>`)
|
|
11
|
+
.join("")}</ul>`;
|
|
12
|
+
} else {
|
|
13
|
+
return string;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
|
|
6
17
|
export const render = (resume) => {
|
|
7
18
|
const modulePath = dirname(fileURLToPath(import.meta.url));
|
|
8
19
|
const template = readFileSync(
|
|
@@ -13,3 +24,4 @@ export const render = (resume) => {
|
|
|
13
24
|
const compiledTemplate = Handlebars.compile(template);
|
|
14
25
|
return compiledTemplate(resume);
|
|
15
26
|
};
|
|
27
|
+
|
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enure/jacklin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"exports": "./index.js",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
10
|
-
},
|
|
11
8
|
"keywords": [],
|
|
12
9
|
"author": "Charles Stuart",
|
|
13
10
|
"license": "ISC",
|
|
@@ -16,5 +13,8 @@
|
|
|
16
13
|
},
|
|
17
14
|
"devDependencies": {
|
|
18
15
|
"prettier": "^3.0.3"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
19
19
|
}
|
|
20
|
-
}
|
|
20
|
+
}
|
package/template.handlebars
CHANGED
|
@@ -1,118 +1,126 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
</
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<title>{{ basics.name }}</title>
|
|
5
|
+
<meta charset="utf-8" />
|
|
6
|
+
<style>
|
|
7
|
+
* {
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: 0;
|
|
10
|
+
}
|
|
11
|
+
body {
|
|
12
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
|
13
|
+
font-size: 12px;
|
|
14
|
+
line-height: 18px;
|
|
15
|
+
color: #222;
|
|
16
|
+
}
|
|
17
|
+
@media screen {
|
|
18
|
+
body {
|
|
19
|
+
margin: 54px 36px;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
@page {
|
|
23
|
+
margin: 1in 0.75in;
|
|
24
|
+
size: 8.5in 11in;
|
|
25
|
+
}
|
|
26
|
+
main {
|
|
27
|
+
max-width: 75%;
|
|
28
|
+
}
|
|
29
|
+
main > section {
|
|
30
|
+
margin-top: 36px;
|
|
31
|
+
}
|
|
32
|
+
h1, h2 {
|
|
33
|
+
font-size: 12px;
|
|
34
|
+
font-weight: 800;
|
|
35
|
+
}
|
|
36
|
+
ul {
|
|
37
|
+
list-style-type: none;
|
|
38
|
+
margin: 0;
|
|
39
|
+
padding: 0;
|
|
40
|
+
}
|
|
41
|
+
.BasicsList {
|
|
42
|
+
margin-bottom: 18px;
|
|
43
|
+
}
|
|
44
|
+
.WorkList-item {
|
|
45
|
+
margin-top: 18px;
|
|
46
|
+
page-break-inside: avoid;
|
|
47
|
+
}
|
|
48
|
+
.WorkList-dates {
|
|
49
|
+
color: #666;
|
|
50
|
+
}
|
|
51
|
+
.WorkList-positionAt {
|
|
52
|
+
font-weight: 500;
|
|
53
|
+
}
|
|
54
|
+
.WorkList-summary {
|
|
55
|
+
margin-top: 4px;
|
|
56
|
+
}
|
|
57
|
+
.WorkList-highlights {
|
|
58
|
+
margin-top: 4px;
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: row;
|
|
61
|
+
flex-wrap: wrap;
|
|
62
|
+
}
|
|
63
|
+
.WorkList-highlight {
|
|
64
|
+
font-size: 11px;
|
|
65
|
+
color: #555;
|
|
66
|
+
margin: 0 6px 4px 0;
|
|
67
|
+
padding: 1px 3px;
|
|
68
|
+
border: 1px solid #aaa;
|
|
69
|
+
border-radius: 4px;
|
|
70
|
+
}
|
|
71
|
+
</style>
|
|
72
|
+
</head>
|
|
73
|
+
<body>
|
|
74
|
+
<header>
|
|
75
|
+
<h1>
|
|
76
|
+
{{ basics.name }}
|
|
77
|
+
</h1>
|
|
78
|
+
<ul class="BasicsList">
|
|
79
|
+
<li>{{ basics.email }}</li>
|
|
80
|
+
<li>{{ basics.phone }}</li>
|
|
81
|
+
{{!-- <li>{{ basics.location.address }}</li> --}}
|
|
82
|
+
<li>{{ basics.location.city }}, {{ basics.location.region }} {{!-- basics.location.postalCode --}}</li>
|
|
83
|
+
</ul>
|
|
84
|
+
<p>
|
|
85
|
+
{{ basics.summary }}
|
|
86
|
+
</p>
|
|
87
|
+
</header>
|
|
88
|
+
<main>
|
|
89
|
+
<section>
|
|
90
|
+
<h2>Education</h2>
|
|
91
|
+
{{#each education}}
|
|
92
|
+
<ul class="EducationList">
|
|
93
|
+
<li>{{ this.institution }}</li>
|
|
94
|
+
<li>{{ this.area }}</li>
|
|
95
|
+
<li>{{ this.studyType }}</li>
|
|
96
|
+
</ul>
|
|
97
|
+
{{/each}}
|
|
98
|
+
</section>
|
|
99
|
+
<section>
|
|
100
|
+
<h2>Work History</h2>
|
|
101
|
+
<ul class="WorkList">
|
|
102
|
+
{{#each work}}
|
|
103
|
+
<li class="WorkList-item">
|
|
104
|
+
<div class="WorkList-positionAt">
|
|
105
|
+
{{this.position}} at {{this.name}}
|
|
106
|
+
</div>
|
|
107
|
+
<div class="WorkList-dates">
|
|
108
|
+
{{this.startDate}} - {{#if this.endDate }}{{this.endDate}}{{/if}}{{#unless this.endDate }}current{{/unless}}
|
|
109
|
+
</div>
|
|
110
|
+
<div class="WorkList-summary">
|
|
111
|
+
{{summaryToList this.summary}}
|
|
112
|
+
</div>
|
|
113
|
+
{{#if this.highlights}}
|
|
114
|
+
<ul class="WorkList-highlights">
|
|
115
|
+
{{#each this.highlights}}
|
|
116
|
+
<li class="WorkList-highlight">{{this}}</li>
|
|
117
|
+
{{/each}}
|
|
114
118
|
</ul>
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
119
|
+
{{/if}}
|
|
120
|
+
</li>
|
|
121
|
+
{{/each}}
|
|
122
|
+
</ul>
|
|
123
|
+
</section>
|
|
124
|
+
</main>
|
|
125
|
+
</body>
|
|
118
126
|
</html>
|