feat(badges): configurable header image vertical offset per template

Adds cfg_json.header_margin_top to BadgeTemplateCfg. Badge view replaces
hardcoded mt-8 (2rem) with this value; falls back to 2rem when unset.
Template form exposes the field in the Header & Branding section.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-06-04 19:00:21 -04:00
parent 94a3cb0644
commit f5ccd2e3cf
3 changed files with 35 additions and 2 deletions

View File

@@ -36,6 +36,13 @@ export interface BadgeTemplateCfg {
// Leave unset (or "0") for no bleed.
bleed?: string;
// Header image vertical offset. CSS length applied as margin-top on the badge_header div.
// Default (unset) = "2rem" (matches the prior hardcoded mt-8).
// Negative values shift the image toward the top edge; larger values push it down.
// Useful when a background image's designed zone doesn't align with the default position.
// Any CSS length works: "-0.5in", "1rem", "8px".
header_margin_top?: string;
// Allow arbitrary extra keys to preserve forward-compatibility.
[key: string]: any;
}