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

@ -22,12 +22,13 @@
<?php foreach (page('database')->impactCategories()->split() as $cat): ?>
<li><button type="button" data-filter="<?= esc(Str::slug($cat)) ?>"><?= esc($cat) ?></button></li>
<?php endforeach ?>
<li><button type="button" data-filter=""><?= t('filter.all') ?></button></li>
</ul>
</div>
</div>
</div>
<div class="page__content grid-masonry">
<div class="page__content grid-masonry" data-sort-container>
<div class="grid-sizer"></div>
@ -40,7 +41,10 @@
$investigations = $impact->linkedInvestigations()->toPages();
?>
<div class="card--block has-link" data-impact-type="<?= esc(Str::slug($category)) ?>">
<div class="card--block has-link"
data-impact-type="<?= esc(Str::slug($category)) ?>"
data-filter="<?= esc(Str::slug($category)) ?>"
data-date="<?= $impact->created()->isNotEmpty() ? $impact->created()->toDate('yyyy-MM-dd') : '' ?>">
<?php if ($cover): ?>
<figure><?php snippet('picture', ['file' => $cover]) ?></figure>