upskill-event-manager/assets/js/sticky-header-compatibility.min.js
Ben Reed cdc5ea85f4 feat: Add comprehensive CSS, JavaScript and theme asset infrastructure
Add massive collection of CSS, JavaScript and theme assets that were previously excluded:

**CSS Files (681 total):**
- HVAC plugin-specific styles (hvac-*.css): 34 files including dashboard, certificates, registration, mobile nav, accessibility fixes, animations, and welcome popup
- Theme framework files (Astra, builder systems, layouts): 200+ files
- Plugin compatibility styles (WooCommerce, WPForms, Elementor, Contact Form 7): 150+ files
- WordPress core and editor styles: 50+ files
- Responsive and RTL language support: 200+ files

**JavaScript Files (400+ total):**
- HVAC plugin functionality (hvac-*.js): 27 files including menu systems, dashboard enhancements, profile sharing, mobile responsive features, accessibility, and animations
- Framework and library files: jQuery plugins, GSAP, AOS, Swiper, Chart.js, Lottie, Isotope
- Plugin compatibility scripts: WPForms, WooCommerce, Elementor, Contact Form 7, LifterLMS
- WordPress core functionality: customizer, admin, block editor compatibility
- Third-party integrations: Stripe, SMTP, analytics, search functionality

**Assets:**
- Certificate background images and logos
- Comprehensive theme styling infrastructure
- Mobile-responsive design systems
- Cross-browser compatibility assets
- Performance-optimized minified versions

**Updated .gitignore:**
- Fixed asset directory whitelisting patterns to properly include CSS/JS/images
- Added proper directory structure recognition (!/assets/css/, !/assets/js/, etc.)
- Maintains security by excluding sensitive files while including essential assets

This commit provides the complete frontend infrastructure needed for:
- Full theme functionality and styling
- Plugin feature implementations
- Mobile responsiveness and accessibility
- Cross-browser compatibility
- Performance optimization
- Developer workflow support
2025-08-11 16:20:31 -03:00

1 line
No EOL
4.7 KiB
JavaScript

