+
{#if display_name}
- {@html display_name.trim()}
+ {display_name.trim()}
{:else}
-- no name --
{/if}
-
+
{#if display_title}
@@ -476,7 +501,7 @@
max={38}
manual_size={font_size_title ?? null}
height={fit_heights.title}
- class="professional_title italic hover:bg-pink-100/50"
+ class="professional_title italic hover:bg-pink-100/50 leading-none"
>
{@html display_title}
@@ -508,7 +533,7 @@
max={40}
manual_size={font_size_affiliations ?? null}
height={fit_heights.affiliations}
- class="affiliations hover:bg-pink-100/50"
+ class="affiliations hover:bg-pink-100/50 leading-none"
>
{@html display_affiliations}
@@ -524,7 +549,7 @@
max={34}
manual_size={font_size_location ?? null}
height={fit_heights.location}
- class="location hover:bg-pink-100/50"
+ class="location hover:bg-pink-100/50 leading-none"
>
{@html display_location}
@@ -974,6 +999,7 @@
.badge_front,
.badge_back {
outline: none !important;
+ box-shadow: none !important;
}
}
@@ -981,8 +1007,37 @@
.badge_back {
background-color: white;
color: #1a1a1a;
+ /*
+ * Standard badge/card corner radius: 3.18mm = 1/8 inch = ~12px at 96dpi.
+ * Matches the physical die-cut corners of the printed card stock.
+ */
+ border-radius: 12px;
+ /*
+ * Layered card shadow: gives each badge face a strong physical-card feel on screen.
+ * Three layers: crisp base edge → medium spread → wide ambient — creates
+ * convincing depth without looking like a UI box-shadow.
+ * Suppressed on print — no decoration on the physical output.
+ */
+ box-shadow:
+ 0 1px 3px rgba(0, 0, 0, 0.20),
+ 0 6px 20px rgba(0, 0, 0, 0.14),
+ 0 16px 48px rgba(0, 0, 0, 0.08);
}
+ /*
+ * Two-line name padding: applied to the Element_fit_text wrapper div (not the inner span).
+ * Squeezes the available text width so CSS word-wrap breaks the name at its natural space
+ * — no hard
needed. Padding on the block div also ensures text-align:center works
+ * correctly for all wrapped lines (inline-element padding breaks centering on each line).
+ * Short names (≤12 chars, e.g. "Scott Idem") need heavy padding to force the break.
+ * Progressively less padding as names get longer; very long names wrap on their own.
+ * Percentages are relative to the Element_fit_text div width, so the effect scales
+ * correctly regardless of badge template or font size.
+ */
+ .name_pad_short { padding-left: 18%; padding-right: 18%; }
+ .name_pad_mid { padding-left: 8%; padding-right: 8%; }
+ .name_pad_long { padding-left: 2%; padding-right: 2%; }
+
/*
* Header image: center horizontally within the badge.
*
defaults to display:inline, which left-aligns any image narrower than
diff --git a/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_print_controls.svelte b/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_print_controls.svelte
index 26d716fb..410dca67 100644
--- a/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_print_controls.svelte
+++ b/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_print_controls.svelte
@@ -60,6 +60,8 @@
* Stored in localStorage.
*/
banner_full_width?: boolean;
+ /** When true (default), name uses padding to prefer two-line layout. Stored in localStorage. */
+ name_two_lines?: boolean;
log_lvl?: number;
}
@@ -77,6 +79,7 @@
print_offset_y = $bindable(0),
hide_chrome = $bindable(false),
banner_full_width = $bindable(true),
+ name_two_lines = $bindable(true),
log_lvl = 0
}: Props = $props();
@@ -929,6 +932,18 @@
+
+
+
+
+
@@ -403,6 +409,7 @@
bind:print_offset_y
bind:hide_chrome
bind:banner_full_width
+ bind:name_two_lines
/>
diff --git a/static/ae-print-badge.css b/static/ae-print-badge.css
index 05ed6c92..9a6a84a9 100644
--- a/static/ae-print-badge.css
+++ b/static/ae-print-badge.css
@@ -107,9 +107,10 @@
outline: 3px dashed purple !important;
outline-offset: -12px !important;
}
- /* Cyan = the actual badge — should be dead-center on page */
+ /* Red = the actual badge — should be dead-center on page.
+ Thick + high-contrast so misalignment vs. physical card stock is obvious. */
html.debug_outlines .event_badge_wrapper {
- outline: 3px solid cyan !important;
- outline-offset: 2px !important;
+ outline: 6px solid red !important;
+ outline-offset: 3px !important;
}
}
diff --git a/static/badge_header_calibration.svg b/static/badge_header_calibration.svg
index 5c5e25e5..ac795a20 100644
--- a/static/badge_header_calibration.svg
+++ b/static/badge_header_calibration.svg
@@ -1,6 +1,168 @@