Essentially, I would like to (re-)build the infinite grid of this site: https://grafilu.ch/, or rather my own version of it.
To do so, I am using the plugin Infinite Drag by Ian Li.
I believe on the site I'm using as a reference for building the grid, they use a similar (if not the same) plugin and have it generate very large tiles, which then have another grid created inside of them for the images. In the screenshot below you can see me inspecting the reference-site's code:
Like I said, it seems like multiple, very large tiles are being used:
<div class="infinite-grid__grid infinite-grid__grid-1">
…
<div class="infinite-grid__grid infinite-grid__grid-2">
…
<div class="infinite-grid__grid infinite-grid__grid-3">
… which each have the images laid out in their own inner grid (class="infinite-grid__grid-wrapper"
) with the images inside individual grid items (class="infinite-grid__item"
):
There is also a class="gutter-sizer"
, which leads me to believe that for the image grid inside the tiles something like Masonry, Isotope or Packery is being used.
I have gotten as far as being able to create a draggable grid with large tiles and use Packery to lay out some pictures inside of each tile.
You can see the current version of my attempt to program this grid here: https://codepen.io/joSch/pen/eMPVve
But its far from what I want:
The grids inside the tiles do not cover the entire tile. I believe this is because Isotope (which is what I'm using to generate the grid for the images inside the tiles) sets its grids to be as large as their content. How can I make the grids for the images cover each entire tile and lay out their content (the images) across the whole tile? Right now, there is always a large amount of empty space underneath each image-grid.
Each tile has the same grid. Right now, I am appending the markup for Isotope to build the image grid to each tile via the
oncreate
option of Infinite Drag. Hence every tile is containing the same markup. How can each tile receive individual content?
I'm in the process of puzzling this out. I'd appreciate any helpful input on how to create a grid similar to the one referenced.