yaml-cv 0.1.8 → 0.1.9
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.
- checksums.yaml +4 -4
- data/lib/assets/cv.mustache +37 -34
- data/lib/assets/pdf.css +4 -0
- data/lib/assets/style.css +31 -18
- data/lib/yaml-cv.rb +37 -20
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e24e5233ed27343de0b480b7c5883e741dcd98f391edd12bcd3a15b27c9e41ad
|
4
|
+
data.tar.gz: cb27b2b0b9322dda9521b2a6865d1c4c4f995fb01c073325ebe59e208a79dc21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b7b09c80a7394828c123eb01100b1f9bb978add7ae442fb4518dd2d7483dae0c1e020942cb53d98fd25cb3e8cb466654373b7d8c28bd0ccaea9016cbe9cb238
|
7
|
+
data.tar.gz: fb6dfc2d4c85fd7432540d9ac804f9016a6634d31acc833ee38d10cfd7353539ceb6a33edbbed391d30d63549363a28e2513064ab25479ad638007b84807ef3d
|
data/lib/assets/cv.mustache
CHANGED
@@ -26,16 +26,17 @@
|
|
26
26
|
</p>
|
27
27
|
</td>
|
28
28
|
<td class="content-wrapper">
|
29
|
-
<
|
30
|
-
{{# contact_padding}}
|
31
|
-
<li class="contact-wrapper"> </li>
|
32
|
-
{{/ contact_padding}}
|
29
|
+
<table class="contact-list" cellpadding="2">
|
33
30
|
{{# contact}}
|
34
|
-
<
|
35
|
-
|
36
|
-
|
31
|
+
<tr>
|
32
|
+
{{# .}}
|
33
|
+
<td class="contact-wrapper">
|
34
|
+
<a {{# url}}href="{{ url }}"{{/ url}} target="_blank">{{{ icon_svg }}}{{ text }}</a>
|
35
|
+
</td>
|
36
|
+
{{/ .}}
|
37
|
+
</tr>
|
37
38
|
{{/ contact}}
|
38
|
-
</
|
39
|
+
</table>
|
39
40
|
</td>
|
40
41
|
</tr>
|
41
42
|
</table>
|
@@ -46,11 +47,11 @@
|
|
46
47
|
<table>
|
47
48
|
|
48
49
|
<!--
|
49
|
-
____________ ___________ _____ _ _____
|
50
|
+
____________ ___________ _____ _ _____
|
50
51
|
| ___ \ ___ \ _ | ___|_ _| | | ___|
|
51
|
-
| |_/ / |_/ / | | | |_ | | | | | |__
|
52
|
-
| __/| /| | | | _| | | | | | __|
|
53
|
-
| | | |\ \\ \_/ / | _| |_| |____| |___
|
52
|
+
| |_/ / |_/ / | | | |_ | | | | | |__
|
53
|
+
| __/| /| | | | _| | | | | | __|
|
54
|
+
| | | |\ \\ \_/ / | _| |_| |____| |___
|
54
55
|
\_| \_| \_|\___/\_| \___/\_____/\____/
|
55
56
|
-->
|
56
57
|
{{# has_profile}}
|
@@ -65,9 +66,9 @@ ____________ ___________ _____ _ _____
|
|
65
66
|
{{/ has_profile}}
|
66
67
|
|
67
68
|
<!--
|
68
|
-
_____ _ _______ _ _ _____
|
69
|
+
_____ _ _______ _ _ _____
|
69
70
|
/ ___| | / /_ _| | | | / ___|
|
70
|
-
\ `--.| |/ / | | | | | | \ `--.
|
71
|
+
\ `--.| |/ / | | | | | | \ `--.
|
71
72
|
`--. \ \ | | | | | | `--. \
|
72
73
|
/\__/ / |\ \_| |_| |____| |____/\__/ /
|
73
74
|
\____/\_| \_/\___/\_____/\_____/\____/
|
@@ -78,26 +79,28 @@ ____________ ___________ _____ _ _____
|
|
78
79
|
<p class="title cyan">Skills</p>
|
79
80
|
</td>
|
80
81
|
<td class="content-wrapper skills-section">
|
81
|
-
<
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
<
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
82
|
+
<table class="skill-list">
|
83
|
+
{{# skills}}
|
84
|
+
<tr>
|
85
|
+
{{# .}}
|
86
|
+
<td class="skill-wrapper">
|
87
|
+
<span class="skill-title">{{{ name }}}</span>
|
88
|
+
<br>
|
89
|
+
<span class="content">{{{ description }}}</span>
|
90
|
+
</td>
|
91
|
+
{{/ .}}
|
92
|
+
</tr>
|
93
|
+
{{/ skills}}
|
94
|
+
</table>
|
92
95
|
</td>
|
93
96
|
</tr>
|
94
97
|
{{/ has_skills}}
|
95
98
|
|
96
99
|
<!--
|
97
|
-
_____ _____ _____ _ _ _ _ _____ _____ ___ _
|
98
|
-
|_ _| ___/ __ \| | | || \ | |_ _/ __ \ / _ \ | |
|
99
|
-
| | | |__ | / \/| |_| || \| | | | | / \// /_\ \| |
|
100
|
-
| | | __|| | | _ || . ` | | | | | | _ || |
|
100
|
+
_____ _____ _____ _ _ _ _ _____ _____ ___ _
|
101
|
+
|_ _| ___/ __ \| | | || \ | |_ _/ __ \ / _ \ | |
|
102
|
+
| | | |__ | / \/| |_| || \| | | | | / \// /_\ \| |
|
103
|
+
| | | __|| | | _ || . ` | | | | | | _ || |
|
101
104
|
| | | |___| \__/\| | | || |\ |_| |_| \__/\| | | || |____
|
102
105
|
\_/ \____/ \____/\_| |_/\_| \_/\___/ \____/\_| |_/\_____/
|
103
106
|
-->
|
@@ -110,8 +113,8 @@ ____________ ___________ _____ _ _____
|
|
110
113
|
<table class="technical-list">
|
111
114
|
{{# technical}}
|
112
115
|
<tr>
|
113
|
-
<td class="skill-title">{{ category }}</td>
|
114
|
-
<td
|
116
|
+
<td class="skill-title technical-title">{{ category }}</td>
|
117
|
+
<td class="content"><p>{{{ items }}}</p></td>
|
115
118
|
</tr>
|
116
119
|
{{/ technical}}
|
117
120
|
</table>
|
@@ -120,12 +123,12 @@ ____________ ___________ _____ _ _____
|
|
120
123
|
{{/ has_technical}}
|
121
124
|
|
122
125
|
<!--
|
123
|
-
_____ _____ _____ _____ _____ _____ _ _ _____
|
126
|
+
_____ _____ _____ _____ _____ _____ _ _ _____
|
124
127
|
/ ___| ___/ __ \_ _|_ _| _ | \ | |/ ___|
|
125
|
-
\ `--.| |__ | / \/ | | | | | | | | \| |\ `--.
|
128
|
+
\ `--.| |__ | / \/ | | | | | | | | \| |\ `--.
|
126
129
|
`--. \ __|| | | | | | | | | | . ` | `--. \
|
127
130
|
/\__/ / |___| \__/\ | | _| |_\ \_/ / |\ |/\__/ /
|
128
|
-
\____/\____/ \____/ \_/ \___/ \___/\_| \_/\____/
|
131
|
+
\____/\____/ \____/ \_/ \___/ \___/\_| \_/\____/
|
129
132
|
-->
|
130
133
|
{{# sections}}
|
131
134
|
<tr class="section">
|
data/lib/assets/pdf.css
CHANGED
data/lib/assets/style.css
CHANGED
@@ -16,6 +16,7 @@ tbody {
|
|
16
16
|
|
17
17
|
table {
|
18
18
|
padding: 0;
|
19
|
+
border-collapse: collapse;
|
19
20
|
}
|
20
21
|
|
21
22
|
.cyan {
|
@@ -141,47 +142,59 @@ p {
|
|
141
142
|
font-weight: 600;
|
142
143
|
}
|
143
144
|
|
144
|
-
.
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
page-break-inside: avoid;
|
145
|
+
.skill-wrapper {
|
146
|
+
vertical-align: top;
|
147
|
+
padding-top: 0;
|
148
|
+
padding-right: 1em;
|
149
|
+
padding-bottom: 0.5em;
|
150
|
+
padding-left: 0;
|
151
151
|
}
|
152
|
-
|
153
152
|
.skill-title {
|
154
153
|
color: #696969;
|
155
|
-
font-size:
|
154
|
+
font-size: 1em;
|
156
155
|
font-weight: 600;
|
157
156
|
vertical-align: top;
|
158
157
|
text-align: left;
|
159
158
|
}
|
160
|
-
.skills-section {
|
161
|
-
padding-bottom: .25em !important;
|
162
|
-
}
|
163
|
-
|
164
|
-
.fields-list li {
|
165
|
-
margin-bottom: .5em;
|
166
|
-
}
|
167
159
|
|
168
160
|
.title .logo {
|
169
161
|
vertical-align: middle;
|
170
|
-
height: 1.
|
162
|
+
height: 1.15em;
|
171
163
|
top: -.2em;
|
172
164
|
position: relative;
|
173
165
|
}
|
174
166
|
|
167
|
+
.technical-list {
|
168
|
+
vertical-align: bottom;
|
169
|
+
}
|
170
|
+
.technical-list td {
|
171
|
+
padding: 0;
|
172
|
+
}
|
175
173
|
.technical-list .content {
|
176
174
|
width: 100%;
|
175
|
+
height: 100%;
|
177
176
|
display: block;
|
177
|
+
padding-top: .2em;
|
178
178
|
}
|
179
|
-
|
180
179
|
.technical-list .content p {
|
181
180
|
width: 100%;
|
181
|
+
height: 100%;
|
182
182
|
display: inline-block;
|
183
183
|
}
|
184
|
+
.technical-list .technical-title {
|
185
|
+
padding-right: 0.5em;
|
186
|
+
}
|
184
187
|
|
185
188
|
.section td.title-wrapper {
|
186
189
|
padding-bottom: .6em;
|
187
190
|
}
|
191
|
+
|
192
|
+
.section > td {
|
193
|
+
padding: 0;
|
194
|
+
}
|
195
|
+
.content-wrapper {
|
196
|
+
padding: 0 0 1em 0;
|
197
|
+
}
|
198
|
+
.content-wrapper table {
|
199
|
+
margin: 0;
|
200
|
+
}
|
data/lib/yaml-cv.rb
CHANGED
@@ -37,7 +37,7 @@ end
|
|
37
37
|
class CV < Mustache
|
38
38
|
|
39
39
|
self.template_file = File.join(File.dirname(__FILE__), "assets/cv.mustache")
|
40
|
-
|
40
|
+
|
41
41
|
attr_accessor :is_pdf
|
42
42
|
|
43
43
|
def initialize(file_path)
|
@@ -46,12 +46,12 @@ class CV < Mustache
|
|
46
46
|
|
47
47
|
if @cv["contact"]
|
48
48
|
@cv["contact"] = @cv["contact"].map { |c|
|
49
|
-
c["
|
49
|
+
c["icon_svg"] = icon(c["icon"])
|
50
50
|
c
|
51
51
|
}
|
52
52
|
end
|
53
53
|
end
|
54
|
-
|
54
|
+
|
55
55
|
def details
|
56
56
|
@cv["details"]
|
57
57
|
end
|
@@ -65,7 +65,23 @@ class CV < Mustache
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def skills
|
68
|
-
|
68
|
+
# split into an n-column table
|
69
|
+
nskills = @cv["skills"]["fields"].length()
|
70
|
+
ncols = @cv["skills"]["columns"]
|
71
|
+
nrows = (nskills / ncols).ceil
|
72
|
+
|
73
|
+
skills_table = Array.new(nrows){Array.new(ncols)}
|
74
|
+
|
75
|
+
i = 0
|
76
|
+
while i < nskills
|
77
|
+
|
78
|
+
col = i % ncols
|
79
|
+
row = i / nrows
|
80
|
+
skills_table[row][col] = @cv["skills"]["fields"][i]
|
81
|
+
|
82
|
+
i = i + 1
|
83
|
+
end
|
84
|
+
skills_table
|
69
85
|
end
|
70
86
|
|
71
87
|
def has_skills
|
@@ -90,15 +106,15 @@ class CV < Mustache
|
|
90
106
|
s
|
91
107
|
}
|
92
108
|
end
|
93
|
-
|
109
|
+
|
94
110
|
def full_name
|
95
111
|
details["last_name"] + " " + details["first_name"]
|
96
112
|
end
|
97
|
-
|
113
|
+
|
98
114
|
def css
|
99
115
|
load_asset("style.css")
|
100
116
|
end
|
101
|
-
|
117
|
+
|
102
118
|
def pdf_css
|
103
119
|
load_asset("pdf.css")
|
104
120
|
end
|
@@ -108,18 +124,19 @@ class CV < Mustache
|
|
108
124
|
end
|
109
125
|
|
110
126
|
def contact
|
111
|
-
|
112
|
-
|
127
|
+
# split into a 2-column table
|
128
|
+
contact_table = Array.new(3){Array.new(2)}
|
113
129
|
|
114
|
-
|
115
|
-
|
116
|
-
return 0
|
117
|
-
end
|
130
|
+
i = 0
|
131
|
+
while i < @cv["contact"].length()
|
118
132
|
|
119
|
-
|
120
|
-
|
133
|
+
row = i % 3
|
134
|
+
col = 1 - (i / 3)
|
135
|
+
contact_table[row][col] = @cv["contact"][i]
|
121
136
|
|
122
|
-
|
137
|
+
i = i + 1
|
138
|
+
end
|
139
|
+
contact_table
|
123
140
|
end
|
124
141
|
|
125
142
|
def icon(name)
|
@@ -130,7 +147,7 @@ class CV < Mustache
|
|
130
147
|
if !subsections
|
131
148
|
return
|
132
149
|
end
|
133
|
-
|
150
|
+
|
134
151
|
subsections.map { |e|
|
135
152
|
if e["from"]
|
136
153
|
e["from"] = format_period e["from"]
|
@@ -138,11 +155,11 @@ class CV < Mustache
|
|
138
155
|
if e["to"]
|
139
156
|
e["to"] = format_period e["to"]
|
140
157
|
end
|
141
|
-
|
158
|
+
|
142
159
|
if e["logo"]
|
143
160
|
e["logo_img"] = read_image e["logo"]
|
144
161
|
end
|
145
|
-
|
162
|
+
|
146
163
|
e
|
147
164
|
}
|
148
165
|
end
|
@@ -186,7 +203,7 @@ class CV < Mustache
|
|
186
203
|
|
187
204
|
temp_file.close
|
188
205
|
end
|
189
|
-
|
206
|
+
|
190
207
|
end
|
191
208
|
|
192
209
|
def is_windows
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yaml-cv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Mantaos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mustache
|