diff --git a/.gitignore b/.gitignore index f08278d..09fdbde 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -*.pdf \ No newline at end of file +*.pdf +tests/*/diff +tests/*/out diff --git a/tests/resume/ref/1.png b/tests/resume/ref/1.png new file mode 100644 index 0000000..4b987e1 Binary files /dev/null and b/tests/resume/ref/1.png differ diff --git a/tests/resume/test.typ b/tests/resume/test.typ new file mode 100644 index 0000000..bb64d16 --- /dev/null +++ b/tests/resume/test.typ @@ -0,0 +1,99 @@ +#import "@preview/modern-cv:0.7.0": * + +// setup the document like we do for the resume +#let font = ("Source Sans Pro", "Source Sans 3") +#set text( + font: font, + size: 11pt, + fill: color-darkgray, + fallback: true, +) + +#set page( + paper: "a4", + margin: (left: 15mm, right: 15mm, top: 10mm, bottom: 10mm), + footer: [], + footer-descent: 0pt, +) + +// set paragraph spacing +#show par: set block( + above: 0.75em, + below: 0.75em, +) +#set par(justify: true) + +#set heading( + numbering: none, + outlined: false, +) + +#show heading.where(level: 1): it => [ + + #set block( + above: 1em, + below: 1em, + ) + #set text( + size: 16pt, + weight: "regular", + ) + + #align(left)[ + #let color = if colored-headers { + accent-color + } else { + color-darkgray + } + #text[#strong[#text(color)[#it.body.text]]] + #box(width: 1fr, line(length: 100%)) + ] + +] + +#show heading.where(level: 2): it => { + set text( + color-darkgray, + size: 12pt, + style: "normal", + weight: "bold", + ) + it.body +} + +#show heading.where(level: 3): it => { + set text( + size: 10pt, + weight: "regular", + ) + smallcaps[#it.body] +} + +// test the resume functions + +#resume-item("Education") + +#resume-entry( + title: "BSc Computer Science", + location: "Example City", + date: "2019 - 2022", + description: "Achieved acaademic honors and awards.", +) + +// resume-entry also support omitting the date and description +#resume-entry( + title: "Title", + location: "Location", +) + +#resume-certification( + "Certified Scrum Master (CSM)", + "Jan 2022", +) + +#resume-skill-item( + "Programming", + (strong["C++"], "Python", "Java"), +) + +#resume-gpa("3.5", "4.0") diff --git a/tests/utilities/ref/1.png b/tests/utilities/ref/1.png new file mode 100644 index 0000000..cd93995 Binary files /dev/null and b/tests/utilities/ref/1.png differ diff --git a/tests/utilities/test.typ b/tests/utilities/test.typ new file mode 100644 index 0000000..eeb60e4 --- /dev/null +++ b/tests/utilities/test.typ @@ -0,0 +1,92 @@ +#import "@preview/modern-cv:0.7.0": * + +// setup the document like we do for the resume +#let font = ("Source Sans Pro", "Source Sans 3") +#set text( + font: font, + size: 11pt, + fill: color-darkgray, + fallback: true, +) + +#set page( + paper: "a4", + margin: (left: 15mm, right: 15mm, top: 10mm, bottom: 10mm), + footer: [], + footer-descent: 0pt, +) + +// set paragraph spacing +#show par: set block( + above: 0.75em, + below: 0.75em, +) +#set par(justify: true) + +#set heading( + numbering: none, + outlined: false, +) + +#show heading.where(level: 1): it => [ + + #set block( + above: 1em, + below: 1em, + ) + #set text( + size: 16pt, + weight: "regular", + ) + + #align(left)[ + #let color = if colored-headers { + accent-color + } else { + color-darkgray + } + #text[#strong[#text(color)[#it.body.text]]] + #box(width: 1fr, line(length: 100%)) + ] + +] + +#show heading.where(level: 2): it => { + set text( + color-darkgray, + size: 12pt, + style: "normal", + weight: "bold", + ) + it.body +} + +#show heading.where(level: 3): it => { + set text( + size: 10pt, + weight: "regular", + ) + smallcaps[#it.body] +} + +#justified-header("Modern CV", "A modern curriculum vitae template") + +#secondary-justified-header("Created by", "DeveloperPaul123") + +#github-link("DeveloperPaul123/modern-cv") +#linkedin-icon +#github-icon +#twitter-icon +#google-scholar-icon +#orcid-icon +#phone-icon +#email-icon +#birth-icon +#homepage-icon +#website-icon + +#square(size: 1em, fill: color-darkgray) +#square(size: 1em, fill: color-darknight) +#square(size: 1em, fill: color-gray) +#square(size: 1em, fill: default-accent-color) +#square(size: 1em, fill: default-location-color) \ No newline at end of file diff --git a/typst.toml b/typst.toml index a2717ae..0fe1190 100644 --- a/typst.toml +++ b/typst.toml @@ -17,3 +17,6 @@ repository = "https://github.com/DeveloperPaul123/modern-cv" path = "template" entrypoint = "resume.typ" thumbnail = "assets/images/resume.png" + +[tool.typst-test] +vcs = "git"