(()=>{function e(){if(null!=document.getElementById("ast-fixed-header"))for(var e,t=astra.break_point,a=document.getElementById("ast-fixed-header").childNodes,s=0;s<a.length;s++)"DIV"==a[s].tagName&&a[s].classList.contains("main-header-bar-wrap")&&(e=(e=window.getComputedStyle(a[s]).content).replace(/[^0-9]/g,""),(e=parseInt(e))!=t?(null!=u&&u.classList.remove("toggled"),document.body.classList.remove("ast-header-break-point"),e=new CustomEvent("Castra-header-responsive-enabled"),document.body.dispatchEvent(e)):(document.body.classList.add("ast-header-break-point"),e=new CustomEvent("Castra-header-responsive-disabled"),document.body.dispatchEvent(e)))}var t,a,s,n,l,r,i,o=document.getElementById("ast-fixed-header"),d=o.querySelector(".main-header-bar-navigation"),u=o.querySelector(".main-header-menu-toggle");if(null!=u&&u.addEventListener("click",function(e){e.preventDefault();for(var t=o.querySelectorAll(".menu-item-has-children"),a=0;a<t.length;a++){t[a].classList.remove("ast-submenu-expanded");for(var s=t[a].querySelectorAll(".sub-menu"),n=0;n<s.length;n++)s[n].style.display="none"}-1!==(this.getAttribute("class")||"").indexOf("main-header-menu-toggle")&&(("function"==typeof astraToggleClass?(astraToggleClass(__main_header_all[event_index],"toggle-on"),astraToggleClass):(toggleClass(__main_header_all[event_index],"toggle-on"),toggleClass))(menu_toggle_all[event_index],"toggled"),__main_header_all[event_index].classList.contains("toggle-on")?(__main_header_all[event_index].style.display="block",document.body.classList.add("ast-main-header-nav-open")):(__main_header_all[event_index].style.display="",document.body.classList.remove("ast-main-header-nav-open")))},!1),CAstraNavigationMenu=function(e){for(var t=o.querySelectorAll(e),a=0;a<t.length;a++)if(null!=t[a].querySelector(".sub-menu")){var s=document.createElement("button"),s=(s.setAttribute("role","button"),s.setAttribute("class","ast-menu-toggle"),s.setAttribute("aria-expanded","false"),s.innerHTML="<span class='screen-reader-text'>Menu Toggle</span>",t[a].insertBefore(s,t[a].childNodes[1]),t[a].getBoundingClientRect().left),n=window.innerWidth,n=parseInt(n)-parseInt(s);if(n<500?!0:!1){t[a].classList.add("ast-left-align-sub-menu");for(var l=t[a].querySelectorAll(".menu-item-has-children"),r=0;r<l.length;r++)l[r].classList.add("ast-left-align-sub-menu")}n<240&&t[a].classList.add("ast-sub-menu-goes-outside")}},CAstraToggleMenu=function(e){for(var t=o.querySelectorAll(e),a=0;a<t.length;a++)t[a].addEventListener("click",function(e){e.preventDefault();for(var t=this.parentNode,a=t.querySelectorAll(".menu-item-has-children"),s=0;s<a.length;s++)a[s].classList.remove("ast-submenu-expanded"),a[s].querySelector(".sub-menu").style.display="none";for(var n=t.parentNode.querySelectorAll(".menu-item-has-children"),s=0;s<n.length;s++)if(n[s]!=t){n[s].classList.remove("ast-submenu-expanded");for(var l=n[s].querySelectorAll(".sub-menu"),r=0;r<l.length;r++)l[r].style.display="none"}t.classList.contains("menu-item-has-children")&&(("function"==typeof astraToggleClass?astraToggleClass:toggleClass)(t,"ast-submenu-expanded"),t.classList.contains("ast-submenu-expanded")?t.querySelector(".sub-menu").style.display="block":t.querySelector(".sub-menu").style.display="none")},!1)},document.body.addEventListener("Castra-header-responsive-enabled",function(){null!=d&&(d.classList.remove("toggle-on"),d.style.display="");for(var e=o.getElementsByClassName("sub-menu"),t=0;t<e.length;t++)e[t].classList.contains("astra-megamenu")||(e[t].style.display="");for(var a=o.getElementsByClassName("ast-search-menu-icon"),t=0;t<a.length;t++)a[t].classList.remove("ast-dropdown-active"),a[t].style.display=""},!1),window.addEventListener("resize",function(){"BODY"===document.activeElement.tagName&&e()}),e(),(t=document.querySelector("#ast-fixed-header .site-navigation"))&&void 0!==(a=t.getElementsByTagName("button")[0]))if(void 0===(s=t.getElementsByTagName("ul")[0]))a.style.display="none";else{for(s.setAttribute("aria-expanded","false"),-1===s.className.indexOf("nav-menu")&&(s.className+=" nav-menu"),a.onclick=function(){-1!==t.className.indexOf("toggled")?(t.className=t.className.replace(" toggled",""),a.setAttribute("aria-expanded","false"),s.setAttribute("aria-expanded","false")):(t.className+=" toggled",a.setAttribute("aria-expanded","true"),s.setAttribute("aria-expanded","true"))},n=s.getElementsByTagName("a"),r=0,i=(l=s.getElementsByTagName("ul")).length;r<i;r++)l[r].parentNode.setAttribute("aria-haspopup","true");for(r=0,i=n.length;r<i;r++)n[r].addEventListener("focus",c,!0),n[r].addEventListener("blur",c,!0)}function c(){for(var e=this;-1===e.className.indexOf("nav-menu");)"li"===e.tagName.toLowerCase()&&(-1!==e.className.indexOf("focus")?e.className=e.className.replace(" focus",""):e.className+=" focus"),e=e.parentElement}})();