From 3d7279da4c2dcca836886f946354fad6cc610927 Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Fri, 27 Feb 2026 18:49:58 -0500 Subject: [PATCH] feat(badges): add print font size controls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add optional font_size_{name,title,affiliations,location} px props to ae_comp__badge_obj_view; when set, replaces auto inch-based sizing with an inline style so the caller controls the value - Add screen-only (print:hidden) font size control panel to print page: four [−] [value] [+] [↺] rows, step 2px, null = auto (default) First + click activates at a sensible default that approximates the auto-sized inch values; ↺ button resets back to auto mode Co-Authored-By: Claude Sonnet 4.6 --- .../[badge_id]/ae_comp__badge_obj_view.svelte | 24 +++- .../badges/[badge_id]/print/+page.svelte | 114 ++++++++++++++++++ 2 files changed, 134 insertions(+), 4 deletions(-) diff --git a/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_obj_view.svelte b/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_obj_view.svelte index e1649c8a..d990b518 100644 --- a/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_obj_view.svelte +++ b/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_obj_view.svelte @@ -7,6 +7,14 @@ update_status?: string; update_complete?: boolean; is_review_mode?: boolean; + /** Optional px override for name font size. When provided, replaces auto-sizing. */ + font_size_name?: number; + /** Optional px override for professional title font size. */ + font_size_title?: number; + /** Optional px override for affiliations font size. */ + font_size_affiliations?: number; + /** Optional px override for location font size. */ + font_size_location?: number; log_lvl?: number; } @@ -18,6 +26,10 @@ update_status = $bindable('idle'), update_complete = $bindable(true), is_review_mode = false, + font_size_name = undefined, + font_size_title = undefined, + font_size_affiliations = undefined, + font_size_location = undefined, log_lvl = 0 }: Props = $props(); @@ -803,7 +815,8 @@ onkeypress={() => {
+
+ Font Size: + + +
+ Name + + {font_size_name !== null ? `${font_size_name}px` : 'Auto'} + + {#if font_size_name !== null} + + {/if} +
+ + +
+ Title + + {font_size_title !== null ? `${font_size_title}px` : 'Auto'} + + {#if font_size_title !== null} + + {/if} +
+ + +
+ Affil. + + {font_size_affiliations !== null ? `${font_size_affiliations}px` : 'Auto'} + + {#if font_size_affiliations !== null} + + {/if} +
+ + +
+ Location + + {font_size_location !== null ? `${font_size_location}px` : 'Auto'} + + {#if font_size_location !== null} + + {/if} +
+
+ {:else if is_loading_idb || !event_badge_id}