Commit 6dc338f
Changed files (2)
src
contents
_lib
components
src/contents/_lib/components/align.typ
@@ -0,0 +1,34 @@
+#import "@preview/bullseye:0.1.0": target
+
+#let left(content) = context {
+ if target() == "html" {
+ html.div(
+ class: "flex flex-col items-start text-left",
+ content,
+ )
+ } else {
+ std.align(std.left, content)
+ }
+}
+
+#let center(content) = context {
+ if target() == "html" {
+ html.div(
+ class: "flex flex-col items-center text-center",
+ content,
+ )
+ } else {
+ std.align(std.center, content)
+ }
+}
+
+#let right(content) = context {
+ if target() == "html" {
+ html.div(
+ class: "flex flex-col items-end text-right",
+ content,
+ )
+ } else {
+ std.align(std.right, content)
+ }
+}
src/contents/_lib/tybios.typ
@@ -1,3 +1,4 @@
+#import "components/align.typ": center, left, right
#import "components/frame.typ": frame
#import "components/fullwidth.typ": fullwidth
#import "components/marginnote.typ": marginnote