-
Notifications
You must be signed in to change notification settings - Fork 0
/
resume.ejs
188 lines (186 loc) · 6.2 KB
/
resume.ejs
1
2
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<!DOCTYPE html>
<html lang="en">
<head>
<title>CV Joaquin Oltra</title>
<link
href="https://fonts.googleapis.com/css?family=Playfair+Display|Libre+Franklin"
rel="stylesheet"
/>
<link type="text/css" rel="stylesheet" media="all" href="normalize.css" />
<link type="text/css" rel="stylesheet" media="all" href="resume.css" />
<script>
if (window.matchMedia) {
var printMediaQuery = window.matchMedia("print");
printMediaQuery.addListener(function(mql) {
if (mql.matches) {
beforePrint();
} else {
afterPrint();
}
});
} else {
// IE, Firefox
window.onbeforeprint = openDetails;
window.onafterprint = closeDetails;
}
function openDetails() {
Array.from(document.querySelectorAll("details")).forEach(e =>
e.toggleAttribute("open")
);
}
function closeDetails() {
Array.from(document.querySelectorAll("details")).forEach(e =>
e.removeAttribute("open")
);
}
</script>
</head>
<body>
<header>
<a href="http://chimeces.com/resume/">Web</a>
·
<a href="http://chimeces.com/resume/resume.pdf">PDF</a>
·
<a href="http://github.com/joakin/resume">Source</a>
·
<span>
<a href="javascript:openDetails()">Open</a>
/
<a href="javascript:closeDetails()">Close</a>
details
</span>
</header>
<div id="container">
<header class="main">
<h1><%= fullName %></h1>
<img src="<%= photo %>" class="photo" />
</header>
<section id="personal-information" class="personal-information">
<article>
<div class="kv phone">
<label><img src="./img/github.svg" alt="Github" width="24px" height="24px" /></label>
<span><a href="https://github.com/<%= github %>">@<%= github %></a></span>
</div>
<div class="kv email">
<label>Email</label>
<span><a href="mailto:<%= email %>"><%= email %></a></span>
</div>
<div class="kv phone">
<label>Phone</label>
<span><a href="tel:<%= phone %>"><%= phone %></a></span>
</div>
<div class="kv location">
<label>Location</label>
<span><%= location %></span>
</div>
<div class="kv timezones">
<label>Timezones</label>
<span><%= timezones %></span>
</div>
</article>
</section>
<section id="current-situation" class="current-situation">
<header>
<h2>Summary</h2>
</header>
<article class="body">
<%- md(intro) %>
</article>
</section>
<section id="work-experience" class="work-experience">
<header>
<h2>Work experience</h2>
</header>
<% work.forEach(function(job) { %>
<%
let start = job.start ?? job?.positions?.[job?.positions.length - 1]?.start;
let end = job.end ?? job?.positions?.[0]?.end;
let jobs = job.positions ?? [job];
%>
<article
id="<%= `${job.employer}-${start}-${end ?? ''}-${job.position ?? ''}`.replace(/ /g, '_') %>"
class="<%= jobs.length === 1 ? 'print-no-break-inside' : '' %>"
>
<header class="header-3el">
<div class="employer"><%= job.employer %></div>
<div class="position"><%= job.position ?? "" %></div>
<div class="date"><%= start %> - <%= end ?? 'Present' %></div>
</header>
<% jobs.forEach((job) => { %>
<div class="body print-no-break-inside">
<% if (jobs.length > 1) { %>
<h3>
<%= job.position %>
<span class="date"><%= job.start %> - <%= job.end ?? 'Present' %></span>
</h3>
<% } %>
<%
let hideAfter = 6;
function isOldJob(job) { return job.end && job.end <= (new Date()).getFullYear() - hideAfter; }
let isOld = isOldJob(job);
%>
<% if (!isOld) { %>
<%- job.what ? md(job.what) : '' %>
<%- job.details ? md(job.details) : '' %>
<% } else if (job.what || job.details) { %>
<details>
<summary>Details</summary>
<%- job.what ? md(job.what) : '' %>
<%- job.details ? md(job.details) : '' %>
</details>
<% } %>
</div>
<% }); %>
</article>
<% }); %>
</section>
<section id="education" class="education">
<header>
<h2>Education</h2>
</header>
<article class="header-3el">
<div class="from"><%= edu.who %></div>
<div class="title"><%= edu.what %></div>
<div class="date"><%= edu.when %></div>
</article>
</section>
<section id="languages" class="languages">
<header>
<h2>Languages</h2>
</header>
<% languages.forEach(function(lang) { %>
<div class="header-3el">
<div class="name"><%= lang.which %></div>
<div class="level"><%= lang.level %></div>
<% if (lang.titles) { %>
<div>
<% lang.titles.forEach(function(title) { %> <%= title %><br />
<% }); %>
</div>
<% } %>
</div>
<% }); %>
</section>
<section id="other" class="other">
<header>
<h2>Additional information</h2>
</header>
<article class="body">
<%- md(other) %>
</article>
</section>
</div>
<footer>
<p>
This resume was generated from YAML, HTML, JS and CSS using Node.js and
is open source.
</p>
<p>
To learn more visit the online version at
<a href="http://chimeces.com/resume/">chimeces.com/resume</a> or check
the underlying source at the
<a href="http://github.com/joakin/resume">GitHub repo</a>.
</p>
</footer>
</body>
</html>