Mark 7b62526a5c
All checks were successful
CI / Typos (push) Successful in 30s
CI / Typst formatting (push) Successful in 6s
CI / Build (push) Successful in 11m21s
Refactor handout.typ
Reviewed-on: #7
Co-authored-by: Mark <mark@betalupi.com>
Co-committed-by: Mark <mark@betalupi.com>
2025-01-24 17:59:56 -08:00

50 lines
954 B
Typst
Executable File

/// 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),
),
),
)
}