#let apply(doc) = { set page( paper: "a4", numbering: none, margin: (left: 0.25cm, right: 0.25cm, top: 0.5cm, bottom: 0.5cm), background: [ #align(top + left, rect(width: 5.55cm, height: 100%, fill: blue.lighten(90%))) #v(-100%) #v(-1.3em) #align(top, rect(width: 100%, height: 4.4cm, fill: blue)) #v(-5cm) #align(top + left, box(inset: (x: 0.8cm, y: 1cm), image("./assets/moi.png", height: 4cm))) ], ) set text(font: "CMU Sans Serif") set par(leading: 0.4em) show heading.where(level: 1): it => { set text(fill: blue) grid( gutter: 1em, columns: (5cm, 7fr), [], // align(horizon, [#v(3pt) #rect(width: 1cm, height: 0.33em, fill: blue)]), [ #it.body #v(-0.5cm) #line(stroke: blue, length: 100%) ], ) } doc } #let entry(body, left: content) = { grid( gutter: 1em, columns: (5.5cm, 0.75fr, 7fr), [], align(right, left), body, ) v(-4pt) } #let entry2(left: content, heading: content, description: content, note: content) = { let content = [ #heading \ #set text(size: 12pt, style: "italic") #description \ #set text(size: 11pt, style: "normal") #note ] style(styles => { let size = measure(content, styles) let offset = measure(left, styles) grid( gutter: 1em, columns: (5.5cm, 0.75fr, 7fr), [], align(center, [ #left #v(-0.5em) #line(angle: 90deg, length: size.height - offset.height - 0.5em) ]), content ) v(-4pt) }) } #let score(level: int) = { let elems = () for x in range(5) { if level > x { elems.push(rect(width: 0.4cm, height: 0.2cm, fill: blue)) } else { elems.push(rect(width: 0.4cm, height: 0.2cm, fill: blue.lighten(60%))) } } v(0.1cm) stack( dir: ltr, elems.at(0), h(0.1cm), elems.at(1), h(0.1cm), elems.at(2), h(0.1cm), elems.at(3), h(0.1cm), elems.at(4), ) }