Skip to content

Commit

Permalink
feat: add cvSkill with level style (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeWimbes authored Feb 16, 2025
1 parent a80866a commit 772435a
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion cv.typ
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
/// Add a skill to the CV.
///
/// - type (str): The type of the skill. It is displayed on the left side.
/// - info (str | content): The information about the skill. It is displayed on the right side. Items can be seperated by `#hbar()`.
/// - info (str | content): The information about the skill. It is displayed on the right side. Items can be separated by `#hbar()`.
/// -> content
#let cvSkill(type: "Type", info: "Info") = {
let skillTypeStyle(str) = {
Expand All @@ -444,6 +444,43 @@
v(-6pt)
}

/// Add a skill with a level to the CV.
///
/// - type (str): The type of the skill. It is displayed on the left side.
/// - level (int): The level of the skill. It is displayed in as circles in the middle. The minimum level is 0 and the maximum level is 5.
/// - info (str | content): The information about the skill. It is displayed on the right side.
/// -> content
#let cvSkillWithLevel(
type: "Type",
level: 3,
info: "Info"
) = {
let skillTypeStyle(str) = {
align(right, text(size: 10pt, weight: "bold", str))
}
let skillInfoStyle(str) = {
text(str)
}
let skillLevelStyle(str) = {
set text(size: 10pt, fill: regularColors.darkgray)
for x in range(0, level) {
[#fa-icon("circle", solid: true) ]
}
for x in range(level, 5) {
[#fa-icon("circle") ]
}
}

table(
columns: (17%, auto, 1fr),
inset: 0pt,
column-gutter: 10pt,
stroke: none,
skillTypeStyle(type), skillLevelStyle(level), skillInfoStyle(info),
)
v(-6pt)
}

/// Add a Honor to the CV.
///
/// - date (str): The date of the honor.
Expand Down

0 comments on commit 772435a

Please sign in to comment.