feat: refine modern template side code placement
This commit is contained in:
1 file changed
+7
-2
@@ -233,14 +233,19 @@
|
|||||||
options: (symbols: "rect-ext-16"),
|
options: (symbols: "rect-ext-16"),
|
||||||
)
|
)
|
||||||
|
|
||||||
let outer-side = if calc.odd(page-num) { right } else { left }
|
let odd-side = if calc.odd(page-num) { -1 } else { 1 }
|
||||||
|
let outer-side = if (odd-side == -1) { right } else { left }
|
||||||
|
|
||||||
place(
|
place(
|
||||||
top + center,
|
top + center,
|
||||||
block(
|
block(
|
||||||
width: 100%,
|
width: 100%,
|
||||||
height: 3.25cm,
|
height: 3.25cm,
|
||||||
align(outer-side + horizon, rotate(-90deg, code)),
|
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])
|
||||||
|
])),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user