Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing projects description with bullet points according to jsonresume schema #215

Closed
wants to merge 17 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Final formatting
IdkwhatImD0ing committed Aug 14, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit fa74caef6573cbd517b02ca54f5eba3e3581fa3c
172 changes: 86 additions & 86 deletions src/lib/templates/template1/index.ts
Original file line number Diff line number Diff line change
@@ -40,58 +40,58 @@ const generator: Generator = {
%==== Education ====%
\\header{${heading || 'Education'}}
${education.map((school) => {
const {
institution,
location,
studyType,
area,
score,
startDate,
endDate
} = school

let line1 = ''
let line2 = ''

if (institution) {
line1 += `\\textbf{${institution}}`
}
const {
institution,
location,
studyType,
area,
score,
startDate,
endDate
} = school

let line1 = ''
let line2 = ''

if (institution) {
line1 += `\\textbf{${institution}}`
}

if (location) {
line1 += `\\hfill ${location}`
}
if (location) {
line1 += `\\hfill ${location}`
}

if (studyType) {
line2 += studyType
}
if (studyType) {
line2 += studyType
}

if (area) {
line2 += studyType ? ` ${area}` : `Degree in ${area}`
}
if (area) {
line2 += studyType ? ` ${area}` : `Degree in ${area}`
}

if (score) {
line2 += ` \\textit{GPA: ${score}}`
}
if (score) {
line2 += ` \\textit{GPA: ${score}}`
}

if (startDate || endDate) {
const gradLine = `${startDate || ''} - ${endDate || ''}`
line2 += line2 ? ` \\hfill ${gradLine}` : gradLine
}
if (startDate || endDate) {
const gradLine = `${startDate || ''} - ${endDate || ''}`
line2 += line2 ? ` \\hfill ${gradLine}` : gradLine
}

if (line1) {
line1 += '\\\\'
}
if (line1) {
line1 += '\\\\'
}

if (line2) {
line2 += '\\\\'
}
if (line2) {
line2 += '\\\\'
}

return stripIndent`
return stripIndent`
${line1}
${line2.trim()}
\\vspace{2mm}
`
})}
})}
`
},

@@ -106,50 +106,50 @@ const generator: Generator = {
\\vspace{1mm}

${work.map((job) => {
const { name, position, location, startDate, endDate, highlights } = job
const { name, position, location, startDate, endDate, highlights } = job

let line1 = ''
let line2 = ''
let highlightLines = ''
let line1 = ''
let line2 = ''
let highlightLines = ''

if (name) {
line1 += `\\textbf{${name}}`
}
if (name) {
line1 += `\\textbf{${name}}`
}

if (location) {
line1 += ` \\hfill ${location}`
}
if (location) {
line1 += ` \\hfill ${location}`
}

if (position) {
line2 += `\\textit{${position}}`
}
if (position) {
line2 += `\\textit{${position}}`
}

if (startDate && endDate) {
line2 += ` \\hfill ${startDate} - ${endDate}`
} else if (startDate) {
line2 += ` \\hfill ${startDate} - Present`
} else if (endDate) {
line2 += ` \\hfill ${endDate}`
}
if (startDate && endDate) {
line2 += ` \\hfill ${startDate} - ${endDate}`
} else if (startDate) {
line2 += ` \\hfill ${startDate} - Present`
} else if (endDate) {
line2 += ` \\hfill ${endDate}`
}

if (line1) line1 += '\\\\'
if (line2) line2 += '\\\\'
if (line1) line1 += '\\\\'
if (line2) line2 += '\\\\'

if (highlights) {
highlightLines = source`
if (highlights) {
highlightLines = source`
\\vspace{-1mm}
\\begin{itemize} \\itemsep 1pt
${highlights.map((highlight) => `\\item ${highlight}`)}
\\end{itemize}
`
}
}

return stripIndent`
return stripIndent`
${line1}
${line2}
${highlightLines}
`
})}
})}
`
},

@@ -162,9 +162,9 @@ const generator: Generator = {
\\header{${heading || 'Skills'}}
\\begin{tabular}{ l l }
${skills.map((skill) => {
const { name = 'Misc', keywords = [] } = skill
return `${name}: & ${keywords.join(', ')} \\\\`
})}
const { name = 'Misc', keywords = [] } = skill
return `${name}: & ${keywords.join(', ')} \\\\`
})}
\\end{tabular}
\\vspace{2mm}
`
@@ -233,32 +233,32 @@ const generator: Generator = {
return source`
\\header{${heading || 'Awards'}}
${awards.map((award) => {
const { title, summary, date, awarder } = award
const { title, summary, date, awarder } = award

let line1 = ''
let line2 = summary || ''
let line1 = ''
let line2 = summary || ''

if (title) {
line1 += `\\textbf{${title}}`
}
if (title) {
line1 += `\\textbf{${title}}`
}

if (awarder) {
line1 += ` \\hfill ${awarder}`
}
if (awarder) {
line1 += ` \\hfill ${awarder}`
}

if (date) {
line2 += ` \\hfill ${date}`
}
if (date) {
line2 += ` \\hfill ${date}`
}

if (line1) line1 += '\\\\'
if (line2) line2 += '\\\\'
if (line1) line1 += '\\\\'
if (line2) line2 += '\\\\'

return stripIndent`
return stripIndent`
${line1}
${line2}
\\vspace*{2mm}
`
})}
})}
`
},

100 changes: 50 additions & 50 deletions src/lib/templates/template2/index.ts
Original file line number Diff line number Diff line change
@@ -61,43 +61,43 @@ const generator: Generator = {
\\cvsection{${heading || 'Education'}}
\\begin{cventries}
${education.map((school) => {
const {
institution,
location,
area,
studyType,
score,
startDate,
endDate
} = school

let degreeLine

if (studyType && area) {
degreeLine = `${studyType} in ${area}`
} else if (studyType || area) {
degreeLine = studyType || area
}
const {
institution,
location,
area,
studyType,
score,
startDate,
endDate
} = school

let degreeLine

if (studyType && area) {
degreeLine = `${studyType} in ${area}`
} else if (studyType || area) {
degreeLine = studyType || area
}

let dateRange
let dateRange

if (startDate && endDate) {
dateRange = `${startDate} – ${endDate}`
} else if (startDate) {
dateRange = `${startDate} – Present`
} else {
dateRange = endDate
}
if (startDate && endDate) {
dateRange = `${startDate} – ${endDate}`
} else if (startDate) {
dateRange = `${startDate} – Present`
} else {
dateRange = endDate
}

return stripIndent`
return stripIndent`
\\cventry
{${degreeLine || ''}}
{${institution || ''}}
{${location || ''}}
{${dateRange || ''}}
{${score ? `GPA: ${score}` : ''}}
`
})}
})}
\\end{cventries}

