Skip to content

Commit

Permalink
Merge pull request #8 from Joshlucpoll/master
Browse files Browse the repository at this point in the history
Added missing sections from JSON Resume schema + Tweaks
  • Loading branch information
reorx authored Jan 1, 2025
2 parents 0c4cec1 + cf1137c commit 9320456
Show file tree
Hide file tree
Showing 3 changed files with 232 additions and 45 deletions.
43 changes: 32 additions & 11 deletions sample.cv.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@
]
},
"work": [
{
"name": "Pied Piper",
"location": "Palo Alto, CA",
"description": "Awesome compression company (second position)",
"position": "Chief Technology Officer",
"url": "http://piedpiper.example.com",
"startDate": "2018-01-01",
"endDate": "2020-01-01",
"summary": "Led the development of advanced middle-out algorithms and helped scale the engineering team.",
"highlights": [
"Developed the next-gen middle-out compression approach",
"Expanded the engineering team from 5 to 15",
"Oversaw strategic growth and technology roadmap"
]
},
{
"name": "Pied Piper",
"location": "Palo Alto, CA",
Expand All @@ -53,7 +68,6 @@
"endDate": "2017-01-01",
"summary": "Fantasy Inc. is a magical technology company that specializes in creating illusions and bringing dreams to life. Their proprietary technology has consistently amazed people and earned high praise.\n\n- Created a spell that turns pumpkins into carriages\n- Won the Wizard's Choice Award at the annual Magic Convention\n- Developed a potion that grants eternal youth"
}

],
"volunteer": [
{
Expand Down Expand Up @@ -187,7 +201,6 @@
"language": "French",
"fluency": "Elementary"
}

],
"interests": [
{
Expand All @@ -204,7 +217,6 @@
"Mermaids"
]
}

],
"references": [
{
Expand All @@ -215,7 +227,6 @@
"name": "Laurie Bream",
"reference": "It is my pleasure to recommend Monica, her exceptional skills and talent were evident during her time at High-Tech Inc. I am confident that she will make a valuable impact at any organization she joins."
}

],
"projects": [
{
Expand All @@ -227,13 +238,16 @@
"Using modern technologies such as GoogleMaps, Chrome Extension and Javascript"
],
"keywords": [
"GoogleMaps", "Chrome Extension", "Javascript"
"GoogleMaps",
"Chrome Extension",
"Javascript"
],
"startDate": "2016-08-24",
"endDate": "2016-08-24",
"url": "https://missdirection.example.com",
"roles": [
"Team lead", "Designer"
"Team lead",
"Designer"
],
"entity": "Smoogle",
"type": "application"
Expand All @@ -247,13 +261,16 @@
"Utilizes advanced technology such as Augmented Reality and AI"
],
"keywords": [
"Augmented Reality", "AI", "Space navigation"
"Augmented Reality",
"AI",
"Space navigation"
],
"startDate": "2021-07-01",
"endDate": "2021-07-01",
"url": "https://lostinspace.example.com",
"roles": [
"Mission Commander", "Navigation Officer"
"Mission Commander",
"Navigation Officer"
],
"entity": "Cosmic Corp",
"type": "Software"
Expand All @@ -266,7 +283,9 @@
"url": "https://bebop.example.com",
"startDate": "2022-01-01",
"keywords": [
"Aerodynamics", "Space travel", "Rocket science"
"Aerodynamics",
"Space travel",
"Rocket science"
]
},
{
Expand All @@ -275,7 +294,9 @@
"url": "https://warpdrive.example.com",
"startDate": "2025-01-01",
"keywords": [
"Quantum physics", "Interstellar travel", "Wormholes"
"Quantum physics",
"Interstellar travel",
"Wormholes"
]
}
],
Expand All @@ -284,4 +305,4 @@
"version": "v2.0.0",
"lastModified": "2023-02-12T22:26:00"
}
}
}
222 changes: 190 additions & 32 deletions src/themes/reorx/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,57 @@ function hasItems(arr) {
}
%>

<%
function dateRange(item, level) {
let {startDate, endDate} = item
if (!startDate && !endDate) return ''
let format
// level: 1: year, 2: month, 3: day
switch (level) {
case 1:
format = 'YYYY'
break;
case 2:
format = 'MMM YYYY'
break;
}
if (format) {
startDate = startDate ? fn.reformatDate(startDate, format) : ''
endDate = endDate ? fn.reformatDate(endDate, format) : ''
}
let result = ''
if (startDate && endDate) {
result = `${startDate}${endDate}`
} else if (startDate) {
result = `${startDate} – Present`
} else if (endDate) {
result = `Until ${endDate}`
}
return `<div class="date-range">${result}</div>`
}
%>

<%
function date(item, level) {
let {date} = item
if (!date) return ''
let format
// level: 1: year, 2: month, 3: day
switch (level) {
case 1:
format = 'YYYY'
break;
case 2:
format = 'MMM YYYY'
break;
}
if (format) {
date = date ? fn.reformatDate(date, format) : ''
}
return `<div class="date-range">${date}</div>`
}
%>

