Commits: 1

Implement a image_rows (plural) helper

It's already useful for keeping the gutter consistent, but in the future I might implement more styling options (like styling each cell or an individual image), and then it will shine even more.

index 225bdd5..9d19036 100644
--- a/erna.typ
+++ b/erna.typ
@@ -78,3 +78,20 @@
=        )
=    })
=}
+
+#let image_rows(gutter: 0pt, ..args) = context {
+    let rows = args.pos().map(row => {
+        if type(row) == array {
+            row
+        } else {
+            (row,)
+        }
+    })
+
+    grid(
+        gutter: gutter,
+        columns: 1,
+        ..rows.map(row => image_row(gutter: gutter, ..row))
+    )
+}
+
index 14a0b71..95b850e 100644
Binary files a/preview.pdf and b/preview.pdf differ
index c2eaba9..726637b 100644
--- a/preview.typ
+++ b/preview.typ
@@ -1,4 +1,5 @@
-#import "erna.typ" as erna: image_row
+#import "erna.typ" as erna: image_row, image_rows
+
=
=#show heading.where(level: 1): content => {
=    pagebreak(weak: true)
@@ -9,7 +10,14 @@
=
=#show raw.where(lang: "typ"): content => {
=    content
-    eval(content.text, mode: "markup", scope: (image_row: image_row))
+    eval(
+        content.text,
+        mode: "markup",
+        scope: (
+            image_row: image_row,
+            image_rows: image_rows,
+        )
+    )
=}
=
=#grid(
@@ -95,5 +103,18 @@ It's possible to place several images in a vertical stack. This is useful when m
=)
=```
=
-= TODO: Multiple rows
+= Multiple rows
=
+```typ
+#image_rows(
+    gutter: 4pt,
+    // Row 1
+    ("780x300.jpg"),
+    ( // Row 2
+        "360x480.jpg",
+        "300x600.jpg",
+        // A stack in a second row
+        ( "500x480.jpg", "960x250.jpg" ),
+    )
+)
+```