upskill-event-manager/assets/js/filter.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
3.7 KiB
JavaScript

let masonryEnabled=astra.masonryEnabled||!1,revealEffectEnable=astra.revealEffectEnable||!1,blogArchiveTitleLayout=astra.blogArchiveTitleLayout||"",blogArchiveTitleOn=astra.blogArchiveTitleOn||"";function domReady(e){document.addEventListener("DOMContentLoaded",e),"interactive"!==document.readyState&&"complete"!==document.readyState||e()}function astNavigationListener(){document.querySelectorAll(".ast-pagination a")?.forEach(e=>{e?.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),ArticleMarkup(e.target?.getAttribute("href")).onloadend=()=>{window.scrollTo({top:document.querySelector("#content")?.offsetTop??0,behavior:"smooth"})}})})}function ArticleMarkup(i,c){document.querySelector(".ast-row").style.opacity=.1;let l=new XMLHttpRequest;return l.open("GET",i,!0),l.send(),l.onload=function(){var t=l.response,t=(new DOMParser).parseFromString(t,"text/html");let r=t.querySelectorAll("article.ast-article-post");var e=".ast-ajax-pagination-wrapper",n=document.querySelector(e),e=t.querySelector(e),a=(!n&&e?document.querySelector("#main")?.insertAdjacentElement("afterend",e):n&&!e?n?.remove():n&&e?.innerHTML&&(n.innerHTML=DOMPurify.sanitize(e.innerHTML)),".ast-pagination"),o=document.querySelector(a),a=t.querySelector(a);!o&&a?document.querySelector("#main")?.insertAdjacentElement("afterend",a):o&&!a?o?.remove():o&&a?.innerHTML&&(o.innerHTML=DOMPurify.sanitize(a.innerHTML)),document.title=t?.title||document.title,document.querySelector("#astra-theme-css-inline-css")&&t.querySelector("#astra-theme-css-inline-css")?document.querySelector("#astra-theme-css-inline-css").innerHTML=DOMPurify.sanitize(t.querySelector("#astra-theme-css-inline-css").innerHTML):document.querySelector("#astra-theme-dynamic-css")&&t.querySelector("#astra-theme-dynamic-css")&&document.querySelector("#astra-theme-dynamic-css")?.setAttribute("href",t.querySelector("#astra-theme-dynamic-css")?.getAttribute("href")),document.querySelector("#main > .ast-row").innerHTML="";for(let e=0;e<r.length;e++)document.querySelector("#main > .ast-row").append(r[e]);"layout-1"!==blogArchiveTitleLayout&&blogArchiveTitleLayout||BlogBannerLayoutRender(t,".ast-archive-description",c),"layout-2"===blogArchiveTitleLayout&&BlogBannerLayoutRender(t,".ast-archive-entry-banner",c),n&&(n.innerHTML="",e?.innerHTML)&&(n.innerHTML=DOMPurify.sanitize(e.innerHTML),o=n.querySelector(".ast-pagination-infinite"))&&o.setAttribute("data-page",2),window.history.pushState({},null,i);a=astra.grid_layout;if(1==masonryEnabled&&(1<a.desktop||1<a.tablet||1<a.mobile)){t=document.querySelector("#main > .ast-row");let e=new Masonry(t,{});imagesLoaded(document.querySelector("#main > .ast-row"),function(){e.appended(r),e.reloadItems(),e.layout()})}document.querySelector(".ast-row").style.opacity=1,revealEffectEnable&&fadin(".ast-fade-up",{delay:200}),astNavigationListener()},l}function BlogBannerLayoutRender(e,t,r){var n=document.querySelector(t),e=e.querySelector(t);!n||"all"!==r||"layout-2"===blogArchiveTitleLayout&&blogArchiveTitleOn?!n&&e?.innerHTML?(t="layout-2"===blogArchiveTitleLayout?"#content":"#main",document.querySelector(t)?.insertAdjacentElement("beforebegin",e),document.body.classList.add("archive")):n&&e?.innerHTML&&(n.innerHTML=DOMPurify.sanitize(e.innerHTML)):(n.remove(),document.body.classList.remove("archive"))}domReady(()=>{let t=document.querySelectorAll(".ast-post-filter li");t&&t.forEach(e=>{e.addEventListener("click",function(e){t.forEach(e=>{e.classList.remove("active")}),e.currentTarget.classList.add("active"),ArticleMarkup(e.target.getAttribute("data-filter")?e.target.getAttribute("data-filter"):"",e.currentTarget.getAttribute("value")?e.currentTarget.getAttribute("value"):"")})}),astNavigationListener()});