Update index.html
Browse files- index.html +34 -209
index.html
CHANGED
|
@@ -266,10 +266,8 @@
|
|
| 266 |
<button class="control-nav-button" data-target="#panel-global-settings"><i class="fas fa-cog"></i>Global</button>
|
| 267 |
<button class="control-nav-button" data-target="#panel-layout"><i class="fas fa-layer-group"></i>Layout</button>
|
| 268 |
<button class="control-nav-button" data-target="#panel-topbar"><i class="fas fa-window-minimize fa-rotate-180"></i>Top Bar</button>
|
| 269 |
-
<button class="control-nav-button" data-target="#panel-ticker"><i class="fas fa-tags"></i>Product Ticker</button>
|
| 270 |
<button class="control-nav-button" data-target="#panel-lms-header"><i class="fas fa-graduation-cap"></i>LMS Header</button>
|
| 271 |
<button class="control-nav-button" data-target="#panel-lms-sidebar"><i class="fas fa-columns"></i>LMS Sidebar</button>
|
| 272 |
-
<button class="control-nav-button" data-target="#panel-custom-html"><i class="fas fa-code"></i>Custom HTML</button>
|
| 273 |
<button class="control-nav-button" data-target="#panel-footer"><i class="fas fa-shoe-prints"></i>Footer</button>
|
| 274 |
<button class="control-nav-button" data-target="#panel-mobile-footer"><i class="fas fa-mobile-alt"></i>Mobile Footer</button>
|
| 275 |
</nav>
|
|
@@ -373,27 +371,6 @@
|
|
| 373 |
</div>
|
| 374 |
</div>
|
| 375 |
|
| 376 |
-
<div id="panel-ticker" class="control-panel">
|
| 377 |
-
<h3>🛍️ Product Ticker</h3>
|
| 378 |
-
<div class="space-y-4">
|
| 379 |
-
<div class="flex justify-between items-center mb-6">
|
| 380 |
-
<h3 class="mb-0 pb-0 border-b-0"></h3>
|
| 381 |
-
<button class="get-component-code-btn text-sm bg-indigo-500 text-white py-1 px-3 rounded-md hover:bg-indigo-600" data-component-key="ticker">
|
| 382 |
-
<i class="fas fa-code mr-1"></i> Get Code
|
| 383 |
-
</button>
|
| 384 |
-
</div>
|
| 385 |
-
<div class="flex items-center space-x-2 border-b pb-4">
|
| 386 |
-
<input type="checkbox" id="ticker-toggle" class="h-4 w-4 rounded">
|
| 387 |
-
<label for="ticker-toggle">Enable Product Ticker</label>
|
| 388 |
-
</div>
|
| 389 |
-
<div id="ticker-product-builder" class="space-y-3 pt-2">
|
| 390 |
-
<label class="font-medium text-sm">Ticker Products</label>
|
| 391 |
-
<div id="ticker-products-container" class="space-y-2"></div>
|
| 392 |
-
<button id="add-ticker-product-btn" class="text-sm bg-blue-500 text-white py-1 px-3 rounded-md hover:bg-blue-600">+ Add Product</button>
|
| 393 |
-
</div>
|
| 394 |
-
</div>
|
| 395 |
-
</div>
|
| 396 |
-
|
| 397 |
<div id="panel-lms-header" class="control-panel">
|
| 398 |
<div class="flex justify-between items-center mb-6">
|
| 399 |
<h3 class="mb-0 pb-0 border-b-0">📚 Learning App Header</h3>
|
|
@@ -519,26 +496,6 @@
|
|
| 519 |
</div>
|
| 520 |
</div>
|
| 521 |
|
| 522 |
-
<div id="panel-custom-html" class="control-panel">
|
| 523 |
-
<div class="flex justify-between items-center mb-6">
|
| 524 |
-
<h3 class="mb-0 pb-0 border-b-0"> </> Custom HTML</h3>
|
| 525 |
-
<button class="get-component-code-btn text-sm bg-indigo-500 text-white py-1 px-3 rounded-md hover:bg-indigo-600" data-component-key="customHtml">
|
| 526 |
-
<i class="fas fa-code mr-1"></i> Get Code
|
| 527 |
-
</button>
|
| 528 |
-
</div>
|
| 529 |
-
<div class="space-y-4">
|
| 530 |
-
<div class="flex items-center space-x-2 border-b pb-4">
|
| 531 |
-
<input type="checkbox" id="custom-html-toggle" class="h-4 w-4 rounded">
|
| 532 |
-
<label for="custom-html-toggle" class="font-medium">Enable Custom HTML Section</label>
|
| 533 |
-
</div>
|
| 534 |
-
<div id="custom-html-builder">
|
| 535 |
-
<label for="custom-html-content" class="text-sm font-medium">HTML Content</label>
|
| 536 |
-
<p class="text-xs text-gray-500 mb-2">Paste any valid HTML. Be cautious, as invalid code can break the page layout.</p>
|
| 537 |
-
<textarea id="custom-html-content" rows="10" class="w-full p-2 border rounded-md font-mono text-sm"></textarea>
|
| 538 |
-
</div>
|
| 539 |
-
</div>
|
| 540 |
-
</div>
|
| 541 |
-
|
| 542 |
<div id="panel-footer" class="control-panel">
|
| 543 |
<div class="flex justify-between items-center mb-6">
|
| 544 |
<h3 class="mb-0 pb-0 border-b-0">📑 Footer Settings</h3>
|
|
@@ -548,10 +505,7 @@
|
|
| 548 |
</div>
|
| 549 |
<div class="space-y-4">
|
| 550 |
<div class="space-y-2 border-b pb-4">
|
| 551 |
-
<
|
| 552 |
-
<input type="checkbox" id="footer-about-toggle" class="h-4 w-4 rounded" checked>
|
| 553 |
-
<label for="footer-about-toggle" class="font-medium text-sm">"About Platform" Widget</label>
|
| 554 |
-
</div>
|
| 555 |
<div class="flex items-center space-x-2 pl-4">
|
| 556 |
<input type="checkbox" id="footer-about-logo-toggle" class="h-4 w-4 rounded" checked>
|
| 557 |
<label for="footer-about-logo-toggle" class="text-sm">Show Logo</label>
|
|
@@ -573,10 +527,7 @@
|
|
| 573 |
</div>
|
| 574 |
|
| 575 |
<div class="space-y-2 border-b pb-4">
|
| 576 |
-
<
|
| 577 |
-
<input type="checkbox" id="footer-contact-toggle" class="h-4 w-4 rounded" checked>
|
| 578 |
-
<label for="footer-contact-toggle" class="font-medium text-sm">Contact Info Widget</label>
|
| 579 |
-
</div>
|
| 580 |
<div>
|
| 581 |
<label for="footer-contact-email" class="text-xs">Email</label>
|
| 582 |
<input type="email" id="footer-contact-email" class="w-full p-1 border rounded-md text-sm">
|
|
@@ -596,44 +547,26 @@
|
|
| 596 |
</div>
|
| 597 |
|
| 598 |
<div id="footer-socials-builder" class="space-y-3 border-b pb-4">
|
| 599 |
-
<
|
| 600 |
-
<input type="checkbox" id="footer-social-toggle" class="h-4 w-4 rounded" checked>
|
| 601 |
-
<label for="footer-social-toggle" class="font-medium text-sm">Social Media Links</label>
|
| 602 |
-
</div>
|
| 603 |
<div id="footer-socials-container" class="space-y-2"></div>
|
| 604 |
<button id="add-footer-social-btn" class="text-sm bg-blue-500 text-white py-1 px-3 rounded-md hover:bg-blue-600">+ Add Social Link</button>
|
| 605 |
</div>
|
| 606 |
|
| 607 |
<div class="space-y-2 border-b pb-4">
|
| 608 |
-
<
|
| 609 |
-
<
|
| 610 |
-
|
| 611 |
-
<label for="footer-newsletter-toggle">Newsletter Signup</label>
|
| 612 |
-
</div>
|
| 613 |
-
<div class="flex items-center space-x-2">
|
| 614 |
-
<input type="checkbox" id="footer-apps-toggle" class="h-4 w-4 rounded">
|
| 615 |
-
<label for="footer-apps-toggle">Mobile App Buttons</label>
|
| 616 |
-
</div>
|
| 617 |
<div class="pl-6 space-y-1">
|
| 618 |
<input type="text" id="footer-apps-playstore" class="w-full p-1 border rounded-md text-sm" placeholder="Google Play Store URL">
|
| 619 |
<input type="text" id="footer-apps-appstore" class="w-full p-1 border rounded-md text-sm" placeholder="Apple App Store URL">
|
| 620 |
</div>
|
| 621 |
-
<
|
| 622 |
-
<input type="checkbox" id="footer-payments-toggle" class="h-4 w-4 rounded">
|
| 623 |
-
<label for="footer-payments-toggle">Payment Method Icons</label>
|
| 624 |
-
</div>
|
| 625 |
</div>
|
| 626 |
|
| 627 |
<div class="space-y-2">
|
| 628 |
-
<
|
| 629 |
-
<
|
| 630 |
-
|
| 631 |
-
<label for="footer-copyright-toggle">Copyright Text</label>
|
| 632 |
-
</div>
|
| 633 |
-
<div class="flex items-center space-x-2">
|
| 634 |
-
<input type="checkbox" id="footer-back-to-top-toggle" class="h-4 w-4 rounded" checked>
|
| 635 |
-
<label for="footer-back-to-top-toggle">"Back to Top" Button</label>
|
| 636 |
-
</div>
|
| 637 |
<div id="footer-legal-links-builder">
|
| 638 |
<label class="text-xs font-medium">Legal Links</label>
|
| 639 |
<div id="footer-legal-links-container" class="space-y-2 mt-1"></div>
|
|
@@ -652,19 +585,13 @@
|
|
| 652 |
</div>
|
| 653 |
<div class="space-y-4">
|
| 654 |
<div id="mobile-nav-builder" class="space-y-3 border-b pb-4">
|
| 655 |
-
<
|
| 656 |
-
<input type="checkbox" id="mobile-nav-toggle" class="h-4 w-4 rounded" checked>
|
| 657 |
-
<label for="mobile-nav-toggle" class="font-medium text-sm">Enable Bottom Navigation Bar</label>
|
| 658 |
-
</div>
|
| 659 |
<div id="mobile-nav-items-container" class="space-y-2"></div>
|
| 660 |
<button id="add-mobile-nav-item-btn" class="text-sm bg-blue-500 text-white py-1 px-3 rounded-md hover:bg-blue-600">+ Add Nav Item</button>
|
| 661 |
</div>
|
| 662 |
|
| 663 |
<div class="space-y-2 border-b pb-4">
|
| 664 |
-
<
|
| 665 |
-
<input type="checkbox" id="mobile-cta-toggle" class="h-4 w-4 rounded">
|
| 666 |
-
<label for="mobile-cta-toggle" class="font-medium text-sm">Enable Conditional CTA Footer</label>
|
| 667 |
-
</div>
|
| 668 |
<div class="space-y-2 pl-4">
|
| 669 |
<div>
|
| 670 |
<label for="mobile-cta-text" class="text-xs">CTA Text</label>
|
|
@@ -678,10 +605,7 @@
|
|
| 678 |
</div>
|
| 679 |
|
| 680 |
<div id="mobile-support-builder" class="space-y-3">
|
| 681 |
-
<
|
| 682 |
-
<input type="checkbox" id="mobile-support-toggle" class="h-4 w-4 rounded">
|
| 683 |
-
<label for="mobile-support-toggle" class="font-medium text-sm">Enable Support & Feedback Links</label>
|
| 684 |
-
</div>
|
| 685 |
<div id="mobile-support-links-container" class="space-y-2"></div>
|
| 686 |
<button id="add-mobile-support-link-btn" class="text-sm bg-blue-500 text-white py-1 px-3 rounded-md hover:bg-blue-600">+ Add Support Link</button>
|
| 687 |
</div>
|
|
@@ -752,15 +676,9 @@
|
|
| 752 |
},
|
| 753 |
componentOrder: [
|
| 754 |
'topBar',
|
| 755 |
-
'ticker',
|
| 756 |
'lmsHeader',
|
| 757 |
-
'customHtml',
|
| 758 |
'footer',
|
| 759 |
],
|
| 760 |
-
customHtml: {
|
| 761 |
-
enabled: false,
|
| 762 |
-
content: '<h2>Custom HTML Content</h2><p>This is a placeholder for your own HTML code.</p>'
|
| 763 |
-
},
|
| 764 |
learningAppHeader: {
|
| 765 |
sticky: false,
|
| 766 |
primaryBar: {
|
|
@@ -839,47 +757,34 @@
|
|
| 839 |
padding: '10'
|
| 840 |
}
|
| 841 |
},
|
| 842 |
-
ticker: {
|
| 843 |
-
enabled: true,
|
| 844 |
-
products: [
|
| 845 |
-
{ name: 'UPSC CSE Prelims Test Series 2025', url: '#', imageUrl: 'https://examups.com/wp-content/uploads/2024/05/1-300x300.png' },
|
| 846 |
-
{ name: 'BPSC Test Series 2024', url: '#', imageUrl: 'https://examups.com/wp-content/uploads/2024/03/BPSC-Test-Series-300x300.png' },
|
| 847 |
-
]
|
| 848 |
-
},
|
| 849 |
footer: {
|
| 850 |
about: {
|
| 851 |
-
enabled: true,
|
| 852 |
logoEnabled: true,
|
| 853 |
description: 'Our learning platform is dedicated to providing the highest quality courses and resources to help you succeed.',
|
| 854 |
mission: 'Empowering minds through accessible and effective online education.',
|
| 855 |
},
|
| 856 |
linkColumns: [ { title: '👨🎓 Learn', links: [ { text: 'Courses', url: '#' } ] } ],
|
| 857 |
-
contact: {
|
| 858 |
-
socials: {
|
| 859 |
-
|
| 860 |
-
|
| 861 |
-
payments: { enabled: true },
|
| 862 |
-
bottom: { copyright: true, backToTop: true, legalLinks: [ { text: 'Terms & Conditions', url: '#' } ] },
|
| 863 |
},
|
| 864 |
mobileFooter: {
|
| 865 |
nav: {
|
| 866 |
-
enabled: true,
|
| 867 |
items: [
|
| 868 |
{ icon: 'fas fa-home', text: 'Home', url: '#' }, { icon: 'fas fa-book', text: 'My Courses', url: '#' },
|
| 869 |
{ icon: 'fas fa-search', text: 'Explore', url: '#' }, { icon: 'fas fa-user', text: 'Profile', url: '#' },
|
| 870 |
]
|
| 871 |
},
|
| 872 |
-
cta: {
|
| 873 |
-
support: {
|
| 874 |
}
|
| 875 |
};
|
| 876 |
|
| 877 |
const componentNames = {
|
| 878 |
-
customHtml: 'Custom HTML',
|
| 879 |
lmsHeader: 'LMS Header',
|
| 880 |
sidebar: 'LMS Sidebar',
|
| 881 |
topBar: 'Top Bar',
|
| 882 |
-
ticker: 'Product Ticker',
|
| 883 |
footer: 'Main Footer',
|
| 884 |
mobileFooter: 'Mobile Footer',
|
| 885 |
};
|
|
@@ -905,10 +810,6 @@
|
|
| 905 |
container: document.getElementById('layout-builder-container'),
|
| 906 |
panel: document.getElementById('panel-layout')
|
| 907 |
},
|
| 908 |
-
customHtml: {
|
| 909 |
-
toggle: document.getElementById('custom-html-toggle'),
|
| 910 |
-
content: document.getElementById('custom-html-content'),
|
| 911 |
-
},
|
| 912 |
learningAppHeader: {
|
| 913 |
stickyToggle: document.getElementById('lms-header-sticky-toggle'),
|
| 914 |
primaryBarToggle: document.getElementById('lms-primary-bar-toggle'),
|
|
@@ -956,37 +857,24 @@
|
|
| 956 |
fontSizeVal: document.getElementById('topbar-font-size-val'),
|
| 957 |
paddingVal: document.getElementById('topbar-padding-val'),
|
| 958 |
},
|
| 959 |
-
ticker: {
|
| 960 |
-
toggle: document.getElementById('ticker-toggle'),
|
| 961 |
-
builder: document.getElementById('ticker-product-builder'),
|
| 962 |
-
productsContainer: document.getElementById('ticker-products-container'),
|
| 963 |
-
},
|
| 964 |
footer: {
|
| 965 |
-
aboutToggle: document.getElementById('footer-about-toggle'),
|
| 966 |
aboutLogoToggle: document.getElementById('footer-about-logo-toggle'),
|
| 967 |
aboutDesc: document.getElementById('footer-about-desc'),
|
| 968 |
aboutMission: document.getElementById('footer-about-mission'),
|
| 969 |
linkColumns: { builder: document.getElementById('footer-link-columns-builder'), container: document.getElementById('footer-link-columns-container'), },
|
| 970 |
-
contactToggle: document.getElementById('footer-contact-toggle'),
|
| 971 |
contactEmail: document.getElementById('footer-contact-email'),
|
| 972 |
contactPhone: document.getElementById('footer-contact-phone'),
|
| 973 |
contactAddress: document.getElementById('footer-contact-address'),
|
| 974 |
contactHours: document.getElementById('footer-contact-hours'),
|
| 975 |
-
socialToggle: document.getElementById('footer-social-toggle'),
|
| 976 |
socials: { builder: document.getElementById('footer-socials-builder'), container: document.getElementById('footer-socials-container'), },
|
| 977 |
-
newsletterToggle: document.getElementById('footer-newsletter-toggle'),
|
| 978 |
-
appsToggle: document.getElementById('footer-apps-toggle'),
|
| 979 |
appsPlayStore: document.getElementById('footer-apps-playstore'),
|
| 980 |
appsAppStore: document.getElementById('footer-apps-appstore'),
|
| 981 |
-
paymentsToggle: document.getElementById('footer-payments-toggle'),
|
| 982 |
-
copyrightToggle: document.getElementById('footer-copyright-toggle'),
|
| 983 |
-
backToTopToggle: document.getElementById('footer-back-to-top-toggle'),
|
| 984 |
legalLinks: { builder: document.getElementById('footer-legal-links-builder'), container: document.getElementById('footer-legal-links-container'), },
|
| 985 |
},
|
| 986 |
mobileFooter: {
|
| 987 |
-
nav: {
|
| 988 |
-
cta: {
|
| 989 |
-
support: {
|
| 990 |
},
|
| 991 |
buttons: {
|
| 992 |
desktop: document.getElementById('desktop-btn'),
|
|
@@ -1047,10 +935,6 @@
|
|
| 1047 |
// Layout Controls
|
| 1048 |
ui.layout.panel.addEventListener('click', handleLayoutControlsClick);
|
| 1049 |
setupDragAndDrop();
|
| 1050 |
-
|
| 1051 |
-
// Component Listeners
|
| 1052 |
-
ui.customHtml.toggle.addEventListener('change', e => { config.customHtml.enabled = e.target.checked; renderAll(); });
|
| 1053 |
-
ui.customHtml.content.addEventListener('input', e => { config.customHtml.content = e.target.value; renderAll(); });
|
| 1054 |
|
| 1055 |
// LMS Header Listeners
|
| 1056 |
const lmsUI = ui.learningAppHeader;
|
|
@@ -1106,44 +990,28 @@
|
|
| 1106 |
topBarUI.fontSize.addEventListener('input', (e) => { config.topBar.styles.fontSize = e.target.value; topBarUI.fontSizeVal.textContent = e.target.value; renderAll(); });
|
| 1107 |
topBarUI.padding.addEventListener('input', (e) => { config.topBar.styles.padding = e.target.value; topBarUI.paddingVal.textContent = e.target.value; renderAll(); });
|
| 1108 |
|
| 1109 |
-
// Ticker Listeners
|
| 1110 |
-
ui.ticker.toggle.addEventListener('change', (e) => { config.ticker.enabled = e.target.checked; renderAll(); });
|
| 1111 |
-
ui.ticker.builder.addEventListener('click', handleTickerBuilderClick);
|
| 1112 |
-
ui.ticker.builder.addEventListener('input', handleTickerProductChange);
|
| 1113 |
-
|
| 1114 |
// Footer Listeners
|
| 1115 |
-
ui.footer.aboutToggle.addEventListener('change', (e) => { config.footer.about.enabled = e.target.checked; renderAll(); });
|
| 1116 |
ui.footer.aboutLogoToggle.addEventListener('change', (e) => { config.footer.about.logoEnabled = e.target.checked; renderAll(); });
|
| 1117 |
ui.footer.aboutDesc.addEventListener('input', (e) => { config.footer.about.description = e.target.value; renderAll(); });
|
| 1118 |
ui.footer.aboutMission.addEventListener('input', (e) => { config.footer.about.mission = e.target.value; renderAll(); });
|
| 1119 |
ui.footer.linkColumns.builder.addEventListener('click', handleFooterLinkColumnClick);
|
| 1120 |
ui.footer.linkColumns.builder.addEventListener('input', handleFooterLinkColumnChange);
|
| 1121 |
-
ui.footer.contactToggle.addEventListener('change', (e) => { config.footer.contact.enabled = e.target.checked; renderAll(); });
|
| 1122 |
ui.footer.contactEmail.addEventListener('input', (e) => { config.footer.contact.email = e.target.value; renderAll(); });
|
| 1123 |
ui.footer.contactPhone.addEventListener('input', (e) => { config.footer.contact.phone = e.target.value; renderAll(); });
|
| 1124 |
ui.footer.contactAddress.addEventListener('input', (e) => { config.footer.contact.address = e.target.value; renderAll(); });
|
| 1125 |
ui.footer.contactHours.addEventListener('input', (e) => { config.footer.contact.hours = e.target.value; renderAll(); });
|
| 1126 |
-
ui.footer.socialToggle.addEventListener('change', (e) => { config.footer.socials.enabled = e.target.checked; renderAll(); });
|
| 1127 |
ui.footer.socials.builder.addEventListener('click', handleFooterSocialsClick);
|
| 1128 |
ui.footer.socials.builder.addEventListener('input', handleFooterSocialsChange);
|
| 1129 |
-
ui.footer.newsletterToggle.addEventListener('change', (e) => { config.footer.newsletter.enabled = e.target.checked; renderAll(); });
|
| 1130 |
-
ui.footer.appsToggle.addEventListener('change', (e) => { config.footer.apps.enabled = e.target.checked; renderAll(); });
|
| 1131 |
ui.footer.appsPlayStore.addEventListener('input', (e) => { config.footer.apps.playStoreUrl = e.target.value; renderAll(); });
|
| 1132 |
ui.footer.appsAppStore.addEventListener('input', (e) => { config.footer.apps.appStoreUrl = e.target.value; renderAll(); });
|
| 1133 |
-
ui.footer.paymentsToggle.addEventListener('change', (e) => { config.footer.payments.enabled = e.target.checked; renderAll(); });
|
| 1134 |
-
ui.footer.copyrightToggle.addEventListener('change', (e) => { config.footer.bottom.copyright = e.target.checked; renderAll(); });
|
| 1135 |
-
ui.footer.backToTopToggle.addEventListener('change', (e) => { config.footer.bottom.backToTop = e.target.checked; renderAll(); });
|
| 1136 |
ui.footer.legalLinks.builder.addEventListener('click', handleFooterLegalLinksClick);
|
| 1137 |
ui.footer.legalLinks.builder.addEventListener('input', handleFooterLegalLinksChange);
|
| 1138 |
|
| 1139 |
// Mobile Footer Listeners
|
| 1140 |
-
ui.mobileFooter.nav.toggle.addEventListener('change', (e) => { config.mobileFooter.nav.enabled = e.target.checked; renderAll(); });
|
| 1141 |
ui.mobileFooter.nav.builder.addEventListener('click', handleMobileNavClick);
|
| 1142 |
ui.mobileFooter.nav.builder.addEventListener('input', handleMobileNavChange);
|
| 1143 |
-
ui.mobileFooter.cta.toggle.addEventListener('change', (e) => { config.mobileFooter.cta.enabled = e.target.checked; renderAll(); });
|
| 1144 |
ui.mobileFooter.cta.text.addEventListener('input', (e) => { config.mobileFooter.cta.text = e.target.value; renderAll(); });
|
| 1145 |
ui.mobileFooter.cta.url.addEventListener('input', (e) => { config.mobileFooter.cta.url = e.target.value; renderAll(); });
|
| 1146 |
-
ui.mobileFooter.support.toggle.addEventListener('change', (e) => { config.mobileFooter.support.enabled = e.target.checked; renderAll(); });
|
| 1147 |
ui.mobileFooter.support.builder.addEventListener('click', handleMobileSupportClick);
|
| 1148 |
ui.mobileFooter.support.builder.addEventListener('input', handleMobileSupportChange);
|
| 1149 |
|
|
@@ -1408,32 +1276,6 @@
|
|
| 1408 |
config.learningAppHeader.primaryBar.elements.customIcons[index][prop] = value;
|
| 1409 |
renderAll();
|
| 1410 |
}
|
| 1411 |
-
function renderTickerProductControls() {
|
| 1412 |
-
ui.ticker.productsContainer.innerHTML = config.ticker.products.map((product, index) => `
|
| 1413 |
-
<div class="p-2 border rounded-md bg-white space-y-2">
|
| 1414 |
-
<div class="space-y-1">
|
| 1415 |
-
<input type="text" data-index="${index}" data-prop="name" value="${product.name}" placeholder="Product Name" class="w-full p-1 border rounded-md text-sm">
|
| 1416 |
-
<input type="text" data-index="${index}" data-prop="url" value="${product.url}" placeholder="Product URL" class="w-full p-1 border rounded-md text-sm">
|
| 1417 |
-
<input type="text" data-index="${index}" data-prop="imageUrl" value="${product.imageUrl}" placeholder="Icon/Image URL" class="w-full p-1 border rounded-md text-sm">
|
| 1418 |
-
</div>
|
| 1419 |
-
<button class="remove-ticker-product-btn text-xs bg-red-500 text-white py-1 px-2 rounded-md hover:bg-red-600" data-index="${index}">Remove</button>
|
| 1420 |
-
</div>`).join('');
|
| 1421 |
-
}
|
| 1422 |
-
function handleTickerBuilderClick(e) {
|
| 1423 |
-
let changed = false;
|
| 1424 |
-
if (e.target.id === 'add-ticker-product-btn') {
|
| 1425 |
-
config.ticker.products.push({ name: 'New Product', url: '#', imageUrl: '' }); changed = true;
|
| 1426 |
-
}
|
| 1427 |
-
if (e.target.classList.contains('remove-ticker-product-btn')) {
|
| 1428 |
-
config.ticker.products.splice(parseInt(e.target.dataset.index, 10), 1); changed = true;
|
| 1429 |
-
}
|
| 1430 |
-
if(changed) { renderTickerProductControls(); renderAll(); }
|
| 1431 |
-
}
|
| 1432 |
-
function handleTickerProductChange(e) {
|
| 1433 |
-
if (e.target.tagName === 'INPUT') {
|
| 1434 |
-
const {index, prop} = e.target.dataset; config.ticker.products[index][prop] = e.target.value; renderAll();
|
| 1435 |
-
}
|
| 1436 |
-
}
|
| 1437 |
function renderFooterLinkColumnsControls() {
|
| 1438 |
ui.footer.linkColumns.container.innerHTML = config.footer.linkColumns.map((column, colIndex) => {
|
| 1439 |
let linksHtml = column.links.map((link, linkIndex) => `
|
|
@@ -1556,18 +1398,12 @@
|
|
| 1556 |
|
| 1557 |
// --- HTML Generation Logic ---
|
| 1558 |
const componentGenerators = {
|
| 1559 |
-
customHtml: () => config.customHtml.enabled ? `<div class="custom-html-section">${config.customHtml.content}</div>` : '',
|
| 1560 |
topBar: () => {
|
| 1561 |
if (!config.topBar.enabled) return '';
|
| 1562 |
const s = config.topBar.styles;
|
| 1563 |
const content = config.topBar.text.includes('<a') ? config.topBar.text : `<a href="${config.topBar.url}">${config.topBar.text}</a>`;
|
| 1564 |
return `<div id="site-topbar" class="site-topbar" style="--bg-start: ${s.bgColorStart}; --bg-end: ${s.bgColorEnd}; --text-color: ${s.textColor}; --font-size: ${s.fontSize}px; --padding: ${s.padding}px;"><div class="container">${content}</div></div>`;
|
| 1565 |
},
|
| 1566 |
-
ticker: () => {
|
| 1567 |
-
if (!config.ticker.enabled) return '';
|
| 1568 |
-
const items = config.ticker.products.map(p => `<a href="${p.url}" class="ticker-item"><img src="${p.imageUrl}" alt="${p.name}"><span>${p.name}</span></a>`).join('');
|
| 1569 |
-
return `<div class="product-ticker"><div class="ticker-track">${items}${items}</div></div>`;
|
| 1570 |
-
},
|
| 1571 |
lmsHeader: () => {
|
| 1572 |
const c = config.learningAppHeader; if (!c.primaryBar.enabled && !c.pageTitle.enabled && !c.tabs.enabled) return '';
|
| 1573 |
let primaryBar = '';
|
|
@@ -1622,23 +1458,23 @@
|
|
| 1622 |
},
|
| 1623 |
footer: () => {
|
| 1624 |
const f = config.footer;
|
| 1625 |
-
const about =
|
| 1626 |
const links = f.linkColumns.map(c => `<div class="footer-widget"><h4 class="widget-title">${c.title}</h4><ul>${c.links.map(l => `<li><a href="${l.url}">${l.text}</a></li>`).join('')}</ul></div>`).join('');
|
| 1627 |
-
const contact =
|
| 1628 |
-
const socials =
|
| 1629 |
-
const newsletter =
|
| 1630 |
-
const apps =
|
| 1631 |
-
const payments =
|
| 1632 |
const legal = f.bottom.legalLinks.map(l => `<li><a href="${l.url}">${l.text}</a></li>`).join('');
|
| 1633 |
-
const copyright =
|
| 1634 |
-
const backToTop =
|
| 1635 |
return `<footer id="site-footer" class="site-footer"><div class="container footer-main">${about}${links}${contact}${socials}${newsletter}</div><div class="container footer-secondary">${apps}${payments}</div><div class="container footer-bottom"><div class="copyright-legal">${copyright}<ul class="legal-links">${legal}</ul></div></div></footer>${backToTop}`;
|
| 1636 |
},
|
| 1637 |
mobileFooter: () => {
|
| 1638 |
const mf = config.mobileFooter;
|
| 1639 |
-
const nav =
|
| 1640 |
-
const cta =
|
| 1641 |
-
const support =
|
| 1642 |
return `${nav}${cta}${support}`;
|
| 1643 |
}
|
| 1644 |
};
|
|
@@ -1700,9 +1536,7 @@ body.dark-mode .footer-widget a { color: #9ca3af; } body.dark-mode .footer-widge
|
|
| 1700 |
body.dark-mode .widget-title { color: #fff; }
|
| 1701 |
`;
|
| 1702 |
|
| 1703 |
-
if(config.customHtml.enabled) css.customHtml = `.custom-html-section { padding: 2rem 0; }`;
|
| 1704 |
css.topBar = config.topBar.enabled ? `.site-topbar { background: linear-gradient(90deg, var(--bg-start), var(--bg-end)); color: var(--text-color); font-size: var(--font-size); padding: var(--padding) 0; font-weight: 500; } .site-topbar .container { display: flex; align-items: center; justify-content: center; gap: 15px; flex-wrap: wrap; } .site-topbar a { color: inherit; text-decoration: none; } .offer-icon { margin-right: 12px; font-size: 1.2em; animation: gift-bounce 1.5s ease-in-out infinite; } .cta-button { margin-left: 20px; background-color: #ff9800; color: #fff; padding: 0.5em 1.2em; border-radius: 50px; font-weight: 700; animation: button-pulse 2s infinite; } @media (max-width: 768px) { .site-topbar .container { flex-direction: column; gap: 8px; text-align: center; } .cta-button { margin-left: 0; } }` : '';
|
| 1705 |
-
css.ticker = config.ticker.enabled ? `.product-ticker { background-color: #f8f9fa; padding: 10px 0; overflow: hidden; white-space: nowrap; border-bottom: 1px solid #e5e7eb; } .ticker-track { display: inline-block; animation: scroll-ticker 40s linear infinite; } .ticker-item { display: inline-flex; align-items: center; margin: 0 25px; color: #343a40; font-size: 0.9rem; } .ticker-item img { height: 30px; margin-right: 10px; } @keyframes scroll-ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }` : '';
|
| 1706 |
css.lmsHeader = `
|
| 1707 |
.learning-app-header-container { background-color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.05); z-index: 100; position: relative; transition: background-color 0.3s; }
|
| 1708 |
.learning-app-header-container.sticky-header { position: sticky; top: 0; z-index: 1010; }
|
|
@@ -1822,7 +1656,7 @@ body.search-active .lms-search-overlay { opacity: 1; visibility: visible; }
|
|
| 1822 |
|
| 1823 |
function getFullCSS() {
|
| 1824 |
const cssObject = generateComponentCSS();
|
| 1825 |
-
return [cssObject.global, cssObject.sidebar, cssObject.topBar, cssObject.
|
| 1826 |
}
|
| 1827 |
|
| 1828 |
function generateComponentJavaScript(targetKey = null) {
|
|
@@ -2076,9 +1910,6 @@ body.search-active .lms-search-overlay { opacity: 1; visibility: visible; }
|
|
| 2076 |
ui.globalSettings.headingColor.value = config.globalSettings.colors.heading;
|
| 2077 |
ui.globalSettings.fontFamily.value = config.globalSettings.typography.fontFamily;
|
| 2078 |
|
| 2079 |
-
ui.customHtml.toggle.checked = config.customHtml.enabled;
|
| 2080 |
-
ui.customHtml.content.value = config.customHtml.content;
|
| 2081 |
-
|
| 2082 |
const lmsUI = ui.learningAppHeader; const lmsConfig = config.learningAppHeader;
|
| 2083 |
lmsUI.stickyToggle.checked = lmsConfig.sticky;
|
| 2084 |
lmsUI.primaryBarToggle.checked = lmsConfig.primaryBar.enabled;
|
|
@@ -2107,16 +1938,11 @@ body.search-active .lms-search-overlay { opacity: 1; visibility: visible; }
|
|
| 2107 |
topBarUI.fontSizeVal.textContent = config.topBar.styles.fontSize;
|
| 2108 |
topBarUI.paddingVal.textContent = config.topBar.styles.padding;
|
| 2109 |
topBarUI.mainControls.style.display = config.topBar.enabled ? 'block' : 'none';
|
| 2110 |
-
|
| 2111 |
-
ui.ticker.toggle.checked = config.ticker.enabled;
|
| 2112 |
|
| 2113 |
ui.footer.aboutDesc.value = config.footer.about.description;
|
| 2114 |
ui.footer.aboutMission.value = config.footer.about.mission;
|
| 2115 |
|
| 2116 |
-
ui.mobileFooter.nav.toggle.checked = config.mobileFooter.nav.enabled;
|
| 2117 |
-
ui.mobileFooter.cta.toggle.checked = config.mobileFooter.cta.enabled;
|
| 2118 |
ui.mobileFooter.cta.text.value = config.mobileFooter.cta.text;
|
| 2119 |
-
ui.mobileFooter.support.toggle.checked = config.mobileFooter.support.enabled;
|
| 2120 |
|
| 2121 |
if (!document.body.classList.contains('initialized')) {
|
| 2122 |
setupEventListeners();
|
|
@@ -2134,7 +1960,6 @@ body.search-active .lms-search-overlay { opacity: 1; visibility: visible; }
|
|
| 2134 |
createSidebarLinkBuilder('footer', 'Sidebar Footer', ui.sidebar.footerBuilder, config.sidebar.footer);
|
| 2135 |
renderLmsTabsControls();
|
| 2136 |
renderLmsCustomIconsControls();
|
| 2137 |
-
renderTickerProductControls();
|
| 2138 |
renderFooterLinkColumnsControls();
|
| 2139 |
renderFooterSocialsControls();
|
| 2140 |
renderFooterLegalLinksControls();
|
|
|
|
| 266 |
<button class="control-nav-button" data-target="#panel-global-settings"><i class="fas fa-cog"></i>Global</button>
|
| 267 |
<button class="control-nav-button" data-target="#panel-layout"><i class="fas fa-layer-group"></i>Layout</button>
|
| 268 |
<button class="control-nav-button" data-target="#panel-topbar"><i class="fas fa-window-minimize fa-rotate-180"></i>Top Bar</button>
|
|
|
|
| 269 |
<button class="control-nav-button" data-target="#panel-lms-header"><i class="fas fa-graduation-cap"></i>LMS Header</button>
|
| 270 |
<button class="control-nav-button" data-target="#panel-lms-sidebar"><i class="fas fa-columns"></i>LMS Sidebar</button>
|
|
|
|
| 271 |
<button class="control-nav-button" data-target="#panel-footer"><i class="fas fa-shoe-prints"></i>Footer</button>
|
| 272 |
<button class="control-nav-button" data-target="#panel-mobile-footer"><i class="fas fa-mobile-alt"></i>Mobile Footer</button>
|
| 273 |
</nav>
|
|
|
|
| 371 |
</div>
|
| 372 |
</div>
|
| 373 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 374 |
<div id="panel-lms-header" class="control-panel">
|
| 375 |
<div class="flex justify-between items-center mb-6">
|
| 376 |
<h3 class="mb-0 pb-0 border-b-0">📚 Learning App Header</h3>
|
|
|
|
| 496 |
</div>
|
| 497 |
</div>
|
| 498 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 499 |
<div id="panel-footer" class="control-panel">
|
| 500 |
<div class="flex justify-between items-center mb-6">
|
| 501 |
<h3 class="mb-0 pb-0 border-b-0">📑 Footer Settings</h3>
|
|
|
|
| 505 |
</div>
|
| 506 |
<div class="space-y-4">
|
| 507 |
<div class="space-y-2 border-b pb-4">
|
| 508 |
+
<h4 class="font-medium text-sm">"About Platform" Widget</h4>
|
|
|
|
|
|
|
|
|
|
| 509 |
<div class="flex items-center space-x-2 pl-4">
|
| 510 |
<input type="checkbox" id="footer-about-logo-toggle" class="h-4 w-4 rounded" checked>
|
| 511 |
<label for="footer-about-logo-toggle" class="text-sm">Show Logo</label>
|
|
|
|
| 527 |
</div>
|
| 528 |
|
| 529 |
<div class="space-y-2 border-b pb-4">
|
| 530 |
+
<h4 class="font-medium text-sm">Contact Info Widget</h4>
|
|
|
|
|
|
|
|
|
|
| 531 |
<div>
|
| 532 |
<label for="footer-contact-email" class="text-xs">Email</label>
|
| 533 |
<input type="email" id="footer-contact-email" class="w-full p-1 border rounded-md text-sm">
|
|
|
|
| 547 |
</div>
|
| 548 |
|
| 549 |
<div id="footer-socials-builder" class="space-y-3 border-b pb-4">
|
| 550 |
+
<h4 class="font-medium text-sm">Social Media Links</h4>
|
|
|
|
|
|
|
|
|
|
| 551 |
<div id="footer-socials-container" class="space-y-2"></div>
|
| 552 |
<button id="add-footer-social-btn" class="text-sm bg-blue-500 text-white py-1 px-3 rounded-md hover:bg-blue-600">+ Add Social Link</button>
|
| 553 |
</div>
|
| 554 |
|
| 555 |
<div class="space-y-2 border-b pb-4">
|
| 556 |
+
<h4 class="font-medium text-sm">Other Features</h4>
|
| 557 |
+
<label class="text-sm">Newsletter Signup</label>
|
| 558 |
+
<label class="text-sm mt-2 block">Mobile App Buttons</label>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 559 |
<div class="pl-6 space-y-1">
|
| 560 |
<input type="text" id="footer-apps-playstore" class="w-full p-1 border rounded-md text-sm" placeholder="Google Play Store URL">
|
| 561 |
<input type="text" id="footer-apps-appstore" class="w-full p-1 border rounded-md text-sm" placeholder="Apple App Store URL">
|
| 562 |
</div>
|
| 563 |
+
<label class="text-sm mt-2 block">Payment Method Icons</label>
|
|
|
|
|
|
|
|
|
|
| 564 |
</div>
|
| 565 |
|
| 566 |
<div class="space-y-2">
|
| 567 |
+
<h4 class="font-medium text-sm">Footer Bottom</h4>
|
| 568 |
+
<label class="text-sm">Copyright Text</label>
|
| 569 |
+
<label class="text-sm mt-2 block">"Back to Top" Button</label>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 570 |
<div id="footer-legal-links-builder">
|
| 571 |
<label class="text-xs font-medium">Legal Links</label>
|
| 572 |
<div id="footer-legal-links-container" class="space-y-2 mt-1"></div>
|
|
|
|
| 585 |
</div>
|
| 586 |
<div class="space-y-4">
|
| 587 |
<div id="mobile-nav-builder" class="space-y-3 border-b pb-4">
|
| 588 |
+
<h4 class="font-medium text-sm">Bottom Navigation Bar</h4>
|
|
|
|
|
|
|
|
|
|
| 589 |
<div id="mobile-nav-items-container" class="space-y-2"></div>
|
| 590 |
<button id="add-mobile-nav-item-btn" class="text-sm bg-blue-500 text-white py-1 px-3 rounded-md hover:bg-blue-600">+ Add Nav Item</button>
|
| 591 |
</div>
|
| 592 |
|
| 593 |
<div class="space-y-2 border-b pb-4">
|
| 594 |
+
<h4 class="font-medium text-sm">Conditional CTA Footer</h4>
|
|
|
|
|
|
|
|
|
|
| 595 |
<div class="space-y-2 pl-4">
|
| 596 |
<div>
|
| 597 |
<label for="mobile-cta-text" class="text-xs">CTA Text</label>
|
|
|
|
| 605 |
</div>
|
| 606 |
|
| 607 |
<div id="mobile-support-builder" class="space-y-3">
|
| 608 |
+
<h4 class="font-medium text-sm">Support & Feedback Links</h4>
|
|
|
|
|
|
|
|
|
|
| 609 |
<div id="mobile-support-links-container" class="space-y-2"></div>
|
| 610 |
<button id="add-mobile-support-link-btn" class="text-sm bg-blue-500 text-white py-1 px-3 rounded-md hover:bg-blue-600">+ Add Support Link</button>
|
| 611 |
</div>
|
|
|
|
| 676 |
},
|
| 677 |
componentOrder: [
|
| 678 |
'topBar',
|
|
|
|
| 679 |
'lmsHeader',
|
|
|
|
| 680 |
'footer',
|
| 681 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
| 682 |
learningAppHeader: {
|
| 683 |
sticky: false,
|
| 684 |
primaryBar: {
|
|
|
|
| 757 |
padding: '10'
|
| 758 |
}
|
| 759 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 760 |
footer: {
|
| 761 |
about: {
|
|
|
|
| 762 |
logoEnabled: true,
|
| 763 |
description: 'Our learning platform is dedicated to providing the highest quality courses and resources to help you succeed.',
|
| 764 |
mission: 'Empowering minds through accessible and effective online education.',
|
| 765 |
},
|
| 766 |
linkColumns: [ { title: '👨🎓 Learn', links: [ { text: 'Courses', url: '#' } ] } ],
|
| 767 |
+
contact: { email: 'support@example.com', phone: '+91-1234567890', address: 'Jaipur, Rajasthan, India', hours: 'Mon–Sat, 9 AM – 6 PM', },
|
| 768 |
+
socials: { links: [ { network: 'fab fa-facebook-f', url: '#' } ] },
|
| 769 |
+
apps: { playStoreUrl: '#', appStoreUrl: '#', },
|
| 770 |
+
bottom: { legalLinks: [ { text: 'Terms & Conditions', url: '#' } ] },
|
|
|
|
|
|
|
| 771 |
},
|
| 772 |
mobileFooter: {
|
| 773 |
nav: {
|
|
|
|
| 774 |
items: [
|
| 775 |
{ icon: 'fas fa-home', text: 'Home', url: '#' }, { icon: 'fas fa-book', text: 'My Courses', url: '#' },
|
| 776 |
{ icon: 'fas fa-search', text: 'Explore', url: '#' }, { icon: 'fas fa-user', text: 'Profile', url: '#' },
|
| 777 |
]
|
| 778 |
},
|
| 779 |
+
cta: { text: 'Start Learning Now', url: '#' },
|
| 780 |
+
support: { links: [ { text: 'Live Chat', url: '#' } ] }
|
| 781 |
}
|
| 782 |
};
|
| 783 |
|
| 784 |
const componentNames = {
|
|
|
|
| 785 |
lmsHeader: 'LMS Header',
|
| 786 |
sidebar: 'LMS Sidebar',
|
| 787 |
topBar: 'Top Bar',
|
|
|
|
| 788 |
footer: 'Main Footer',
|
| 789 |
mobileFooter: 'Mobile Footer',
|
| 790 |
};
|
|
|
|
| 810 |
container: document.getElementById('layout-builder-container'),
|
| 811 |
panel: document.getElementById('panel-layout')
|
| 812 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
| 813 |
learningAppHeader: {
|
| 814 |
stickyToggle: document.getElementById('lms-header-sticky-toggle'),
|
| 815 |
primaryBarToggle: document.getElementById('lms-primary-bar-toggle'),
|
|
|
|
| 857 |
fontSizeVal: document.getElementById('topbar-font-size-val'),
|
| 858 |
paddingVal: document.getElementById('topbar-padding-val'),
|
| 859 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 860 |
footer: {
|
|
|
|
| 861 |
aboutLogoToggle: document.getElementById('footer-about-logo-toggle'),
|
| 862 |
aboutDesc: document.getElementById('footer-about-desc'),
|
| 863 |
aboutMission: document.getElementById('footer-about-mission'),
|
| 864 |
linkColumns: { builder: document.getElementById('footer-link-columns-builder'), container: document.getElementById('footer-link-columns-container'), },
|
|
|
|
| 865 |
contactEmail: document.getElementById('footer-contact-email'),
|
| 866 |
contactPhone: document.getElementById('footer-contact-phone'),
|
| 867 |
contactAddress: document.getElementById('footer-contact-address'),
|
| 868 |
contactHours: document.getElementById('footer-contact-hours'),
|
|
|
|
| 869 |
socials: { builder: document.getElementById('footer-socials-builder'), container: document.getElementById('footer-socials-container'), },
|
|
|
|
|
|
|
| 870 |
appsPlayStore: document.getElementById('footer-apps-playstore'),
|
| 871 |
appsAppStore: document.getElementById('footer-apps-appstore'),
|
|
|
|
|
|
|
|
|
|
| 872 |
legalLinks: { builder: document.getElementById('footer-legal-links-builder'), container: document.getElementById('footer-legal-links-container'), },
|
| 873 |
},
|
| 874 |
mobileFooter: {
|
| 875 |
+
nav: { builder: document.getElementById('mobile-nav-builder'), container: document.getElementById('mobile-nav-items-container'), },
|
| 876 |
+
cta: { text: document.getElementById('mobile-cta-text'), url: document.getElementById('mobile-cta-url'), },
|
| 877 |
+
support: { builder: document.getElementById('mobile-support-builder'), container: document.getElementById('mobile-support-links-container'), }
|
| 878 |
},
|
| 879 |
buttons: {
|
| 880 |
desktop: document.getElementById('desktop-btn'),
|
|
|
|
| 935 |
// Layout Controls
|
| 936 |
ui.layout.panel.addEventListener('click', handleLayoutControlsClick);
|
| 937 |
setupDragAndDrop();
|
|
|
|
|
|
|
|
|
|
|
|
|
| 938 |
|
| 939 |
// LMS Header Listeners
|
| 940 |
const lmsUI = ui.learningAppHeader;
|
|
|
|
| 990 |
topBarUI.fontSize.addEventListener('input', (e) => { config.topBar.styles.fontSize = e.target.value; topBarUI.fontSizeVal.textContent = e.target.value; renderAll(); });
|
| 991 |
topBarUI.padding.addEventListener('input', (e) => { config.topBar.styles.padding = e.target.value; topBarUI.paddingVal.textContent = e.target.value; renderAll(); });
|
| 992 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 993 |
// Footer Listeners
|
|
|
|
| 994 |
ui.footer.aboutLogoToggle.addEventListener('change', (e) => { config.footer.about.logoEnabled = e.target.checked; renderAll(); });
|
| 995 |
ui.footer.aboutDesc.addEventListener('input', (e) => { config.footer.about.description = e.target.value; renderAll(); });
|
| 996 |
ui.footer.aboutMission.addEventListener('input', (e) => { config.footer.about.mission = e.target.value; renderAll(); });
|
| 997 |
ui.footer.linkColumns.builder.addEventListener('click', handleFooterLinkColumnClick);
|
| 998 |
ui.footer.linkColumns.builder.addEventListener('input', handleFooterLinkColumnChange);
|
|
|
|
| 999 |
ui.footer.contactEmail.addEventListener('input', (e) => { config.footer.contact.email = e.target.value; renderAll(); });
|
| 1000 |
ui.footer.contactPhone.addEventListener('input', (e) => { config.footer.contact.phone = e.target.value; renderAll(); });
|
| 1001 |
ui.footer.contactAddress.addEventListener('input', (e) => { config.footer.contact.address = e.target.value; renderAll(); });
|
| 1002 |
ui.footer.contactHours.addEventListener('input', (e) => { config.footer.contact.hours = e.target.value; renderAll(); });
|
|
|
|
| 1003 |
ui.footer.socials.builder.addEventListener('click', handleFooterSocialsClick);
|
| 1004 |
ui.footer.socials.builder.addEventListener('input', handleFooterSocialsChange);
|
|
|
|
|
|
|
| 1005 |
ui.footer.appsPlayStore.addEventListener('input', (e) => { config.footer.apps.playStoreUrl = e.target.value; renderAll(); });
|
| 1006 |
ui.footer.appsAppStore.addEventListener('input', (e) => { config.footer.apps.appStoreUrl = e.target.value; renderAll(); });
|
|
|
|
|
|
|
|
|
|
| 1007 |
ui.footer.legalLinks.builder.addEventListener('click', handleFooterLegalLinksClick);
|
| 1008 |
ui.footer.legalLinks.builder.addEventListener('input', handleFooterLegalLinksChange);
|
| 1009 |
|
| 1010 |
// Mobile Footer Listeners
|
|
|
|
| 1011 |
ui.mobileFooter.nav.builder.addEventListener('click', handleMobileNavClick);
|
| 1012 |
ui.mobileFooter.nav.builder.addEventListener('input', handleMobileNavChange);
|
|
|
|
| 1013 |
ui.mobileFooter.cta.text.addEventListener('input', (e) => { config.mobileFooter.cta.text = e.target.value; renderAll(); });
|
| 1014 |
ui.mobileFooter.cta.url.addEventListener('input', (e) => { config.mobileFooter.cta.url = e.target.value; renderAll(); });
|
|
|
|
| 1015 |
ui.mobileFooter.support.builder.addEventListener('click', handleMobileSupportClick);
|
| 1016 |
ui.mobileFooter.support.builder.addEventListener('input', handleMobileSupportChange);
|
| 1017 |
|
|
|
|
| 1276 |
config.learningAppHeader.primaryBar.elements.customIcons[index][prop] = value;
|
| 1277 |
renderAll();
|
| 1278 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1279 |
function renderFooterLinkColumnsControls() {
|
| 1280 |
ui.footer.linkColumns.container.innerHTML = config.footer.linkColumns.map((column, colIndex) => {
|
| 1281 |
let linksHtml = column.links.map((link, linkIndex) => `
|
|
|
|
| 1398 |
|
| 1399 |
// --- HTML Generation Logic ---
|
| 1400 |
const componentGenerators = {
|
|
|
|
| 1401 |
topBar: () => {
|
| 1402 |
if (!config.topBar.enabled) return '';
|
| 1403 |
const s = config.topBar.styles;
|
| 1404 |
const content = config.topBar.text.includes('<a') ? config.topBar.text : `<a href="${config.topBar.url}">${config.topBar.text}</a>`;
|
| 1405 |
return `<div id="site-topbar" class="site-topbar" style="--bg-start: ${s.bgColorStart}; --bg-end: ${s.bgColorEnd}; --text-color: ${s.textColor}; --font-size: ${s.fontSize}px; --padding: ${s.padding}px;"><div class="container">${content}</div></div>`;
|
| 1406 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1407 |
lmsHeader: () => {
|
| 1408 |
const c = config.learningAppHeader; if (!c.primaryBar.enabled && !c.pageTitle.enabled && !c.tabs.enabled) return '';
|
| 1409 |
let primaryBar = '';
|
|
|
|
| 1458 |
},
|
| 1459 |
footer: () => {
|
| 1460 |
const f = config.footer;
|
| 1461 |
+
const about = `<div class="footer-widget footer-about">${f.about.logoEnabled ? `<div class="footer-logo"><img src="${config.learningAppHeader.primaryBar.brand.imageUrl}" alt="Logo"></div>` : ''}<p>${f.about.description}</p><p><em>${f.about.mission}</em></p></div>`;
|
| 1462 |
const links = f.linkColumns.map(c => `<div class="footer-widget"><h4 class="widget-title">${c.title}</h4><ul>${c.links.map(l => `<li><a href="${l.url}">${l.text}</a></li>`).join('')}</ul></div>`).join('');
|
| 1463 |
+
const contact = `<div class="footer-widget"><h4 class="widget-title">Contact</h4><ul class="contact-info"><li><i class="fas fa-envelope"></i><a href="mailto:${f.contact.email}">${f.contact.email}</a></li><li><i class="fas fa-phone-alt"></i><a href="tel:${f.contact.phone}">${f.contact.phone}</a></li><li><i class="fas fa-map-marker-alt"></i><span>${f.contact.address}</span></li><li><i class="fas fa-clock"></i><span>${f.contact.hours}</span></li></ul></div>`;
|
| 1464 |
+
const socials = `<div class="footer-widget"><h4 class="widget-title">Follow Us</h4><ul class="social-links">${f.socials.links.map(s => `<li><a href="${s.url}"><i class="${s.network}"></i></a></li>`).join('')}</ul></div>`;
|
| 1465 |
+
const newsletter = `<div class="footer-widget"><h4 class="widget-title">Newsletter</h4><form class="newsletter-form"><input type="email" placeholder="Your Email"><button>Subscribe</button></form></div>`;
|
| 1466 |
+
const apps = `<div class="footer-apps"><a href="${f.apps.playStoreUrl}"><img src="https://upload.wikimedia.org/wikipedia/commons/7/78/Google_Play_Store_badge_EN.svg" alt="Google Play"></a><a href="${f.apps.appStoreUrl}"><img src="https://upload.wikimedia.org/wikipedia/commons/5/5d/Available_on_the_App_Store_Badge_US-UK_RGB_blk.svg" alt="App Store"></a></div>`;
|
| 1467 |
+
const payments = `<div class="payment-methods"><i class="fab fa-cc-visa"></i><i class="fab fa-cc-mastercard"></i><i class="fab fa-cc-paypal"></i></div>`;
|
| 1468 |
const legal = f.bottom.legalLinks.map(l => `<li><a href="${l.url}">${l.text}</a></li>`).join('');
|
| 1469 |
+
const copyright = `<p>© ${new Date().getFullYear()} Site. All Rights Reserved.</p>`;
|
| 1470 |
+
const backToTop = '<button id="back-to-top" title="Back to Top"><i class="fas fa-arrow-up"></i></button>';
|
| 1471 |
return `<footer id="site-footer" class="site-footer"><div class="container footer-main">${about}${links}${contact}${socials}${newsletter}</div><div class="container footer-secondary">${apps}${payments}</div><div class="container footer-bottom"><div class="copyright-legal">${copyright}<ul class="legal-links">${legal}</ul></div></div></footer>${backToTop}`;
|
| 1472 |
},
|
| 1473 |
mobileFooter: () => {
|
| 1474 |
const mf = config.mobileFooter;
|
| 1475 |
+
const nav = `<div class="mobile-bottom-nav">${mf.nav.items.map((i, idx) => `<a href="${i.url}" class="mobile-nav-item ${idx === 0 ? 'active' : ''}"><i class="${i.icon}"></i><span>${i.text}</span></a>`).join('')}</div>`;
|
| 1476 |
+
const cta = `<div class="mobile-cta-footer"><a href="${mf.cta.url}">${mf.cta.text}</a></div>`;
|
| 1477 |
+
const support = `<div class="mobile-support-footer"><ul>${mf.support.links.map(l => `<li><a href="${l.url}">${l.text}</a></li>`).join('')}</ul></div>`;
|
| 1478 |
return `${nav}${cta}${support}`;
|
| 1479 |
}
|
| 1480 |
};
|
|
|
|
| 1536 |
body.dark-mode .widget-title { color: #fff; }
|
| 1537 |
`;
|
| 1538 |
|
|
|
|
| 1539 |
css.topBar = config.topBar.enabled ? `.site-topbar { background: linear-gradient(90deg, var(--bg-start), var(--bg-end)); color: var(--text-color); font-size: var(--font-size); padding: var(--padding) 0; font-weight: 500; } .site-topbar .container { display: flex; align-items: center; justify-content: center; gap: 15px; flex-wrap: wrap; } .site-topbar a { color: inherit; text-decoration: none; } .offer-icon { margin-right: 12px; font-size: 1.2em; animation: gift-bounce 1.5s ease-in-out infinite; } .cta-button { margin-left: 20px; background-color: #ff9800; color: #fff; padding: 0.5em 1.2em; border-radius: 50px; font-weight: 700; animation: button-pulse 2s infinite; } @media (max-width: 768px) { .site-topbar .container { flex-direction: column; gap: 8px; text-align: center; } .cta-button { margin-left: 0; } }` : '';
|
|
|
|
| 1540 |
css.lmsHeader = `
|
| 1541 |
.learning-app-header-container { background-color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.05); z-index: 100; position: relative; transition: background-color 0.3s; }
|
| 1542 |
.learning-app-header-container.sticky-header { position: sticky; top: 0; z-index: 1010; }
|
|
|
|
| 1656 |
|
| 1657 |
function getFullCSS() {
|
| 1658 |
const cssObject = generateComponentCSS();
|
| 1659 |
+
return [cssObject.global, cssObject.sidebar, cssObject.topBar, cssObject.lmsHeader, cssObject.footer, cssObject.mobileFooter].filter(Boolean).join('\n\n');
|
| 1660 |
}
|
| 1661 |
|
| 1662 |
function generateComponentJavaScript(targetKey = null) {
|
|
|
|
| 1910 |
ui.globalSettings.headingColor.value = config.globalSettings.colors.heading;
|
| 1911 |
ui.globalSettings.fontFamily.value = config.globalSettings.typography.fontFamily;
|
| 1912 |
|
|
|
|
|
|
|
|
|
|
| 1913 |
const lmsUI = ui.learningAppHeader; const lmsConfig = config.learningAppHeader;
|
| 1914 |
lmsUI.stickyToggle.checked = lmsConfig.sticky;
|
| 1915 |
lmsUI.primaryBarToggle.checked = lmsConfig.primaryBar.enabled;
|
|
|
|
| 1938 |
topBarUI.fontSizeVal.textContent = config.topBar.styles.fontSize;
|
| 1939 |
topBarUI.paddingVal.textContent = config.topBar.styles.padding;
|
| 1940 |
topBarUI.mainControls.style.display = config.topBar.enabled ? 'block' : 'none';
|
|
|
|
|
|
|
| 1941 |
|
| 1942 |
ui.footer.aboutDesc.value = config.footer.about.description;
|
| 1943 |
ui.footer.aboutMission.value = config.footer.about.mission;
|
| 1944 |
|
|
|
|
|
|
|
| 1945 |
ui.mobileFooter.cta.text.value = config.mobileFooter.cta.text;
|
|
|
|
| 1946 |
|
| 1947 |
if (!document.body.classList.contains('initialized')) {
|
| 1948 |
setupEventListeners();
|
|
|
|
| 1960 |
createSidebarLinkBuilder('footer', 'Sidebar Footer', ui.sidebar.footerBuilder, config.sidebar.footer);
|
| 1961 |
renderLmsTabsControls();
|
| 1962 |
renderLmsCustomIconsControls();
|
|
|
|
| 1963 |
renderFooterLinkColumnsControls();
|
| 1964 |
renderFooterSocialsControls();
|
| 1965 |
renderFooterLegalLinksControls();
|