<!-- Basics -->
<section class="basics-section">
<h1><%= cv.basics.name %></h1>
Expand Down Expand Up @@ -56,41 +107,12 @@ function hasItems(arr) {
</section>


<%
function dateRange(item, level) {
let {startDate, endDate} = item
if (!startDate && !endDate) return ''
let format
// level: 1: year, 2: month, 3: day
switch (level) {
case 1:
format = 'YYYY'
break;
case 2:
format = 'MMM YYYY'
break;
}
if (format) {
startDate = startDate ? fn.reformatDate(startDate, format) : ''
endDate = endDate ? fn.reformatDate(endDate, format) : ''
}
let result = ''
if (startDate && endDate) {
result = `${startDate}${endDate}`
} else if (startDate) {
result = `${startDate} – Present`
} else if (endDate) {
result = `Until ${endDate}`
}
return `<div class="date-range">${result}</div>`
}
%>

<!-- Educations -->
<% if (hasItems(cv.education)) { %>
<section class="education-section">
<div class="section-title">
<h2>Educations</h2>
<h2>Education</h2>
<div class="line"></div>
</div>
<% for (const item of cv.education) { %>
Expand All @@ -101,7 +123,7 @@ function dateRange(item, level) {
</div>
<div class="row space-between">
<div class="study subtitle">
<%= item.studyType %>, <%= item.area %>
<%= item.studyType %> <%= item.area %>
</div>
<%- dateRange(item, 2) %>
</div>
Expand All @@ -125,10 +147,12 @@ function dateRange(item, level) {
</div>
<% for (const item of cv.work) { %>
<div class="work section-item">
<% if (item.name !== (cv.work[cv.work.indexOf(item) - 1] || {}).name) { %>
<div class="row space-between">
<h3><%= item.name %></h3>
<%- linkInDiv(item.url) %>
</div>
<% } %>
<div class="row space-between">
<div class="position subtitle"><%= item.position %></div>
<%- dateRange(item, 2) %>
Expand Down Expand Up @@ -272,12 +296,146 @@ function dateRange(item, level) {
<% } %>


<!-- TODO: -->
<!-- Awards -->
<% if (hasItems(cv.awards)) { %>
<section class="awards-section">
<div class="section-title">
<h2>Awards</h2>
<div class="line"></div>
</div>
<% for (const item of cv.awards) { %>
<div class="award section-item">
<div class="row space-between">
<h3><%= item.title %></h3>
<%- date(item, 2) %>
</div>
<div class="awarder row subtitle"><%= item.awarder %></div>
<% if (item.summary) { %>
<div class="summary p"><%- fn.renderMarkdown(item.summary) %></div>
<% } %>
</div>
<% } %>
</section>
<% } %>

<!-- Certificates -->
<% if (hasItems(cv.certificates)) { %>
<section class="certificates-section">
<div class="section-title">
<h2>Certificates</h2>
<div class="line"></div>
</div>
<% for (const item of cv.certificates) { %>
<div class="certificate section-item">
<div class="row space-between">
<h3><%= item.name %></h3>
<%- date(item, 2) %>
</div>
<div class="fluency row subtitle"><%= item.issuer %></div>
<%- linkInDiv(item.url) %>
</div>
<% } %>
</section>
<% } %>

<!-- Volunteer -->
<% if (hasItems(cv.volunteer)) { %>
<section class="volunteer-section">
<div class="section-title">
<h2>Volunteer</h2>
<div class="line"></div>
</div>
<% for (const item of cv.volunteer) { %>
<div class="volunteer section-item">
<div class="row space-between">
<h3><%= item.organization %></h3>
<%- linkInDiv(item.url) %>
</div>
<div class="row space-between">
<div class="position subtitle"><%= item.position %></div>
<%- dateRange(item, 2) %>
</div>
<div class="summary p"><%- fn.renderMarkdown(item.summary) %></div>
<% if (item.highlights && item.highlights.length > 0) { %>
<div class="highlights row">
<ul>
<% for (const hl of item.highlights) { %>
<li><%- fn.renderMarkdown(hl, true) %></li>
<% } %>
</ul>
</div>
<% } %>
</div>
<% } %>
</section>
<% } %>


<!-- Publications -->
<% if (hasItems(cv.publications)) { %>
<section class="publications-section">
<div class="section-title">
<h2>Publications</h2>
<div class="line"></div>
</div>
<% for (const item of cv.publications) { %>
<div class="publication section-item">
<div class="row space-between">
<h3><%= item.name %></h3>
<%- date(item, 2) %>
</div>
<div class="publisher row subtitle"><%= item.publisher %></div>
<%- linkInDiv(item.url) %>
<% if (item.summary) { %>
<div class="summary p"><%- fn.renderMarkdown(item.summary) %></div>
<% } %>
</div>
<% } %>
</section>
<% } %>

<!-- References -->
<% if (hasItems(cv.references)) { %>
<section class="references-section">
<div class="section-title">
<h2>References</h2>
<div class="line"></div>
</div>
<% for (const item of cv.references) { %>
<div class="reference section-item">
<div class="row space-between">
<h3><%= item.name %></h3>
<div class="relationship subtitle"><%= item.relationship %></div>
</div>
<div class="row _text-dim"><%- fn.renderMarkdown(item.reference, true) %></div>
</div>
<% } %>
</section>
<% } %>

<!-- Interests -->
<% if (hasItems(cv.interests)) { %>
<section class="interests-section">
<div class="section-title">
<h2>Interests</h2>
<div class="line"></div>
</div>
<div class="two-columns">
<% for (const item of cv.interests) { %>
<div class="interest section-item">
<h3><%= item.name %></h3>
<% if (item.keywords && item.keywords.length > 0) { %>
<div class="keywords">
<% for (const kw of item.keywords) { %>
<span class="item"><%= kw %></span>
<% } %>
</div>
<% } %>
</div>
<% } %>
</div>
</section>
<% } %>

<!-- meta -->
<% if (cv.meta) { %>
Expand Down
Loading

0 comments on commit 9320456

Please sign in to comment.