mirror of
https://github.com/Dvorinka/PPve.git
synced 2026-06-04 12:32:59 +00:00
sdd
This commit is contained in:
@@ -981,7 +981,7 @@ const bannerText = document.getElementById('bannerText');
|
|||||||
let bannerVisible, bannerBgColor, bannerTextColor, bannerTextAlign, bannerFontSize,
|
let bannerVisible, bannerBgColor, bannerTextColor, bannerTextAlign, bannerFontSize,
|
||||||
bannerPadding, bannerMargin, bannerBorderRadius, bannerPreview, bannerPreviewContent,
|
bannerPadding, bannerMargin, bannerBorderRadius, bannerPreview, bannerPreviewContent,
|
||||||
bannerPreviewText, bannerPreviewBg, bgColorPreview, textColorPreview, saveBannerBtn,
|
bannerPreviewText, bannerPreviewBg, bgColorPreview, textColorPreview, saveBannerBtn,
|
||||||
stylePresets, currentImage = null;
|
stylePresets, currentImage = null, currentTemplate = 'modern-minimal';
|
||||||
|
|
||||||
// Preset styles
|
// Preset styles
|
||||||
const presets = {
|
const presets = {
|
||||||
@@ -1464,7 +1464,7 @@ function updateBannerPreview() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Apply template styles to the banner preview
|
// Apply template styles to the banner preview
|
||||||
if (template) {
|
if (template && bannerPreview) {
|
||||||
Object.assign(bannerPreview.style, {
|
Object.assign(bannerPreview.style, {
|
||||||
backgroundColor: template.bgColor || '#f8f9fa',
|
backgroundColor: template.bgColor || '#f8f9fa',
|
||||||
color: template.textColor || '#212529',
|
color: template.textColor || '#212529',
|
||||||
@@ -1978,13 +1978,10 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
bannerVisible.addEventListener('change', updateBannerPreview);
|
bannerVisible.addEventListener('change', updateBannerPreview);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize with default template if no template is selected
|
// Initialize with default template
|
||||||
if (!currentTemplate) {
|
const defaultTemplate = document.querySelector(`[data-template="${currentTemplate}"]`);
|
||||||
currentTemplate = 'modern-minimal';
|
if (defaultTemplate) {
|
||||||
const defaultTemplate = document.querySelector(`[data-template="${currentTemplate}"]`);
|
defaultTemplate.classList.add('active');
|
||||||
if (defaultTemplate) {
|
|
||||||
defaultTemplate.classList.add('active');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initial preview update
|
// Initial preview update
|
||||||
|
|||||||
Reference in New Issue
Block a user