From 70ebc8fe9c3a973ce826cbd6ff561a704a1208e8 Mon Sep 17 00:00:00 2001 From: June Date: Wed, 6 Mar 2024 01:07:08 +0100 Subject: [PATCH] Add rotated version of label-item.typ for horizontal item labels --- assets/ccchh-no-padding.svg | 143 ++++++++++++++++++++++++++++++++++++ label-item-rotated.typ | 72 ++++++++++++++++++ 2 files changed, 215 insertions(+) create mode 100644 assets/ccchh-no-padding.svg create mode 100644 label-item-rotated.typ diff --git a/assets/ccchh-no-padding.svg b/assets/ccchh-no-padding.svg new file mode 100644 index 0000000..7e41354 --- /dev/null +++ b/assets/ccchh-no-padding.svg @@ -0,0 +1,143 @@ + + + + Exported SVG + + + + + + diff --git a/label-item-rotated.typ b/label-item-rotated.typ new file mode 100644 index 0000000..e86e97a --- /dev/null +++ b/label-item-rotated.typ @@ -0,0 +1,72 @@ +#set text( + font: "Inter", + fallback: false, + size: 11pt, + lang: "en", +) + +// for DK-11208 (address label) +#set page( + width: 38mm, + height: 90mm, + flipped: true, + // Those are modified margins from label-item.typ. See that file for + // documentation on why these margins are the way they are. + // Of note for this paticular document: + // - We don't have a footer, so no need to add 9pt to the bottom margin. + // - Since this document is flipped, the margins are on different sides. + margin: (bottom: 0mm, top: 4mm, left: 9mm, right: 0mm), +) + +#import "@preview/cades:0.3.0": qr-code + +#let item(itemname, itemslug, usage) = [ + #grid( + columns: 1, + // 9pt for the bottom row to make its content fit on the page. + rows: (1fr, 9pt), + gutter: 2mm, + [ + #grid( + columns: (1fr, auto), + rows: 1, + gutter: 2mm, + [ + == #itemname + + === Usage + #usage + ], + [ + #qr-code("https://wiki.hamburg.ccc.de/item:" + itemslug) + ] + ) + ], + [ + #grid( + columns: (1fr, auto), + rows: 1, + gutter: 2mm, + [ + #set text(size: 8pt) + #set align(start + bottom) + wiki.hamburg.ccc.de/item:#itemslug + ], + [ + #set align(end + bottom) + // For a 9pt ccchh.svg with padding, 6.84pt is roughly the size of the + // actual logo. + #image("assets/ccchh-no-padding.svg", height: 6.84pt, alt: "CCCHH") + ], + ) + ] + ) +] + +#item( + "Prusa i3 MK3S", + "prusa-i3", + // "Introduction required" + "See instructions (in the Wiki)" + // "Freely" +)