fix(promo-banner): center by default + admin alignment selector (#482)
The gallery promotional banner (#440) read as visually offset from the gallery footer because: - Footer used `container text-center px-4` (full container width, centered text). - Promo block used `container py-4 sm:py-6` with an inner `max-w-3xl mx-auto` wrapper holding left-aligned text — a narrower column with left-aligned content sitting in the middle of the page. Two issues compounded: the column was narrower than the footer AND its text alignment differed. Reported by Rekoo-PS in #482 with a screenshot showing the misalignment, with a request for an admin alignment option. Fix: - Drop the inner max-w-3xl wrapper. Promo content now spans the same .container width as the footer, eliminating the narrower-column visual. - Default text alignment changed from left → center to match the footer. - New `branding_promo_alignment` setting ('left' | 'center' | 'right', default 'center'). Surfaced as a dropdown next to the existing Position dropdown on the BrandingPage. Live preview block on the BrandingPage mirrors the gallery render so admins see what guests will see. - Also replaced the no-op `prose-sm` prose-modifier with a real `prose prose-sm` outer class so the existing `prose-a:text-accent` modifier actually takes effect (it didn't before — modifiers without an outer .prose are silently ignored by Tailwind Typography). Migration 103 seeds the new setting at 'center' so existing installs that have a promo banner today see the corrected alignment immediately on next deploy. i18n: en + de hand-translated; nl/pt/ru/fr machine-translated and flagged for native review per project convention.
This commit is contained in:
@@ -39,6 +39,9 @@ export interface PublicSettings {
|
||||
branding_youtube_url?: string;
|
||||
branding_promo_markdown?: string;
|
||||
branding_promo_position?: 'above_footer' | 'below_footer';
|
||||
// Per-install promo banner alignment (#482). Defaults to 'center'
|
||||
// so the banner aligns with the gallery footer's centering.
|
||||
branding_promo_alignment?: 'left' | 'center' | 'right';
|
||||
theme_config: any;
|
||||
default_language: string;
|
||||
enable_analytics: boolean;
|
||||
|
||||
@@ -42,6 +42,9 @@ export interface BrandingSettings {
|
||||
youtube_url?: string;
|
||||
promo_markdown?: string;
|
||||
promo_position?: 'above_footer' | 'below_footer';
|
||||
// Per-install promo banner alignment (#482). Defaults to center
|
||||
// so the banner aligns with the gallery footer.
|
||||
promo_alignment?: 'left' | 'center' | 'right';
|
||||
}
|
||||
|
||||
export interface ThemeSettings {
|
||||
@@ -336,7 +339,10 @@ export const settingsService = {
|
||||
twitter_url: rawSettings.branding_twitter_url || '',
|
||||
youtube_url: rawSettings.branding_youtube_url || '',
|
||||
promo_markdown: rawSettings.branding_promo_markdown || '',
|
||||
promo_position: rawSettings.branding_promo_position === 'below_footer' ? 'below_footer' : 'above_footer'
|
||||
promo_position: rawSettings.branding_promo_position === 'below_footer' ? 'below_footer' : 'above_footer',
|
||||
promo_alignment: ['left', 'center', 'right'].includes(rawSettings.branding_promo_alignment)
|
||||
? rawSettings.branding_promo_alignment
|
||||
: 'center'
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user