main
1#import "@preview/bullseye:0.1.0": target
2
3/// Same to `#html.frame`, but it will return content if the target is not html.
4///
5/// - content (content):
6/// - invert-color (bool): Whether to invert color in web dark mode.
7/// -> content
8#let frame(content, invert-color: true) = context {
9 if target() == "html" {
10 return html.div(html.frame(content), class: if invert-color { "tybios-frame-invert" } else { "tybios-frame" })
11 }
12 return content
13}