View file File name : filter.min.js Content :const 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"))})})}function ArticleMarkup(c,l){document.querySelector(".ast-row").style.opacity=.1;const u=new XMLHttpRequest;u.open("GET",c,!0),u.send(),u.onload=function(){var e=u.response,e=(new DOMParser).parseFromString(e,"text/html");const t=e.querySelectorAll("article.ast-article-post");var n=".ast-ajax-pagination-wrapper",r=document.querySelector(n),n=e.querySelector(n),a=(!r&&n?document.querySelector("#main")?.insertAdjacentElement("afterend",n):r&&!n?r?.remove():r&&n?.innerHTML&&(r.innerHTML=n.innerHTML),".ast-pagination"),o=document.querySelector(a),a=e.querySelector(a);!o&&a?document.querySelector("#main")?.insertAdjacentElement("afterend",a):o&&!a?o?.remove():o&&a?.innerHTML&&(o.innerHTML=a.innerHTML),document.title=e?.title||document.title,document.querySelector("#astra-theme-css-inline-css").innerHTML=e.querySelector("#astra-theme-css-inline-css").innerHTML,document.querySelector("#main > .ast-row").innerHTML="";for(let e=0;e<t.length;e++)document.querySelector("#main > .ast-row").append(t[e]);"layout-1"!==blogArchiveTitleLayout&&blogArchiveTitleLayout||BlogBannerLayoutRender(e,".ast-archive-description",l),"layout-2"===blogArchiveTitleLayout&&BlogBannerLayoutRender(e,".ast-archive-entry-banner",l),r&&(r.innerHTML="",n?.innerHTML)&&(r.innerHTML=n.innerHTML,o=r.querySelector(".ast-pagination-infinite"))&&o.setAttribute("data-page",2),window.history.pushState({},null,c);a=astra.grid_layout||"3";if(1==masonryEnabled&&1<a){e=document.querySelector("#main > .ast-row");const i=new Masonry(e,{});imagesLoaded(document.querySelector("#main > .ast-row"),function(){i.appended(t),i.reloadItems(),i.layout()})}document.querySelector(".ast-row").style.opacity=1,revealEffectEnable&&fadin(".ast-fade-up",{delay:200}),astNavigationListener()}}function BlogBannerLayoutRender(e,t,n){var r=document.querySelector(t),e=e.querySelector(t);!r||"all"!==n||"layout-2"===blogArchiveTitleLayout&&blogArchiveTitleOn?!r&&e?.innerHTML?(t="layout-2"===blogArchiveTitleLayout?"#content":"#main",document.querySelector(t)?.insertAdjacentElement("beforebegin",e),document.body.classList.add("archive")):r&&e?.innerHTML&&(r.innerHTML=e.innerHTML):(r.remove(),document.body.classList.remove("archive"))}domReady(()=>{const 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()});