From b76bd146e7b45b84973c68769b1e8a51aa4679ba Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Sat, 20 Jan 2024 18:56:02 +0000 Subject: [PATCH] more renaming --- cards_4x6.typ | 7 +------ cards_stamped_card.typ | 7 +------ common.typ | 4 ++-- stickers_usletter.typ => stickers_4x6_usletter.typ | 2 +- stickers_a6_usletter.typ | 2 +- stickers_small_usletter.typ | 2 +- 6 files changed, 7 insertions(+), 17 deletions(-) rename stickers_usletter.typ => stickers_4x6_usletter.typ (75%) diff --git a/cards_4x6.typ b/cards_4x6.typ index de5d183..e11cb13 100644 --- a/cards_4x6.typ +++ b/cards_4x6.typ @@ -7,12 +7,7 @@ let cards = options.cards let args = options.args - let content_fn = if args.no_content { - _ => [] - } else { - import "cache/content/content.typ" - content.content - } + let content_fn = common.get_content_fn(args) for (idx, card) in cards.enumerate() { if idx != 0 { diff --git a/cards_stamped_card.typ b/cards_stamped_card.typ index 4c1d83f..9eb1464 100644 --- a/cards_stamped_card.typ +++ b/cards_stamped_card.typ @@ -7,12 +7,7 @@ let cards = options.cards let args = options.args - let content_fn = if args.no_content { - _ => [] - } else { - import "cache/content/content.typ" - content.content - } + let content_fn = common.get_content_fn(args) for (idx, card) in cards.enumerate() { if idx != 0 { diff --git a/common.typ b/common.typ index 22b011b..290918b 100644 --- a/common.typ +++ b/common.typ @@ -123,8 +123,8 @@ } } -#let card_sheets(width, height, margin, args, cards) = { - let content_fn = get_content_fn() +#let sticker_sheets(width, height, margin, args, cards) = { + let content_fn = get_content_fn(args) for (idx, card) in cards.enumerate() { let row = calc.rem(idx + args.skip, 2) diff --git a/stickers_usletter.typ b/stickers_4x6_usletter.typ similarity index 75% rename from stickers_usletter.typ rename to stickers_4x6_usletter.typ index da0e78f..e98fbd3 100644 --- a/stickers_usletter.typ +++ b/stickers_4x6_usletter.typ @@ -7,6 +7,6 @@ let cards = options.cards let args = options.args - common.card_sheets(6in, 4in, 1in/16, args, cards) + common.sticker_sheets(6in, 4in, 1in/16, args, cards) } diff --git a/stickers_a6_usletter.typ b/stickers_a6_usletter.typ index 0a4608c..81307ba 100644 --- a/stickers_a6_usletter.typ +++ b/stickers_a6_usletter.typ @@ -7,6 +7,6 @@ let cards = options.cards let args = options.args - common.card_sheets(148mm, 105mm, 1in/16, args, cards) + common.sticker_sheets(148mm, 105mm, 1in/16, args, cards) } diff --git a/stickers_small_usletter.typ b/stickers_small_usletter.typ index 4586356..3f28be6 100644 --- a/stickers_small_usletter.typ +++ b/stickers_small_usletter.typ @@ -7,6 +7,6 @@ let cards = options.cards let args = options.args - common.card_sheets(149mm, 99mm, 1in/16, args, cards) + common.sticker_sheets(149mm, 99mm, 1in/16, args, cards) }