generated from matchy233/typst-chi-cv-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
范乾一
committed
Apr 26, 2024
1 parent
667aea0
commit 1ccb63c
Showing
9 changed files
with
146 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
#import "fontawesome.typ": * | ||
|
||
#let italic_fonts = ("Source Han Serif SC VF") | ||
|
||
#let title_fonts = ("FZJinLS-B-GB") | ||
|
||
#let fonts = ( | ||
"Avenir Next LT Pro", // original chi-cv font\ | ||
"Manrope", // a font available in the typst environment and looks similar to Avenir | ||
"Apple Color Emoji", | ||
) | ||
|
||
#let chiline() = { | ||
v(-3pt); | ||
line(length: 100%, stroke: gray); | ||
v(-10pt) | ||
} | ||
|
||
|
||
#let iconlink( | ||
uri, text: "", icon: link-icon) = { | ||
link(uri)[#fa[#icon] #text] | ||
} | ||
|
||
#let landr( | ||
tl: lorem(2), | ||
tr: "YYYY/MM - YYYY/MM" | ||
) = { | ||
text(font:fonts,weight: "bold" ,tl) + h(1fr) + tr | ||
} | ||
|
||
#let cventry( | ||
tl: lorem(2), | ||
tr: "2333/23 - 2333/23", | ||
bl: "", | ||
br: "", | ||
content | ||
) = { | ||
show strong: it => { | ||
text(font:fonts,weight:"bold", it.body) | ||
} | ||
|
||
show emph : it => { | ||
text(font:italic_fonts,weight:"regular", it.body) | ||
} | ||
block( | ||
inset: (left: 0pt), | ||
text(font:fonts,weight: "black" ,tl) + h(1fr) + tr + | ||
linebreak() + | ||
if bl != "" or br != "" { | ||
bl + h(1fr) + br + linebreak() | ||
} + | ||
content | ||
) | ||
} | ||
|
||
#let chicv(body) = { | ||
set par(justify: true) | ||
|
||
show heading.where( | ||
level: 1 | ||
): set text( | ||
size: 22pt, | ||
font: fonts, | ||
weight: "black", | ||
) | ||
|
||
show heading.where( | ||
level: 2 | ||
): it => text( | ||
size: 12pt, | ||
font: fonts, | ||
// customed for chinese heading | ||
weight: "black", | ||
block( | ||
chiline() + it, | ||
) | ||
) | ||
|
||
set list(indent: 0pt) | ||
|
||
show link: it => underline(stroke:1pt,evade: true,offset: 2pt,extent:0pt, it) | ||
set page( | ||
margin: (x: 0.9cm, y: 1.1cm), | ||
) | ||
set par(justify: true) | ||
|
||
body | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters