Hey there, I’ve build a simple asymmetric flexbox grid.
I was wondering what would be the best practice to set the width of my columns in the panel.
Right now I have to set the column width for every thumbnail in panel. But this wont work, because
I can’t realign every thumbnail whenever I am uploading a new image.
Here is the quick example of the grid how it should work/looks like:
and here is my code:
<main>
<div class="row">
<?php foreach($projects as $project) : ?>
<?php foreach($project->thumbnail() as $image): ?>
<?php if($img = $project->image($image)): ?>
<div class="col b<?php echo $project->gridalign(); ?>">
<div class="thumb">
<a data-url="<?php echo $project->url() ?>" </a>
<?php snippet('responsive_image', array('image' => $img, 'sizes' => [512, 768])) ?>
</a>
</div>
<div class="projectTitle sans-m">
<?php echo $project->title(); ?> <span class="serif-m"><?php echo $project->client(); ?></span>
</div>
</div>
<?php endif ?>
<?php endforeach ?>
<?php endforeach?>
</div>
</main>
So I thought if its possible to set a structure which is repeating on some point, so that I can only upload images which are aligning by themselves .
Would be super nice if someone could help me out here