diff --git a/admin-dashboard.html b/admin-dashboard.html index f701ab3..b2b8140 100644 --- a/admin-dashboard.html +++ b/admin-dashboard.html @@ -1900,22 +1900,6 @@ function updateBannerPreview() { `; } - // Create text content with template styles - const textStyle = ` - font-size: ${document.getElementById('bannerFontSize')?.value || '16'}px; - color: ${document.getElementById('bannerTextColor')?.value || '#000'}; - text-align: ${document.getElementById('bannerTextAlign')?.value || 'left'}; - margin: 0; - padding: 10px 0; - line-height: 1.5; - ${template?.textStyle || ''} - `; - - const textElement = ` -
`; - // Get all styles from template or use defaults const styles = { // Background styles @@ -1937,6 +1921,23 @@ function updateBannerPreview() { containerStyle: template.containerStyle || '' }; + // Create text content with template styles + const textStyle = ` + font-size: ${document.getElementById('bannerFontSize')?.value || '16'}px; + color: ${document.getElementById('bannerTextColor')?.value || '#000'}; + text-align: ${document.getElementById('bannerTextAlign')?.value || 'left'}; + margin: 0; + padding: 10px 0; + line-height: 1.5; + ${template?.textStyle || ''} + `; + + // Create a single text element + const textElement = ` + `; + // Special handling for specific templates if (currentTemplate === 'dark') { styles.background = '#2d3748'; @@ -1973,18 +1974,22 @@ function updateBannerPreview() { margin: 0 auto; "> ${imagePosition === 'left' || imagePosition === 'top' ? imgContainer : ''} -