Skip to content

Commit

Permalink
Update version to 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiaxin Peng committed Jul 30, 2024
1 parent c6d1a74 commit d37337b
Show file tree
Hide file tree
Showing 3 changed files with 169 additions and 93 deletions.
2 changes: 1 addition & 1 deletion example_double.typ
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "@local/modernpro-cv:0.0.1": *
#import "@local/modernpro-cv:1.0.0": *


#show: cv-double(
Expand Down
14 changes: 7 additions & 7 deletions example_single.typ
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "@local/modernpro-cv:0.0.1": *
#import "@local/modernpro-cv:1.0.0": *


#show: cv-single.with(
Expand All @@ -25,7 +25,7 @@
#education(
institution: [#lorem(4)],
major: [#lorem(2)],
period: "xxxx-xxxx",
date: "xxxx-xxxx",
location: "UK",
description: [
- #lorem(10),
Expand All @@ -36,20 +36,20 @@
#education(
institution: [#lorem(4)],
major: [#lorem(2)],
period: "xxxx-xxxx",
date: "xxxx-xxxx",
location: "UK",
)

#section("Skills")
#oneline-item(
#oneline-title-item(
title: "Programming Languages",
content: [Python, C++, Java, JavaScript, HTML, CSS, SQL, LaTeX],
)
#oneline-item(
#oneline-title-item(
title: "Frameworks",
content: [React, Node.js, Express, Flask, Django, Bootstrap, jQuery],
)
#oneline-item(
#oneline-title-item(
title: "Tools",
content: [Git, GitHub, Docker, AWS, Heroku, MongoDB, MySQL, PostgreSQL, Redis, Linux],
)
Expand Down Expand Up @@ -98,7 +98,7 @@
// subsectionsep
// project[#lorem(2)][][#lorem(40)]
// sectionsep
// // Publication
// Publication
#section("Publications")
#bibliography("bib.bib", style: "american-psychological-association", full: true, title: none)

Expand Down
246 changes: 161 additions & 85 deletions modernpro-cv.typ
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
// Define the colour scheme
#let date_colour = rgb("#666666")
#let primary_colour = rgb("#2b2b2b")
#let headings_colour = rgb("#000000")
#let primary_colour = rgb("#000000")
#let headings_colour = rgb("#2b2b2b")
#let subheadings_colour = rgb("#333333")
#let sectionsep = {
Expand Down Expand Up @@ -116,35 +116,42 @@
}

