sort js
All checks were successful
Deploy / Deploy to Production (push) Successful in 14s

This commit is contained in:
Julie Blanc 2026-02-25 16:07:14 +01:00
parent a907d317b8
commit 494dd15166
10 changed files with 100 additions and 10 deletions

View file

@ -6,6 +6,7 @@ import { playVideo } from './hero-video.js';
import { initDropdowns } from './dropdown.js';
import { initSwipers } from './swipers.js';
import { initSliderBeforeAfter, progressBar, scrollBack, navInvestigation } from './investigation.js';
import { initSort } from './sort.js';
const responsiveMedium = 1080;
const responsiveSmall = 768;
@ -36,7 +37,7 @@ window.onload = async function () {
if (window.innerWidth >= responsiveSmall) {
if (!msnry) {
msnry = new Masonry(elem, {
itemSelector: '.card--block',
itemSelector: '.card--block:not(.is-sort-hidden)',
columnWidth: '.grid-sizer',
percentPosition: true,
gutter: 26
@ -53,6 +54,13 @@ window.onload = async function () {
initMasonry();
window.addEventListener('resize', initMasonry);
initSort(() => {
if (msnry) {
msnry.reloadItems();
msnry.layout();
}
});
}