diff --git a/progress.png b/progress.png index 5bb2a85..21aa751 100644 Binary files a/progress.png and b/progress.png differ diff --git a/progress.typ b/progress.typ index b6f1518..50b98f8 100644 --- a/progress.typ +++ b/progress.typ @@ -10,4 +10,10 @@ } return p }) -#make-progress(links: false) \ No newline at end of file +#make-progress( + links: false, + badge: ( + name: "LordBaryhobal", + img: image("res/me.jpg", width: 3em) + ) +) \ No newline at end of file diff --git a/res/me.jpg b/res/me.jpg new file mode 100644 index 0000000..7f301c1 Binary files /dev/null and b/res/me.jpg differ diff --git a/src/utils.typ b/src/utils.typ index 88ae385..80176f5 100644 --- a/src/utils.typ +++ b/src/utils.typ @@ -122,7 +122,30 @@ ) } -#let make-progress(links: true) = context { +#let make-badge(name, img) = { + let img = scale(3em, img, reflow: true) + box( + grid( + columns: 2, + align: center + horizon, + column-gutter: 0.4em, + [*#name*], + box( + img, + radius: 1.5em, + clip: true + ) + ), + fill: green.lighten(50%), + inset: (left: 0.8em), + radius: 1.5em + ) +} + +#let make-progress( + links: true, + badge: none +) = context { let stars = star-state.final() let star-cnt = stars.values().sum(default: 0) let first-weekday = datetime( @@ -149,7 +172,11 @@ cells.push(cell) } - [*Stars: #star-cnt / 50*] + let badge = if badge != none { + make-badge(badge.name, badge.img) + } + + [*Stars: #star-cnt / 50*#h(1fr)#badge] table( columns: (1fr,)*7, inset: 0.8em,