Skip to content

Commit 8fe84fa

Browse files
committed
🧹
1 parent 2e92573 commit 8fe84fa

16 files changed

+30
-22
lines changed

_data/person.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"@context":"http://schema.org","@type":"Person","name":"Henrik Becker","givenName":"Henrik","familyName":"Becker","image":"https://avatars.githubusercontent.com/u/824009?v=4","description":"Henrik Becker is an experienced .Net developer and solution architect dedicated to delivering quality software practicing Agile Processes, Test Driven Development, applying SOLID principles and a healthy dose of dad-jokes.\n","nationality":"Swedish","jobTitle":"Fullstack .Net Developer","telephone":"+46 (0)73 422 83 43","birthDate":"1969-06-23","url":"https://www.henrikbecker.net","sameAs":["https://github.com/handiman","https://www.linkedin.com/prettygoodprogrammer"],"workLocation":"Stockholm","worksFor":{"name":"Self Employed","url":"https://www.henrikbecker.net"}}
1+
{"@context":"http://schema.org","@type":"Person","name":"Henrik Becker","givenName":"Henrik","familyName":"Becker","image":"https://avatars.githubusercontent.com/u/824009?v=4","description":"Henrik Becker is an experienced .Net developer and solution architect dedicated to delivering quality software practicing Agile Processes, Test Driven Development, applying SOLID principles and a healthy dose of dad-jokes.\n","nationality":"Swedish","jobTitle":"Senior Software Engineer","telephone":"+46 (0)73 422 83 43","birthDate":"1969-06-23","url":"https://www.henrikbecker.net","sameAs":["https://github.com/handiman","https://www.linkedin.com/prettygoodprogrammer"],"workLocation":"Stockholm","worksFor":{"name":"Self Employed","url":"https://www.henrikbecker.net"}}

_plugins/Experience.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class Experience
22
def initialize (xp, site)
33
@id = xp.id
4-
@role = xp['role']
4+
@role = xp['roles'].is_a?(Array) ? xp['roles'].join(", ") : xp['roles']
55
@from = xp['start_date']
66
@to = xp['end_date']
77
@skills = xp['skills']
@@ -17,10 +17,9 @@ def initialize (xp, site)
1717
@summary = xp['summary']
1818
end
1919
else
20-
@name = xp['title']
20+
@name = xp['name']
2121
@summary = xp['summary']
22-
end
23-
end
22+
end end
2423

2524
def id
2625
@id

_plugins/PDFResume.rb

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,33 @@ module Jekyll
55
class PDFResume < Prawn::Document
66
def initialize(site)
77
super()
8-
8+
page_size = "A4"
9+
margin = 30
10+
font_families.update("OpenSans" => {
11+
:normal => "#{site.source}/assets/fonts/OpenSans-Regular.ttf",
12+
:italic => "#{site.source}/assets/fonts/OpenSans-Italic.ttf",
13+
:bold => "#{site.source}/assets/fonts/OpenSans-Bold.ttf",
14+
:bold_italic => "#{site.source}/assets/fonts/OpenSans-BoldItalic.ttf"
15+
})
16+
font "OpenSans"
17+
918
@site = site
1019
@dir = 'assets'
11-
@filename = 'henrik-becker-prawn.pdf'
20+
@filename = 'henrik-becker.pdf'
1221

1322
# font size is in points (1/72 inch)
1423
@heading = 55
1524
@subtitle = 22
1625
@h1 = 33
17-
@h2 = 22
26+
@h2 = 22
1827
@h5 = 10
1928
@h6 = 10
2029
@normal = 11
21-
@spacing = @normal
30+
@spacing = margin
2231

2332
@text_color = '010101'
2433
@link_color = '75A434'
25-
26-
font_families.update("OpenSans" => {
27-
:normal => "#{site.source}/assets/fonts/OpenSans-Regular.ttf",
28-
:italic => "#{site.source}/assets/fonts/OpenSans-Italic.ttf",
29-
:bold => "#{site.source}/assets/fonts/OpenSans-Bold.ttf",
30-
:bold_italic => "#{site.source}/assets/fonts/OpenSans-BoldItalic.ttf"
31-
})
32-
font "OpenSans"
33-
34+
3435
puts " Generating... #{@dir}/#{@filename}"
3536
end
3637

@@ -51,7 +52,6 @@ def cover
5152
phone = person['phone']
5253
url = person['url']
5354

54-
#pdf.move_down 100
5555
text name, :size => @heading#, :align => :center
5656
text title, :size => @subtitle#, :align => :center
5757
move_down @spacing
@@ -72,7 +72,8 @@ def projects
7272
@site.data["profile"]["featuredProjects"].each do |feature|
7373
@site.collections["projects"].docs.each do |project|
7474
if project.id == "/projects/" + feature
75-
experience(Experience.new(project))
75+
move_down @spacing
76+
experience(Experience.new(project, @site))
7677
end
7778
end
7879
end
@@ -81,7 +82,8 @@ def projects
8182
def employment
8283
h1 'Work Experience'
8384
@site.collections['employment'].docs.reverse.each do |work|
84-
experience(Experience.new(work))
85+
move_down @spacing
86+
experience(Experience.new(work, @site))
8587
end
8688
end
8789

@@ -134,6 +136,7 @@ def experience(xp)
134136

135137
h2 xp.name
136138
h5 "#{xp.role} | #{period}"
139+
move_down @normal
137140

138141
unless xp.summary.nil?
139142
if xp.id == '/employment/17-self-employed'
@@ -146,12 +149,14 @@ def experience(xp)
146149
end
147150

148151
unless xp.skills.nil?
152+
move_down @normal
149153
h6 "Skills used"
150154
p xp.skills.join(', ')
151155
end
152156
end
153157

154158
def li(content)
159+
move_down @normal / 2
155160
text "\u2022 #{content}"
156161
end
157162

@@ -160,18 +165,22 @@ def link(url)
160165
end
161166

162167
def h1(content)
168+
move_down @spacing
163169
text content, :size => @h1
164170
end
165171

166172
def h2(content)
173+
move_down @normal
167174
text content, :size => @h2
168175
end
169176

170177
def h5(content)
178+
move_down @normal / 2
171179
text content, :size => @h5, :style => :bold
172180
end
173181

174182
def h6(content)
183+
move_down @normal / 2
175184
text content, :size => @h6, :style => :bold
176185
end
177186

_plugins/ResumeGenerator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module Jekyll
22
Hooks.register :site, :post_render do |site|
33
if not (Gem.win_platform?)
44
[
5-
DOCXResume.new(site) #, PDFResume.new(site)
5+
DOCXResume.new(site), PDFResume.new(site)
66
].each { |resume| resume.generate }
77
end
88
end

assets/fonts/OpenSans-Bold.ttf

102 KB
Binary file not shown.
90.5 KB
Binary file not shown.
99.7 KB
Binary file not shown.
90.6 KB
Binary file not shown.

assets/fonts/OpenSans-Italic.ttf

90.1 KB
Binary file not shown.

assets/fonts/OpenSans-Light.ttf

99.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)