| |
| document.addEventListener('DOMContentLoaded', function() { |
| |
| function applyColorScheme() { |
| const primaryColor = getComputedStyle(document.documentElement).getPropertyValue('--primary').trim(); |
| const secondaryColor = getComputedStyle(document.documentElement).getPropertyValue('--secondary').trim(); |
| |
| |
| console.log('Applying color scheme:', {primaryColor, secondaryColor}); |
| |
| |
| document.documentElement.style.setProperty('--primary', primaryColor || '#3b82f6'); |
| document.documentElement.style.setProperty('--secondary', secondaryColor || '#10b981'); |
| } |
| |
| |
| applyColorScheme(); |
| |
| |
| if (window.wp && wp.customize) { |
| wp.customize('primary_color', function(value) { |
| value.bind(function(newval) { |
| document.documentElement.style.setProperty('--primary', newval); |
| }); |
| }); |
| |
| wp.customize('secondary_color', function(value) { |
| value.bind(function(newval) { |
| document.documentElement.style.setProperty('--secondary', newval); |
| }); |
| }); |
| } |
| |
| |
| feather.replace(); |
| }); |
|
|
| |
| function enhanceGutenbergBlocks() { |
| document.querySelectorAll('.wp-block').forEach(block => { |
| |
| block.classList.add('transition', 'duration-200', 'ease-in-out'); |
| }); |
| } |