#let award(award: "", institution: "", date: "") = {
[#text(11pt, fill: primary_colour, weight: "medium")[#award,] #text(11pt, fill: primary_colour, weight: "regular")[#emph(institution)] #h(1fr) #text(11pt, fill: primary_colour, weight: "regular")[#emph(date)\ ]]
[#text(11pt, fill: primary_colour, weight: "medium")[#award,] #text(
11pt,
fill: primary_colour,
weight: "regular",
)[#emph(institution)] #h(1fr) #text(11pt, fill: primary_colour, weight: "regular")[#emph(date)\ ]]
}

#let references(references: ()) = {
grid(columns: (1fr, 1fr), row-gutter: 10pt, ..references.map(reference => {
align(left, {
if ("position" in reference) {
text(11pt, fill: primary_colour, weight: "semibold")[#reference.name | #reference.position\ ]
} else {
text(11pt, fill: primary_colour, weight: "semibold")[#reference.name\ ]
}
align(
left,
{
if ("position" in reference) {
text(11pt, fill: primary_colour, weight: "semibold")[#reference.name | #reference.position\ ]
} else {
text(11pt, fill: primary_colour, weight: "semibold")[#reference.name\ ]
}

if ("department" in reference) {
text(10pt, fill: primary_colour, weight: "regular")[#reference.department\ ]
}
if ("institution" in reference) {
text(10pt, fill: primary_colour, weight: "regular")[#reference.institution\ ]
}
if ("address" in reference) {
text(10pt, fill: primary_colour, weight: "regular")[#reference.address\ ]
}
if ("email" in reference) {
text(10pt, fill: primary_colour, weight: "regular")[
#reference.email \
]
}
v(2pt)
})
}))
if ("department" in reference) {
text(10pt, fill: primary_colour, weight: "regular")[#reference.department\ ]
}
if ("institution" in reference) {
text(10pt, fill: primary_colour, weight: "regular")[#reference.institution\ ]
}
if ("address" in reference) {
text(10pt, fill: primary_colour, weight: "regular")[#reference.address\ ]
}
if ("email" in reference) {
text(10pt, fill: primary_colour, weight: "regular")[
#reference.email \
]
}
v(2pt)
},
)
}))
}

// Publications
Expand All @@ -157,16 +164,16 @@
#let display(contacts) = {
set text(10pt, fill: headings_colour, weight: "regular", top-edge: "baseline", bottom-edge: "baseline", baseline: 2pt)
contacts
.map(contact => {
if contact.link == none [
contact.text
] else {
link(contact.link)[#{
.map(contact => {
if ("link" in contact) {
link(contact.link)[#{
contact.text
}]
} else [
contact.text
}]
}
})
.join(" | ")
]
})
.join(" | ")
}

#let cv-single(
Expand Down Expand Up @@ -194,32 +201,50 @@
}
}

set page(
footer: [
#lastupdate(lastupdated, date)
#h(1fr)
#text(9pt, style: "italic", fill: primary_colour, weight: "light")[#name]
#h(1fr)
#if pagecount == "true" {
text(9pt, style: "italic", fill: primary_colour, weight: "light")[Page #counter(page).display("1 / 1", both: true)]
}
],
)

if continue-header == "true" {
set page(margin: (left: 2cm, right: 2cm, top: 2.5cm, bottom: 1.5cm), header: {
set page(footer: [
#lastupdate(lastupdated, date)
#h(1fr)
#text(9pt, style: "italic", fill: primary_colour, weight: "light")[#name]
#h(1fr)
#if pagecount == "true" {
text(
20pt,
9pt,
style: "italic",
fill: primary_colour,
weight: "bold",
top-edge: "baseline",
bottom-edge: "baseline",
baseline: 11pt,
)[#align(center, [#name])]
v(2pt)
align(center)[#display(contacts)]
// line(length: 100%, stroke: 0.5pt + primary_colour)
}, header-ascent: 1em)
weight: "light",
)[Page #counter(page).display("1 / 1", both: true)]
}
])

if continue-header == "true" {
set page(
margin: (left: 2cm, right: 2cm, top: 2.5cm, bottom: 1.5cm),
header: {
text(
20pt,
fill: primary_colour,
weight: "bold",
top-edge: "baseline",
bottom-edge: "baseline",
baseline: 11pt,
)[#align(center, [#name])]
// address
if address != none {
v(2pt)
text(
11pt,
fill: primary-colour,
weight: "regular",
top-edge: "baseline",
bottom-edge: "baseline",
baseline: 2pt,
)[#align(center, [#address])]
}
v(2pt)
align(center)[#display(contacts)]
},
header-ascent: 1em,
)
mainbody
} else {
set page(margin: (left: 1.8cm, right: 1.8cm, top: 1cm, bottom: 1cm))
Expand All @@ -231,6 +256,18 @@
bottom-edge: "baseline",
baseline: 11pt,
)[#align(center, [#name])]
// address
if address != none {
v(2pt)
text(
11pt,
fill: primary-colour,
weight: "regular",
top-edge: "baseline",
bottom-edge: "baseline",
baseline: 2pt,
)[#align(center, [#address])]
}
v(2pt)
align(center)[#display(contacts)]
// line(length: 100%, stroke: 0.5pt + primary_colour)
Expand Down Expand Up @@ -265,34 +302,57 @@
}
}

set page(
footer: [
#lastupdate(lastupdated, date)
#h(1fr)
#text(9pt, style: "italic", fill: primary_colour, weight: "light")[#name]
#h(1fr)
#if pagecount == "true" {
text(9pt, style: "italic", fill: primary_colour, weight: "light")[Page #counter(page).display("1 / 1", both: true)]
}
],
)

if continue-header == "true" {
set page(margin: (left: 1.25cm, right: 1.25cm, top: 2.5cm, bottom: 1.5cm), header: {
set page(footer: [
#lastupdate(lastupdated, date)
#h(1fr)
#text(9pt, style: "italic", fill: primary_colour, weight: "light")[#name]
#h(1fr)
#if pagecount == "true" {
text(
20pt,
9pt,
style: "italic",
fill: primary_colour,
weight: "bold",
top-edge: "baseline",
bottom-edge: "baseline",
baseline: 11pt,
)[#align(center, [#name])]
v(2pt)
align(center)[#display(contacts)]
v(2pt)
}, header-ascent: 1em)
weight: "light",
)[Page #counter(page).display("1 / 1", both: true)]
}
])

if continue-header == "true" {
set page(
margin: (left: 1.25cm, right: 1.25cm, top: 2.5cm, bottom: 1.5cm),
header: {
text(
20pt,
fill: primary_colour,
weight: "bold",
top-edge: "baseline",
bottom-edge: "baseline",
baseline: 11pt,
)[#align(center, [#name])]
// address
if address != none {
v(2pt)
text(
11pt,
fill: primary-colour,
weight: "regular",
top-edge: "baseline",
bottom-edge: "baseline",
baseline: 2pt,
)[#align(center, [#address])]
}
v(2pt)
align(center)[#display(contacts)]
v(2pt)
},
header-ascent: 1em,
)
//Main Body
grid(columns: (1fr, 2fr), column-gutter: 2em, left, right)
grid(
columns: (1fr, 2fr),
column-gutter: 2em,
left, right,
)
} else {
set page(margin: (left: 1.25cm, right: 1.25cm, top: 1cm, bottom: 1.5cm))
text(
Expand All @@ -303,10 +363,26 @@
bottom-edge: "baseline",
baseline: 11pt,
)[#align(center, [#name])]
// address
if address != none {
v(2pt)
text(
11pt,
fill: primary-colour,
weight: "regular",
top-edge: "baseline",
bottom-edge: "baseline",
baseline: 2pt,
)[#align(center, [#address])]
}
v(2pt)
align(center)[#display(contacts)]
v(2pt)
//Main Body
grid(columns: (1fr, 2fr), column-gutter: 2em, left, right)
grid(
columns: (1fr, 2fr),
column-gutter: 2em,
left, right,
)
}
}

0 comments on commit d37337b

Please sign in to comment.