From 9a700ef86f34ad2a136b73c3b0d67d9d1a9a1e48 Mon Sep 17 00:00:00 2001 From: Popa <115492561+Popa-42@users.noreply.github.com> Date: Wed, 30 Sep 2026 13:17:31 +0200 Subject: [PATCH] fix: side barcode alignment --- src/templates/modern.typ | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/templates/modern.typ b/src/templates/modern.typ index 7bd6503..060f29d 100644 --- a/src/templates/modern.typ +++ b/src/templates/modern.typ @@ -242,10 +242,23 @@ width: 100%, height: 3.25cm, inset: (x: 2em), - align(outer-side + horizon, rotate(90deg * odd-side, align(center)[ - #code - #place(bottom + center, dy: 0.15em, text(size: 0.18em, fill: theme.primary)[#datamatrix-slug/#page-num]) - ])), + if odd-side == -1 { + align(right + horizon, rotate(-90deg, align(center)[ + #code + #place(bottom + center, dy: 0.15em, text( + size: 0.18em, + fill: theme.primary, + )[#datamatrix-slug/#page-num]) + ])) + } else { + align(left + horizon, rotate(-90deg, align(center)[ + #code + #place(bottom + center, dy: 0.15em, text( + size: 0.18em, + fill: theme.primary, + )[#datamatrix-slug/#page-num]) + ])) + }, ), ) }