@@ -38,9 +38,9 @@ type Render struct {
38
38
// Subtitle size
39
39
Subtitle measurement.Distance `help:"Subtitle size." default:"14"`
40
40
// H1 size
41
- H1 measurement.Distance `help:"H1 size." default:"24 "`
41
+ H1 measurement.Distance `help:"H1 size." default:"18 "`
42
42
// H2 size
43
- H2 measurement.Distance `help:"H2 size." default:"18 "`
43
+ H2 measurement.Distance `help:"H2 size." default:"16 "`
44
44
// H3 size
45
45
H3 measurement.Distance `help:"H3 size." default:"14"`
46
46
// H4 size
@@ -212,8 +212,7 @@ func (r *Render) Run(ctx *Context) error {
212
212
213
213
for i , contact := range resume .About .Contacts {
214
214
215
- name := fmt .Sprintf ("%s %s:" , contact .Icon , contact .Label )
216
- run := r .addRun (para , name , r .Small )
215
+ run := r .addRun (para , contact .Icon , r .Small )
217
216
run .AddText (" " )
218
217
r .addHyperLink (para , contact .URL , contact .URL , contact .URL , r .Small )
219
218
@@ -245,6 +244,43 @@ func (r *Render) Run(ctx *Context) error {
245
244
r .addRun (para , text , r .Normal )
246
245
doc .AddParagraph () // Empty space
247
246
247
+ // Work
248
+ r .addHeading (doc , resume .Data .SectionTitleMap .Docx .Work , 1 )
249
+ doc .AddParagraph () // Empty space
250
+
251
+ for _ , work := range resume .Work {
252
+ para = r .addHeading (doc , work .Position + ", " , 2 )
253
+ r .addHyperLink (para , work .Organization , work .Organization , work .URL , r .levelToSize (3 ))
254
+ r .addRun (para , fmt .Sprintf (" | *%s*" , work .Location ), r .levelToSize (4 ))
255
+
256
+ para = doc .AddParagraph ()
257
+ para .SetStyle ("Normal" )
258
+
259
+ start := textDateToShortDate (work .Start )
260
+ end := "Present"
261
+
262
+ if work .End != "" {
263
+ end = textDateToShortDate (work .End )
264
+ }
265
+
266
+ r .addRun (para , fmt .Sprintf ("%s - %s" , start , end ), r .Normal )
267
+
268
+ for _ , highlight := range work .Highlights {
269
+ doc .AddParagraph () // Empty space
270
+
271
+ highlightHeading := fmt .Sprintf ("%s %s" , highlight .Icon , highlight .Label )
272
+ r .addHeading (doc , highlightHeading , 3 )
273
+
274
+ doc .AddParagraph () // Empty space
275
+
276
+ para = doc .AddParagraph ()
277
+ para .SetStyle ("Normal" )
278
+ r .addRun (para , highlight .Text , r .Normal )
279
+ }
280
+
281
+ doc .AddParagraph () // Empty space
282
+ }
283
+
248
284
// Projects
249
285
250
286
r .addHeading (doc , resume .Data .SectionTitleMap .Docx .Projects , 1 )
@@ -283,52 +319,16 @@ func (r *Render) Run(ctx *Context) error {
283
319
doc .AddParagraph () // Empty space
284
320
}
285
321
286
- // Work
287
- r .addHeading (doc , resume .Data .SectionTitleMap .Docx .Work , 1 )
288
- doc .AddParagraph () // Empty space
289
-
290
- for _ , work := range resume .Work {
291
- para = r .addHeading (doc , work .Position + ", " , 2 )
292
- r .addHyperLink (para , work .Organization , work .Organization , work .URL , r .levelToSize (3 ))
293
- r .addRun (para , fmt .Sprintf (" | *%s*" , work .Location ), r .levelToSize (4 ))
294
-
295
- para = doc .AddParagraph ()
296
- para .SetStyle ("Normal" )
297
-
298
- start := textDateToShortDate (work .Start )
299
- end := "Present"
300
-
301
- if work .End != "" {
302
- end = textDateToShortDate (work .End )
303
- }
304
-
305
- r .addRun (para , fmt .Sprintf ("%s - %s" , start , end ), r .Normal )
306
-
307
- for _ , highlight := range work .Highlights {
308
- doc .AddParagraph () // Empty space
309
-
310
- highlightHeading := fmt .Sprintf ("%s %s" , highlight .Icon , highlight .Label )
311
- r .addHeading (doc , highlightHeading , 3 )
312
-
313
- doc .AddParagraph () // Empty space
314
-
315
- para = doc .AddParagraph ()
316
- para .SetStyle ("Normal" )
317
- r .addRun (para , highlight .Text , r .Normal )
318
- }
319
-
320
- doc .AddParagraph () // Empty space
321
- }
322
-
323
322
// Volunteer
324
323
r .addHeading (doc , resume .Data .SectionTitleMap .Docx .Volunteer , 1 )
325
324
doc .AddParagraph () // Empty space
326
325
327
326
order = resume .Data .SectionItemOrdering .Docx .Volunteer
328
327
329
- preamble := "Projects I’ve contributed to in the past (usually by fixing fairly small issues I encounter while trying things out):"
330
-
331
- items := []string {}
328
+ preamble := "Projects I’ve contributed to in the past (usually by fixing fairly small issues I encounter while trying them out):"
329
+ para = doc .AddParagraph ()
330
+ r .addRun (para , preamble , r .Normal )
331
+ doc .AddParagraph () // Empty space
332
332
333
333
for _ , item := range order {
334
334
var volunteer models.VolunteerExperience
@@ -342,15 +342,10 @@ func (r *Render) Run(ctx *Context) error {
342
342
343
343
// Render single link
344
344
link := volunteer .Links [0 ]
345
- text := fmt .Sprintf ("%s %s (%s)" , volunteer .Icon , volunteer .Name , link .URL )
346
- items = append (items , text )
345
+ text := fmt .Sprintf ("%s %s - %s" , volunteer .Icon , volunteer .Name , link .URL )
346
+ para = doc .AddParagraph ()
347
+ r .addRun (para , text , r .Normal )
347
348
}
348
- joined := strings .Join (items , ", " )
349
- para = doc .AddParagraph ()
350
- r .addRun (para , preamble , r .Normal )
351
- doc .AddParagraph () // Empty space
352
- para = doc .AddParagraph ()
353
- r .addRun (para , joined , r .Normal )
354
349
355
350
// Save the document
356
351
fmt .Printf ("Saving resume to: %s\n " , r .Output )
0 commit comments