Template:Masonry: Difference between revisions

Template page
(Created page with "<html> <head> <script> let grids = [...document.querySelectorAll('.masonry-group')]; if (grids.length && getComputedStyle(grids[0]).gridTemplateRows !== 'masonry') { grids = grids.map(grid => ({ _el: grid, gap: parseFloat(getComputedStyle(grid).gridRowGap), items: [...grid.childNodes].filter(c => c.nodeType === 1 && +getComputedStyle(c).gridColumnEnd !== -1), ncol: 0 })); function layout() { grids.forEach(grid => { /* get the post relayou...")
 
No edit summary
Tag: Reverted
Line 41: Line 41:
     layout(); /* initial load */
     layout(); /* initial load */
     addEventListener('resize', layout, false); /* on resize */
     addEventListener('resize', layout, false); /* on resize */
   }, false);
   }, false)
}
}
</script>
</script>
</head>
</head>
</html>
</html>

Revision as of 20:31, 23 March 2024