`;
// Wrap image with link if URL is provided
- if (banner.link) {
+ if (banner.Link) {
imgContainer = `
-
`;
}
- // Create text content with styles
- const textStyle = `
- font-size: ${banner.style.fontSize || '16px'};
- color: ${banner.style.textColor || '#000'};
- text-align: ${banner.style.textAlign || 'left'};
- margin: 0;
- padding: 10px 0;
- line-height: 1.5;
- `;
+ // Add image to content based on position
+ if (['left', 'top'].includes(imagePosition)) {
+ content += imgContainer;
+ }
- const textElement = `
-
`;
+ // Add text content
+ if (banner.Text) {
+ content += `
+
`;
+ }
- // Create container with proper layout
- content = `
-
- ${imagePosition === 'left' || imagePosition === 'top' ? imgContainer : ''}
-
- ${textElement}
-
- ${imagePosition === 'right' || imagePosition === 'bottom' ? imgContainer : ''}
-
`;
+ // Add image if position is right or bottom
+ if (['right', 'bottom'].includes(imagePosition)) {
+ content += imgContainer;
+ }
} else {
// No image, just show text
- content = `
-
+ if (banner.Text) {
+ content += `
- ${banner.text || 'Žádný text banneru'}
-
-