Refactor handout.typ
All checks were successful
CI / Typos (push) Successful in 30s
CI / Typst formatting (push) Successful in 6s
CI / Build (push) Successful in 11m21s

Reviewed-on: #7
Co-authored-by: Mark <mark@betalupi.com>
Co-committed-by: Mark <mark@betalupi.com>
This commit is contained in:
2025-01-24 17:59:56 -08:00
committed by Mark
parent 334b28ed94
commit 7b62526a5c
10 changed files with 402 additions and 306 deletions

View File

@ -0,0 +1,49 @@
/// Miscellaneous utilities
#let ored = rgb("D62121")
#let oorange = rgb("#ffaa3b")
#let ogrape = rgb("9C36B5")
#let ocyan = rgb("2288BF")
#let oteal = rgb("12B886")
#let ogreen = rgb("37B26D")
#let oblue = rgb("1C7ED6")
#let note(content, type: none) = {
set text(fill: rgb(100, 100, 100))
if type != none {
text(style: "oblique", [#type: ])
}
text(content)
}
#let hint = note.with(type: "Hint")
#let examplesolution(content) = {
let c = oblue
align(
center,
stack(
block(
width: 100%,
breakable: false,
fill: c,
stroke: c + 2pt,
inset: 1.5mm,
(
align(left, text(fill: white, weight: "bold", [Example solution:]))
),
),
block(
width: 100%,
height: auto,
breakable: false,
fill: c.lighten(80%).desaturate(10%),
stroke: c + 2pt,
inset: 3mm,
align(left, content),
),
),
)
}