\\vspace{-2mm}
@@ -116,36 +116,36 @@ const generator: Generator = {
\\cvsection{${heading || 'Experience'}}
\\begin{cventries}
${work.map((job) => {
const { name, position, location, startDate, endDate, highlights } = job
const { name, position, location, startDate, endDate, highlights } = job

let dateRange
let dutyLines
let dateRange
let dutyLines

if (startDate && endDate) {
dateRange = `${startDate} – ${endDate}`
} else if (startDate) {
dateRange = `${startDate} – Present`
} else {
dateRange = endDate
}
if (startDate && endDate) {
dateRange = `${startDate} – ${endDate}`
} else if (startDate) {
dateRange = `${startDate} – Present`
} else {
dateRange = endDate
}

if (highlights) {
dutyLines = source`
if (highlights) {
dutyLines = source`
\\begin{cvitems}
${highlights.map((duty) => `\\item {${duty}}`)}
\\end{cvitems}
`
}
}

return stripIndent`
return stripIndent`
\\cventry
{${position || ''}}
{${name || ''}}
{${location || ''}}
{${dateRange || ''}}
{${dutyLines}}
`
})}
})}
\\end{cventries}
`
},
@@ -162,12 +162,12 @@ const generator: Generator = {
{}
{\\def\\arraystretch{1.15}{\\begin{tabular}{ l l }
${skills.map((skill) => {
const { name, keywords = [] } = skill
const nameLine = name ? `${name}: ` : ''
const detailsLine = `{\\skill{ ${keywords.join(', ') || ''}}}`
const { name, keywords = [] } = skill
const nameLine = name ? `${name}: ` : ''
const detailsLine = `{\\skill{ ${keywords.join(', ') || ''}}}`

return `${nameLine} & ${detailsLine} \\\\`
})}
return `${nameLine} & ${detailsLine} \\\\`
})}
\\end{tabular}}}
{}
{}
@@ -219,16 +219,16 @@ const generator: Generator = {
\\cvsection{${heading || 'Awards'}}
\\begin{cvhonors}
${awards.map((award) => {
const { title, summary, date, awarder } = award
const { title, summary, date, awarder } = award

return stripIndent`
return stripIndent`
\\cvhonor
{${title || ''}}
{${summary || ''}}
{${awarder || ''}}
{${date || ''}}
`
})}
})}
\\end{cvhonors}
`
},