From bdf382b218ff199f4805013f6eeb37368b2ad9bd Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Thu, 29 May 2025 08:48:56 +0200 Subject: [PATCH] dd --- admin-dashboard.html | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/admin-dashboard.html b/admin-dashboard.html index 66d281b..ee1244b 100644 --- a/admin-dashboard.html +++ b/admin-dashboard.html @@ -1016,6 +1016,19 @@ function updateBannerPreview() { } } +// Initialize template object if not exists +let template = { + containerStyle: '', + textStyle: '', + bgColor: '#f8f9fa', + textColor: '#212529', + textAlign: 'left', + fontSize: 16, + padding: 20, + margin: 20, + borderRadius: 8 +}; + // Initialize when DOM is loaded document.addEventListener('DOMContentLoaded', () => { // Initialize banner preview elements @@ -1793,7 +1806,7 @@ function updateBannerPreview() { margin: 0; padding: 10px 0; line-height: 1.5; - ${template.textStyle || ''} + ${template?.textStyle || ''} `; const textElement = ` @@ -1804,7 +1817,7 @@ function updateBannerPreview() { // Create container with proper layout bannerContent = `