This commit is contained in:
Tomas Dvorak
2025-05-29 10:55:03 +02:00
parent 6f03f65e29
commit e9b5c35bcc
+1 -21
View File
@@ -227,27 +227,7 @@
} }
} }
// Add text if it exists // Text is already added in the previous conditions
if (bannerText) {
const textStyle = `
margin: 0;
padding: 10px;
line-height: 1.6;
color: ${textColor};
text-align: ${textAlign};
font-size: ${fontSize};
`;
// Wrap text in link if URL is provided
const textElement = bannerLink
? `<a href="${bannerLink}" target="_blank" style="color: inherit; text-decoration: none;">${bannerText}</a>`
: bannerText;
content += `
<div class="banner-text" style="${textStyle}">
${textElement}
</div>`;
}
// Set the content and make banner visible // Set the content and make banner visible
bannerContent.innerHTML = content; bannerContent.innerHTML = content;