Skip to content

Commit

Permalink
Events: shuffle gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative committed Oct 10, 2024
1 parent 059bb72 commit 7645c90
Show file tree
Hide file tree
Showing 21 changed files with 3 additions and 86 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
6 changes: 2 additions & 4 deletions site/controllers/meet.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<?php

use Kirby\Cms\Page;

return function (Page $page) {
return function () {
return [
'events' => $events = collection('events'),
'upcoming' => $events->filterBy('isUpcoming', true),
'past' => $events->filterBy('isUpcoming', false),
'gallery' => $events->images(),
'gallery' => $events->images()->shuffle(),
];
};
2 changes: 1 addition & 1 deletion site/snippets/templates/meet/gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<?php foreach ($gallery as $image): ?>
<li>
<figure class="img rounded-xl overflow-hidden" style="--w:<?= $image->width() ?>;--h:<?= $image->height() ?>">
<img src="<?= $image->resize(800)->url() ?>" alt="<?= $image->title()->esc() ?>" loading="lazy">
<img src="<?= $image->resize(800)->url() ?>" alt="Meetup <?= $image->page()->city()->esc() ?> - <?= $image->page()->date()->toDate('M Y') ?>" loading="lazy">
</figure>
</li>
<?php endforeach ?>
Expand Down

0 comments on commit 7645c90

Please sign in to comment.