1document.addEventListener('DOMContentLoaded', function () { 2 const blogPreviewSections = document.querySelectorAll('.blog-preview-section'); 3 4 blogPreviewSections.forEach(section => { 5 const filterButtons = section.querySelectorAll('.blog-filters .filter-btn'); 6 const articles = section.querySelectorAll('.articles-grid .article-card'); 7 8 if (filterButtons.length > 0 && articles.length > 0) { 9 filterButtons.forEach(button => { 10 button.addEventListener('click', function () { 11 // УбиÑаем active клаÑÑ Ñ Ð²ÑÐµÑ ÐºÐ½Ð¾Ð¿Ð¾Ðº в ÑÑой ÑекÑии 12 filterButtons.forEach(btn => btn.classList.remove('active')); 13 // ÐобавлÑем active клаÑÑ Ðº нажаÑой кнопке 14 this.classList.add('active'); 15 16 const filterValue = this.dataset.filter; 17 18 articles.forEach(article => { 19 const categories = article.dataset.categories; 20 21 if (filterValue === 'all' || (categories && categories.includes(filterValue))) { 22 article.style.display = 'flex'; // УбедиÑеÑÑ, ÑÑо ÑÑо Ð²Ð°Ñ display по ÑмолÑÐ°Ð½Ð¸Ñ 23 } else { 24 article.style.display = 'none'; 25 } 26 }); 27 }); 28 }); 29 } 30 }); 31});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.