mirror of
https://github.com/Dvorinka/PPve.git
synced 2026-06-04 20:42:59 +00:00
ff
This commit is contained in:
@@ -1921,7 +1921,7 @@ function updateBannerPreview() {
|
|||||||
containerStyle: template.containerStyle || ''
|
containerStyle: template.containerStyle || ''
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create text content with template styles
|
// Create text content with template styles - only create the text element once
|
||||||
const textStyle = `
|
const textStyle = `
|
||||||
font-size: ${document.getElementById('bannerFontSize')?.value || '16'}px;
|
font-size: ${document.getElementById('bannerFontSize')?.value || '16'}px;
|
||||||
color: ${document.getElementById('bannerTextColor')?.value || '#000'};
|
color: ${document.getElementById('bannerTextColor')?.value || '#000'};
|
||||||
@@ -1932,11 +1932,14 @@ function updateBannerPreview() {
|
|||||||
${template?.textStyle || ''}
|
${template?.textStyle || ''}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
// Create a single text element
|
// Create the text element content
|
||||||
const textElement = `
|
const textContent = `
|
||||||
<div class="banner-text" style="${textStyle}">
|
<div class="banner-text" style="${textStyle}">
|
||||||
${bannerTextContent}
|
${bannerTextContent}
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
|
// Set the text element variable that will be used in the banner content
|
||||||
|
const textElement = textContent;
|
||||||
|
|
||||||
// Special handling for specific templates
|
// Special handling for specific templates
|
||||||
if (currentTemplate === 'dark') {
|
if (currentTemplate === 'dark') {
|
||||||
|
|||||||
Reference in New Issue
Block a user