mirror of
https://github.com/Dvorinka/PPve.git
synced 2026-06-04 12:32:59 +00:00
rr
This commit is contained in:
+18
-8
@@ -168,7 +168,7 @@
|
|||||||
text-align: ${textAlign};
|
text-align: ${textAlign};
|
||||||
font-size: ${fontSize};
|
font-size: ${fontSize};
|
||||||
">
|
">
|
||||||
${bannerLink ? `<a href="${bannerLink}" target="_blank" style="color: inherit; text-decoration: none;">${bannerText.replace(/\n/g, '<br>')}</a>` : bannerText.replace(/\n/g, '<br>')}
|
${bannerText.replace(/\n/g, '<br>')}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
@@ -190,7 +190,7 @@
|
|||||||
font-size: ${fontSize};
|
font-size: ${fontSize};
|
||||||
display: block;
|
display: block;
|
||||||
">
|
">
|
||||||
${bannerLink ? `<a href="${bannerLink}" target="_blank" style="color: inherit; text-decoration: none;">${bannerText.replace(/\n/g, '<br>')}</a>` : bannerText.replace(/\n/g, '<br>')}
|
${bannerText.replace(/\n/g, '<br>')}
|
||||||
</div>`;
|
</div>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,10 +215,8 @@
|
|||||||
font-size: ${fontSize};
|
font-size: ${fontSize};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
// Wrap text in link if URL is provided
|
// Just use the text, link will be applied to the whole banner
|
||||||
const textElement = bannerLink
|
const textElement = bannerText;
|
||||||
? `<a href="${bannerLink}" target="_blank" style="color: inherit; text-decoration: none;">${bannerText}</a>`
|
|
||||||
: bannerText;
|
|
||||||
|
|
||||||
content += `
|
content += `
|
||||||
<div class="banner-text" style="${textStyle}">
|
<div class="banner-text" style="${textStyle}">
|
||||||
@@ -229,8 +227,20 @@
|
|||||||
|
|
||||||
// Text is already added in the previous conditions
|
// Text is already added in the previous conditions
|
||||||
|
|
||||||
// Set the content and make banner visible
|
// Wrap the entire content in a link if bannerLink exists
|
||||||
bannerContent.innerHTML = content;
|
if (bannerLink) {
|
||||||
|
bannerContent.innerHTML = `
|
||||||
|
<a href="${bannerLink}" target="_blank" style="
|
||||||
|
display: block;
|
||||||
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
|
">
|
||||||
|
${content}
|
||||||
|
</a>
|
||||||
|
`;
|
||||||
|
} else {
|
||||||
|
bannerContent.innerHTML = content;
|
||||||
|
}
|
||||||
|
|
||||||
// Log the content for debugging
|
// Log the content for debugging
|
||||||
console.log('Banner content:', content);
|
console.log('Banner content:', content);
|
||||||
|
|||||||
Reference in New Issue
Block a user