2020-10-02 17:38:16 +02:00
|
|
|
<section class="flex flex-col">
|
|
|
|
<header class="flex justify-between py-2">
|
2021-09-10 18:02:25 +02:00
|
|
|
<Heading tagName="h2"><?= lang('Podcast.latest_episodes') ?></Heading>
|
2020-10-02 17:38:16 +02:00
|
|
|
<a href="<?= route_to(
|
2021-09-08 17:51:33 +02:00
|
|
|
'episode-list',
|
|
|
|
$podcast->id,
|
2021-10-21 15:12:38 +02:00
|
|
|
) ?>" class="inline-flex items-center text-sm underline hover:no-underline focus:ring-castopod">
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= lang('Podcast.see_all_episodes') ?>
|
|
|
|
<?= icon('chevron-right', 'ml-2') ?>
|
|
|
|
</a>
|
|
|
|
</header>
|
|
|
|
<?php if ($episodes): ?>
|
2021-10-21 15:12:38 +02:00
|
|
|
<div class="grid px-4 py-2 -mx-2 overflow-x-auto grid-cols-latestEpisodes gap-x-4 snap snap-x snap-proximity">
|
2020-10-02 17:38:16 +02:00
|
|
|
<?php foreach ($episodes as $episode): ?>
|
2021-10-21 15:12:38 +02:00
|
|
|
<?= view('episode/_card', [
|
|
|
|
'episode' => $episode,
|
|
|
|
]) ?>
|
2020-10-02 17:38:16 +02:00
|
|
|
<?php endforeach; ?>
|
|
|
|
</div>
|
|
|
|
<?php else: ?>
|
|
|
|
<p class="italic"><?= lang('Podcast.no_episode') ?></p>
|
|
|
|
<?php endif; ?>
|
2021-08-09 12:28:16 +02:00
|
|
|
</section>
|